{"thread":{"id":"46325","subject":"[RFC PATCH] t: lib-gpg: flush agent sockets on startup","startedAt":"2017-07-07T22:02:12Z","lastAt":"2017-07-07T22:07:41Z","messageCount":2,"participants":["santiago@nyu.edu","Santiago Torres"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"323981","messageId":"20170707220159.12752-1-santiago@nyu.edu","threadId":"46325","inReplyTo":null,"subject":"[RFC PATCH] t: lib-gpg: flush agent sockets on startup","fromName":"","fromEmail":"santiago@nyu.edu","sentAt":"2017-07-07T22:01:59Z","receivedAt":"2017-07-07T22:02:12Z","isPatch":true,"sender":{"key":"santiago@nyu.edu","avatar":"https://avatars.githubusercontent.com/u/3579933?v=4"},"body":"From: Santiago Torres <santiago@nyu.edu>\n\nWhen running gpg-relevant tests, a gpg-daemon is ran for a\ntrash_directory-specific GNUPGHOME. This daemon creates a unix socket on\nthe target host, and it will be used on subsequent runs of the same test\nscript.  Add a call to kill the agent and flush the sockets of the\nrelevant trash directory.\n\nSigned-off-by: Santiago Torres <santiago@nyu.edu>\n---\n t/lib-gpg.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/lib-gpg.sh b/t/lib-gpg.sh\nindex ec2aa8f68..22ef2fa87 100755\n--- a/t/lib-gpg.sh\n+++ b/t/lib-gpg.sh\n@@ -31,6 +31,7 @@ then\n \t\tchmod 0700 ./gpghome &&\n \t\tGNUPGHOME=\"$(pwd)/gpghome\" &&\n \t\texport GNUPGHOME &&\n+\t\tgpgconf --kill gpg-agent &&\n \t\tgpg --homedir \"${GNUPGHOME}\" 2>/dev/null --import \\\n \t\t\t\"$TEST_DIRECTORY\"/lib-gpg/keyring.gpg &&\n \t\tgpg --homedir \"${GNUPGHOME}\" 2>/dev/null --import-ownertrust \\\n-- \n2.13.2\n\n"},{"id":"323982","messageId":"20170707220729.a3xrsju3rf4guyzs@LykOS.localdomain","threadId":"46325","inReplyTo":"20170707220159.12752-1-santiago@nyu.edu","subject":"Re: [RFC PATCH] t: lib-gpg: flush agent sockets on startup","fromName":"Santiago Torres","fromEmail":"santiago@nyu.edu","sentAt":"2017-07-07T22:07:30Z","receivedAt":"2017-07-07T22:07:41Z","isPatch":true,"sender":{"key":"santiago@nyu.edu","avatar":"https://avatars.githubusercontent.com/u/3579933?v=4"},"body":"Hello all,\n\nI don't know if this is a desired feature, but I noticed that, one some\nversions of gpg, gpg tests are skipped when I run a test suite multiple\ntimes.\n\nCheers!\n-Santiago.\n\nOn Fri, Jul 07, 2017 at 06:01:59PM -0400, santiago@nyu.edu wrote:\n> From: Santiago Torres <santiago@nyu.edu>\n> \n> When running gpg-relevant tests, a gpg-daemon is ran for a\n> trash_directory-specific GNUPGHOME. This daemon creates a unix socket on\n> the target host, and it will be used on subsequent runs of the same test\n> script.  Add a call to kill the agent and flush the sockets of the\n> relevant trash directory.\n> \n> Signed-off-by: Santiago Torres <santiago@nyu.edu>\n> ---\n>  t/lib-gpg.sh | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh\n> index ec2aa8f68..22ef2fa87 100755\n> --- a/t/lib-gpg.sh\n> +++ b/t/lib-gpg.sh\n> @@ -31,6 +31,7 @@ then\n>  \t\tchmod 0700 ./gpghome &&\n>  \t\tGNUPGHOME=\"$(pwd)/gpghome\" &&\n>  \t\texport GNUPGHOME &&\n> +\t\tgpgconf --kill gpg-agent &&\n>  \t\tgpg --homedir \"${GNUPGHOME}\" 2>/dev/null --import \\\n>  \t\t\t\"$TEST_DIRECTORY\"/lib-gpg/keyring.gpg &&\n>  \t\tgpg --homedir \"${GNUPGHOME}\" 2>/dev/null --import-ownertrust \\\n> -- \n> 2.13.2\n> \n"}]}