unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / Atom feed
* T355-smime.sh is flaky
@ 2020-11-10 12:25 David Bremner
  0 siblings, 0 replies; only message in thread
From: David Bremner @ 2020-11-10 12:25 UTC (permalink / raw)
  To: notmuch; +Cc: Daniel Kahn Gillmor

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]


With the attached (the first test from T355-smime.sh) saved as foo.sh,
try running the following.

count=0; while ./foo.sh ; do
count=$((count + 1))
echo $count >> tests.log
done

After the somewhere between 1 and 200 iterations this hangs up for
me. Emacs is still running, the message-mode buffer has appropriate
looking stuff in it. There is nothing interesting in *Messages*, and the
buffer is still titled "*unsent mail*". When sending manually, I get
a message that there is no key for test_suite@notmuchmail.org

After digging through mml-secure for a while, I realized that the
problem is not actually in emacs, but in our test harness for gpgsm. I
added the gpgsm -K to the script, and you can see that the
test_suite@notmuchmail.org key is not being added.

I think that means there is some kind of intermittent failure with the
following pipeline
    
    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 \
	      --disable-dirmngr --import  >"$GNUPGHOME"/import.log 2>&1 3<<<''

I've attached "import.log". I _think_ the failure reported is the
notmuchmail.org key, and the success is the 'Bob Babbage' key, 


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: foo.sh --]
[-- Type: text/x-sh, Size: 637 bytes --]

#!/usr/bin/env bash

test_description='S/MIME signature verification and decryption'
. $(dirname "$0")/test-lib.sh || exit 1

test_require_external_prereq openssl
test_require_external_prereq gpgsm

FINGERPRINT=$(openssl x509 -sha1 -fingerprint -in "$NOTMUCH_SRCDIR/test/smime/key+cert.pem" -noout | sed -e 's/^.*=//' -e s/://g)

add_gpgsm_home

gpgsm -K

test_begin_subtest "emacs delivery of S/MIME signed message"
test_expect_success \
     'emacs_fcc_message \
     "test signed message 001" \
     "This is a test signed message." \
     "(let ((mml-secure-fail-when-key-problem t)) (mml-secure-message-sign \"smime\"))"'
test_done

[-- Attachment #3: import.log --]
[-- Type: application/octet-stream, Size: 1508 bytes --]

[-- Attachment #4: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-10 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 12:25 T355-smime.sh is flaky David Bremner

unofficial mirror of notmuch@notmuchmail.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git