diff options
| author | Tomi Ollila <tomi.ollila@iki.fi> | 2017-05-23 21:54:25 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-05-26 07:26:06 -0300 |
| commit | 5f71a4d3e15fa2ff7d4bcc9b8bfb8a2057b26ad7 (patch) | |
| tree | 1728886102de3e165158d3db102eea390e1e44c3 /test/T350-crypto.sh | |
| parent | eb157f8841b93a0df241b815e30ac54ca81cc83d (diff) | |
exit lingering gpg agents at the end of relevant tests
Since gnupg 2.1.20, gpg-agent no longer shut itself down when
$GNUPGHOME directory is removed.
Add exit hooks to the test modules which execute `gpgconf --kill all`
Add exit hooks to execute `gpgconf --kill all` in the modules that
create $GNUPGHOME for gpg to work with.
Diffstat (limited to 'test/T350-crypto.sh')
| -rwxr-xr-x | test/T350-crypto.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh index b7d3a2cf..d21cad14 100755 --- a/test/T350-crypto.sh +++ b/test/T350-crypto.sh @@ -11,6 +11,8 @@ add_gnupg_home () { local output [ -d ${GNUPGHOME} ] && return + _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } + at_exit_function _gnupg_exit mkdir -m 0700 "$GNUPGHOME" gpg --no-tty --import <$TEST_DIRECTORY/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1 test_debug "cat $GNUPGHOME/import.log" |
