From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IKm2L02exV6aeQAA0tVLHw (envelope-from ) for ; Wed, 20 May 2020 21:17:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sOGXK02exV6OTAAAbx9fmQ (envelope-from ) for ; Wed, 20 May 2020 21:17:01 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1EB29940363 for ; Wed, 20 May 2020 21:17:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0E7826DE1383; Wed, 20 May 2020 14:16:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NhTSzBvHpwwi; Wed, 20 May 2020 14:16:55 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 478FF6DE1395; Wed, 20 May 2020 14:16:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 098816DE1395 for ; Wed, 20 May 2020 14:16:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RrMhKA0EuWZg for ; Wed, 20 May 2020 14:16:51 -0700 (PDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [212.16.98.55]) by arlo.cworth.org (Postfix) with ESMTPS id A5CCF6DE1383 for ; Wed, 20 May 2020 14:16:51 -0700 (PDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 1D72B1B00120; Thu, 21 May 2020 00:16:50 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1590009410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jGHEg4QjK+qnAPWgjF6GotRDDbb0i7Eh02cwxWFJq3U=; b=wjC6F1LeM0ESTs9+HRz3+Wyy698HMVFY7Xz/6SteeeuFDVJHCvdaVtUO1rLB74s7LNxQ2X 3g8/QTjD6dMc/lv4ztmVD18JHEFWPTUNrr4iywTwDsoqQHYostRiAyw4T/JMlqiGNjpg4n qt7yk9AKzx7r1Bv73td0nnhiTSBawYZClBjwlN1PpbJfGL+NgAMBnDB6Go/shWijJD0S9B E3Z3Cf77kC3Y+83Vdhb3H2XxVUVC5ULt2JG9coh7atLcEsCr//vF2PcbwYNobU07CelAT2 PZ5VBOWihGFA4FHrZQ487kpDei+mxzehFYSbW4q7FynEb4SulivP/kfzo8od+w== From: Tomi Ollila To: Daniel Kahn Gillmor , notmuch@notmuchmail.org Subject: Re: test suite: FIXED messages are misordered with tests In-Reply-To: References: <87eeron74q.fsf@fifthhorseman.net> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1590009410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jGHEg4QjK+qnAPWgjF6GotRDDbb0i7Eh02cwxWFJq3U=; b=EHO4kNBVAAg5Obna931vD8rGqB7tpla0pS/MuATRd0fTs/t3sx2Ka5vVxGUwXu/yah7hy9 uP0PdukWSERVx8/cOe4fMLSqSXohSxcG7WhQr4XSh02/O38PQ2mnmekgjGO+SWVIy1hm8T aBpLOz8dxNNZO0bOdzqPQavA7iQhqjCj8IwN7pCBPWste1CYh86StU7KInpK3fEMO0a1QW D5t3dw+dn454BhUguGiIxa1Dvbii6gGwoYJXLMIta4Tj13vMRgw/6c0dMr2OB/g3TUd1QK sb9NQUn5A+LA61GWX2fh093ZWk/pzdMzFUkppRpfZvhVw69nm0DGOq8GAuqNJg== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1590009410; a=rsa-sha256; cv=none; b=hfzORv9Z/mgoiZ1ztCkGF6irBZkejLN1qRtx+idLxPlmYepot0TJAluw6NNepBJtD3icrX bEDvoYV5IQSCorJcAvEbaGzSw3G/SqowEu9RzZEGSD+G2nZ93ZWuQxn+s200buTrnuaDrG bOppm0JF6DawghDDPnKvTjZxeKMhcQiMrEUY0XI4TNQ/jZiSjx6lFVLWRJEMhJF8vrh/uF QisObw33NEo9j5Eqo5Ow8exiOG1kOLmnIWv/i0TdXUJAxbxG+4ii92Q5qfDjzoGad0NYIu 8673uKEdydOuvfn1B61bplIZVkAaf2Om1fsEDoqbm70OShPWAPubCdZyvLmxaw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=wjC6F1Le; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 1.99 X-TUID: aHRi0S28//bm On Thu, May 21 2020, Tomi Ollila wrote: > > the message that prints FIXED, does not execute print_test_description > but the ones that do BROKEN or FAIL does (did not fully check but yes). > > And: > > print_test_description () > { > test -z "$test_description_printed" || return 0 > echo > echo $this_test: "Testing ${test_description}" > test_description_printed=1 > } btw: I would rewrite this function as: print_test_description () { echo echo $this_test: "Testing ${test_description}" print_test_description () { :; } } If I wanted to reduce XTRACE noise (even further), even further: _print_test_description () { echo echo $this_test: "Testing ${test_description}" print_test_description= } print_test_description=_print_test_description (and then use $print_test_description in "calls") or even alias print_test_description=' echo echo echo $this_test: "Testing ${test_description}" alias print_test_description=' (just tested this latest works) Note on aliases: bash namual states: For almost every purpose, aliases are superseded by shell functions. One notable exception is XTRACE noise reduction. In our case best candidate would be prerequisite work -- but SMOP.. Tomi > if [ -z "$NOTMUCH_TEST_QUIET" ] > then > print_test_description > fi > > Tomi