Skip to content

Commit 2e285e7

Browse files
tmzullingergitster
authored andcommitted
t/lib-gpg: drop redundant killing of gpg-agent
In 53fc999 ("gpg-interface t: extend the existing GPG tests with GPGSM", 2018-07-20), the gpgconf call which kills gpg-agent was copied from the existing gpg setup code. The reason for killing gpg-agent is given in 29ff1f8 ("t: lib-gpg: flush gpg agent on startup", 2017-07-20): When running gpg-relevant tests, a gpg-daemon is spawned for each GNUPGHOME used. This daemon may stay running after the test and cache file descriptors for the trash directories, even after the trash directory is removed. This leads to ENOENT errors when attempting to create files if tests are run multiple times. Add a cleanup script to force flushing the gpg-agent for that GNUPGHOME (if any) before setting up the GPG relevant-environment. Killing gpg-agent once per test is sufficient. Signed-off-by: Todd Zullinger <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ddf3a11 commit 2e285e7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

t/lib-gpg.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ then
6161
| grep fingerprint: | cut -d" " -f4 | tr -d '\n' > \
6262
${GNUPGHOME}/trustlist.txt &&
6363
echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
64-
(gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
6564
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
6665
-u [email protected] -o /dev/null --sign - 2>&1 &&
6766
test_set_prereq GPGSM

0 commit comments

Comments
 (0)