Subject: | agent.t tests fails with since GnuPG 2.1 |
Running t/agent.t with GPG_PRESET_PASSPHRASE environment variable pointing to gpg-agent from GnuPG 2 worked until upgrading gnupg from 2.0.25 to 2.1.1:
$ GPG_PRESET_PASSPHRASE=/usr/libexec/gpg-preset-passphrase prove -b -v t/agent.t
t/agent.t ..
gpg: keyring `mgtS0WvS/secring.gpg' created
gpg: keyring `mgtS0WvS/pubring.gpg' created
gpg: key EFEA4EAD: secret key imported
gpg: mgtS0WvS/trustdb.gpg: trustdb created
gpg: key EFEA4EAD marked as ultimately trusted
gpg: key EFEA4EAD: public key "Mail::GnuPG Test Key <mail@gnupg.dom>" imported
gpg: key EFEA4EAD: "Mail::GnuPG Test Key <mail@gnupg.dom>" 1 new signature
gpg: Total number processed: 2
gpg: imported: 1
gpg: new signatures: 1
gpg: secret keys read: 1
gpg: secret keys imported: 1
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg-agent: a gpg-agent is already running - not starting a new one
1..20
ok 1 - An object of class 'Mail::GnuPG' isa 'Mail::GnuPG'
not ok 2
# Failed test at t/agent.t line 78.
# got: '2'
# expected: '0'
not ok 3
# Failed test at t/agent.t line 81.
# got: '2'
# expected: '0'
not ok 4
# Failed test at t/agent.t line 82.
# got: undef
# expected: 'EFEA4EAD'
not ok 5
# Failed test at t/agent.t line 83.
# got: undef
# expected: 'Mail::GnuPG Test Key <mail@gnupg.dom>'
ok 6
ok 7
not ok 8
# Failed test at t/agent.t line 92.
# got: '2'
# expected: '0'
Unknown Content-Type or no PGP message in body at /home/test/fedora/perl-Mail-GnuPG/Mail-GnuPG-0.21/blib/lib/Mail/GnuPG.pm line 402.
# Looks like you planned 20 tests but ran 8.
# Looks like you failed 5 tests of 8 run.
# Looks like your test exited with 2 just after 8.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 17/20 subtests
Test Summary Report
-------------------
t/agent.t (Wstat: 512 Tests: 8 Failed: 5)
Failed tests: 2-5, 8
Non-zero exit status: 2
Parse errors: Bad plan. You planned 20 tests but ran 8.
Files=1, Tests=8, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.66 cusr 0.18 csys = 0.89 CPU)
Result: FAIL