git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] t/lib-gpg: drop redundant killing of gpg-agent

From
Todd Zullinger <tmz@pobox.com>
Date
Feb 8, 2019, 03:17 UTC
Message-ID
<20190208031746.22683-3-tmz@pobox.com>
In-Reply-To
<20190208031746.22683-1-tmz@pobox.com>

In 53fc999306 ("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 29ff1f8f74 ("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 <tmz@pobox.com>
---
 t/lib-gpg.sh | 1 -
 1 file changed, 1 deletion(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 207009793b..8d28652b72 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -64,7 +64,6 @@ then
 		tr -d '\n' >"${GNUPGHOME}/trustlist.txt" &&
 
 		echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
-		(gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
 		echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
 			-u committer@example.com -o /dev/null --sign - 2>&1 &&
 		test_set_prereq GPGSM
-- 
Todd
Previous: Todd ZullingerNext: Todd Zullinger
Message 2 of 15 in “t/lib-gpg: a gpgsm fix, a minor improvement, and a question”
  1. 0/2 t/lib-gpg: a gpgsm fix, a minor improvement, and a questionTodd Zullinger, Feb 8, 2019
  2. 2/2 t/lib-gpg: drop redundant killing of gpg-agentTodd Zullinger, Feb 8, 2019
  3. 1/2 t/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txtTodd Zullinger, Feb 8, 2019
  4. SZEDER GáborFeb 8, 2019
  5. Todd ZullingerFeb 8, 2019
  6. SZEDER GáborFeb 8, 2019
  7. Henning SchildFeb 8, 2019
  8. Junio C HamanoFeb 8, 2019
  9. SZEDER GáborFeb 9, 2019
  10. Todd ZullingerFeb 9, 2019
  11. SZEDER GáborFeb 11, 2019
  12. Todd ZullingerFeb 14, 2019
  13. Jeff KingFeb 12, 2019
  14. Junio C HamanoFeb 12, 2019
  15. SZEDER GáborFeb 12, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.