From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mEv4LUDlBGI1RQEAgWs5BA (envelope-from ) for ; Thu, 10 Feb 2022 11:13:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +N5XK0DlBGLXAwEA9RJhRA (envelope-from ) for ; Thu, 10 Feb 2022 11:13:20 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3490719EB4 for ; Thu, 10 Feb 2022 11:13:20 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C25E35F71C; Thu, 10 Feb 2022 10:13:13 +0000 (UTC) Received: from mailproxy05.manitu.net (mailproxy05.manitu.net [217.11.48.69]) by mail.notmuchmail.org (Postfix) with ESMTPS id 4B27C5F714 for ; Thu, 10 Feb 2022 10:13:10 +0000 (UTC) Received: from localhost (200116b8605b9100a390552ff161dcf3.dip.versatel-1u1.de [IPv6:2001:16b8:605b:9100:a390:552f:f161:dcf3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy05.manitu.net (Postfix) with ESMTPSA id 2E63C1B609D6; Thu, 10 Feb 2022 11:08:04 +0100 (CET) MIME-Version: 1.0 In-Reply-To: References: <8d483901f3cf9bee86d7359ff1d665943adcd31b.1644406756.git.git@grubix.eu> Subject: Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons From: Michael J Gruber To: Tomi Ollila , notmuch@notmuchmail.org Message-ID: <164448768424.6325.13646895589384122058.git@grubix.eu> Date: Thu, 10 Feb 2022 11:08:04 +0100 User-Agent: alot/0.10 Message-ID-Hash: CS3DSZU4ITOGGCRRKEB4GNPK4NOF2JZM X-Message-ID-Hash: CS3DSZU4ITOGGCRRKEB4GNPK4NOF2JZM X-MailFrom: michael@grubix.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644488000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=ai1+QEhPHMnKinKI8BPcXBhTdo5oilXRvHAoWdN53TQ=; b=C1CMgPP81Cv6uZ/8lViYh6GklUi4eXph1smj6xp+lPHYZyDRo56V0VJ0w4htDj2f+rzobV OxCgm47lGpFMtvwIqWC7LfhdrEaiGezkyaLNb0w8dVWEh90TRP4tf5gJdgQJcekyYoRjwv 9jvlKAYZqqvt9XJwEbKzni7tAdqv8Msnf9xXvaYMYEDGqwhMD/gbx5nvRjoITSlO44vMh6 S6n6mkTCqnha/XEpAyFE0ZiLbnWrsjJCWbbxvn8e0/m+cQElUwOc8E2a8LZG8s3jHiM5mT 7i6wvBJdg0am8gOOf+Iq1RijyMQZMtWGhOXcQ1qSJZsO0ik+vQ9wDIJdfuv+mA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644488000; a=rsa-sha256; cv=none; b=MF4z3jD50WcLJn/f1qVUfT1sqm5l1PEEuGKWSgzIb+Xrl7SOE9OPYnazHNYejxS6J1u8cj DHjOHoV9vzP8gJsBBOVSWWH74gGOhl+rgYeYUCpo/6qyPy92Mn2YhRsB2wNUDXua7VCH8C wqqyULBwIqRbt1dFAVMJMQfxPgwNgdGQydVWXxQst4RAqj/nZtJ2pvO+BubZt0ys91UoD/ mfvG/dvfGpZR/UZ/hFkSMszdBPXTPviH03nMEWUZughE0aEkmYVWIIyAjaMayR89dVwgNb mXwApkEyoKfO5J/HiGUZ4tzUeM3l2nyMvIAnnJHEWY+lilbLlMcabKYv8dpr0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.54 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3490719EB4 X-Spam-Score: -1.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: vPVNchiZsXHk Tomi Ollila venit, vidit, dixit 2022-02-09 21:49:18: > On Wed, Feb 09 2022, Michael J. Gruber wrote: > > > If gdb is missing then some files are never written to so that the > > comparisons of non-existing files succeeds for the wrong reason, > > claiming that `notmch new` is idempotent when it was in fact never run. > > > > Catch this and (for lack of a better spot) set up the files with a > > reason for the FAIL. > > > > Signed-off-by: Michael J Gruber > > --- > > test/T380-atomicity.sh | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh > > index a6f1e037..7f618062 100755 > > --- a/test/T380-atomicity.sh > > +++ b/test/T380-atomicity.sh > > @@ -90,6 +90,10 @@ if test_require_external_prereq gdb; then > > i=$(expr $end - 1) > > fi > > done > > +else > > + echo -n "Test fails due to missing gdb." > searchall > > + echo -n > expectall > > I am not much of a fan of 'echo -n' (I remember seeing -n (and newline > echoed...), therefore first to use printf and second : > expectall > (unless printf '' > expectall) I'm in favour of using printf - usually I don't impose my favours but follow surrounding style, which is exactly what I did here. In the if-block before the else, the files are writen to using "echo -n". I would be weird to do it differently in both blocks. > > > + outcount=0 > > fi > > > > test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts' > > -- > > 2.35.1.306.ga00bde9711