From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6PjOBFzdqV6iPQAA0tVLHw (envelope-from ) for ; Wed, 29 Apr 2020 20:02:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id nKtWHmTdqV6EOgAA1q6Kng (envelope-from ) for ; Wed, 29 Apr 2020 20:02:44 +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 13FD69439DF for ; Wed, 29 Apr 2020 20:02:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id DC0806DE102B; Wed, 29 Apr 2020 13:02:34 -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 4uJBPYUHKvOd; Wed, 29 Apr 2020 13:02:34 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 1087B6DE136D; Wed, 29 Apr 2020 13:02:31 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 722856DE102B for ; Wed, 29 Apr 2020 13:02:29 -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 WLkyaIrWlNVb for ; Wed, 29 Apr 2020 13:02:27 -0700 (PDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [212.16.98.55]) by arlo.cworth.org (Postfix) with ESMTPS id E6D916DE136D for ; Wed, 29 Apr 2020 13:02:25 -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 4BC9D1B00431; Wed, 29 Apr 2020 23:02:21 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1588190541; 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=713XXYS4OcQjAUhTsQdaTXGxf8TpRn1tG/WijdKppqU=; b=TJ4EodT1viNGOivCO0+yShINjU/cz5+5AAigGiphforYzCKa87Vej/5P6ehCl1BTdqnfkr OotcJgdDM1+BPZAZ5Yx7vAF8ZNrLLs81s7Pm9RSioQggTzOxCzz6PmVmLZsqoobnO2ChaW lcPzdcD07TixprunsI9GPn/ADOlFvM6cEM4Wm7B1gkEqnc6BbFtOghsTLsm62raSm5GNfn 23xz8WBaFuW6hBdEVt7bT3YeEZkd9DxlJ3GPgaHpEl7Nfi6qTzrBlu+KutmPIznsEy6F3L NSbVPq13ha4CycNShZCWx3n6pCYiFs+ymInp7K5hvH/7sUVNRP6rTzwrBwMUSg== From: Tomi Ollila To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH 07/15] test: Allow tests to have both gpg and gpgsm active at once In-Reply-To: <20200428185723.660184-8-dkg@fifthhorseman.net> References: <20200428185723.660184-1-dkg@fifthhorseman.net> <20200428185723.660184-8-dkg@fifthhorseman.net> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-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=1588190541; 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=713XXYS4OcQjAUhTsQdaTXGxf8TpRn1tG/WijdKppqU=; b=mdYSP8W5V84sujQSbGYlvLYsvv/9RUonWvkFcmYzyGYYy5nKOoAebHyd8waYl5kMReZiT+ QFVvgsbkC8bIn0YuwkVIJpdPjZGVwSYR/BAAhHcO4fiPMffDJYcud3YdAoaD5Mv9NP2H/b fPuIYcbgrIa5xsUJnqhBMiLYXMSr3Qya7cgiKgUj5Mp2N3GkmCd5eitoCbdSQsrZ3ElGXv omk4Gt9Ft5ISXfmMCCcoQE3cwmc/uf/DKt7TAeXZ07L7FBFv0xn5il2/0t3wsqaODTxcsK LewWt82E7LkJCzYzukE+BavIx4m7AxithNNH8B6L9+fG5AVTklSO3EY1kTjfKQ== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1588190541; a=rsa-sha256; cv=none; b=MlmBSLbejbByfO2hmPnNKtW/JQS6kJWhnqZ//FOHl2TnR22c0E/WNRG1XuPxswYWjnuSNc WyZYwTLoU+AfEsXC4vL+9VEhaaJCB2YIWzNKuPgsVP8lCa64aKzf9p0HK3JCaPdHlYQNhk z8v0Bj3iL5mcmyKQmkjXOvDxSc21reHtwtwiV5scwM9OmzBh2V+HqV0FMd35PdMGNdB6nx ru7vuqxghav9Pt8voJ9OqcwGKpLE/DhdAsDqEUelmt6Vk8FEgw2W5IaSas6OxbkDkJptPo ohKqP2fgFsMSWANvnl0mpyXW4BqAtEN8oWYJ77at/JpSiKEHYvYeIHRvkLeMnw== 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 X-Spam-Score: 3.49 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=TJ4EodT1; 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-Scan-Result: default: False [3.49 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.4623740250769]; MX_INVALID(1.00)[]; DWL_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; R_SPF_ALLOW(-0.20)[+a:c]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.46)]; R_DKIM_REJECT(1.00)[iki.fi:s=lahtoruutu]; ARC_REJECT(2.00)[signature check failed: fail, {[1] = sig:iki.fi:reject}]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[iki.fi:-]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; RCVD_IN_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[tomi.ollila@iki.fi,notmuch-bounces@notmuchmail.org]; URIBL_BLOCKED(0.00)[notmuchmail.org:email,fifthhorseman.net:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; DMARC_NA(0.00)[iki.fi]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: T3pi6pgSsU+b On Tue, Apr 28 2020, Daniel Kahn Gillmor wrote: > Without this fix, we couldn't run both add_gnupg_home and > add_gpgsm_home in the same test script. > > Signed-off-by: Daniel Kahn Gillmor > --- > test/test-lib.sh | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/test/test-lib.sh b/test/test-lib.sh > index ac1b9315..d9997b27 100644 > --- a/test/test-lib.sh > +++ b/test/test-lib.sh > @@ -110,10 +110,10 @@ unset ALTERNATE_EDITOR > add_gnupg_home () > { > local output > - [ -d ${GNUPGHOME} ] && return > + [ -e ${GNUPGHOME}/gpg.conf ] && return So far so good (except perhaps David's comment not "url" not found) But here this change could include "consistently quoted" variable (or/and have it done in that one commit earlier...) So LGTM 1-7, provided that tests pass... Tomi > _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } > at_exit_function _gnupg_exit > - mkdir -m 0700 "$GNUPGHOME" > + mkdir -p -m 0700 "$GNUPGHOME" > gpg --no-tty --import <$NOTMUCH_SRCDIR/test/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1 > test_debug "cat $GNUPGHOME/import.log" > if (gpg --quick-random --version >/dev/null 2>&1) ; then > @@ -132,10 +132,10 @@ add_gnupg_home () > add_gpgsm_home () > { > local fpr > - [ -d "$GNUPGHOME" ] && return > + [ -e "$GNUPGHOME/gpgsm.conf" ] && return > _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } > at_exit_function _gnupg_exit > - mkdir -m 0700 "$GNUPGHOME" > + mkdir -p -m 0700 "$GNUPGHOME" > openssl pkcs12 -export -passout pass: -inkey "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" \ > < "$NOTMUCH_SRCDIR/test/smime/test.crt" | \ > gpgsm --batch --no-tty --no-common-certs-import --pinentry-mode=loopback --passphrase-fd 3 \ > -- > 2.26.2 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch