Re: [PATCH 07/15] test: Allow tests to have both gpg and gpgsm active at once
On Wed 2020-04-29 23:02:19 +0300, Tomi Ollila wrote: > 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...) agreed, quoting this would be good. --dkg signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 07/15] test: Allow tests to have both gpg and gpgsm active at once
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 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 07/15] test: Allow tests to have both gpg and gpgsm active at once
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 _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