threads / rfc / 46325

RFC patcht: lib-gpg: flush agent sockets on startup

Subject: [RFC PATCH] t: lib-gpg: flush agent sockets on startup

## tl;dr

2 messages between Jul 7, 2017 and Jul 7, 2017. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

santiago@nyu.edu· Jul 7, 2017, 22:01 UTC · lore
From: Santiago Torres <santiago@nyu.edu>

When running gpg-relevant tests, a gpg-daemon is ran for a trash_directory-specific GNUPGHOME. This daemon creates a unix socket on the target host, and it will be used on subsequent runs of the same test script. Add a call to kill the agent and flush the sockets of the relevant trash directory.

Signed-off-by: Santiago Torres <santiago@nyu.edu>
---
 t/lib-gpg.sh | 1 +
 1 file changed, 1 insertion(+)
Show changes to t/lib-gpg.sh +1 −0
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index ec2aa8f68..22ef2fa87 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -31,6 +31,7 @@ then
 		chmod 0700 ./gpghome &&
 		GNUPGHOME="$(pwd)/gpghome" &&
 		export GNUPGHOME &&
+		gpgconf --kill gpg-agent &&
 		gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
 			"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
 		gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \
-- 
2.13.2
Santiago Torres· Jul 7, 2017, 22:07 UTC · re: santiago@nyu.edu · lore

Re: [RFC PATCH] t: lib-gpg: flush agent sockets on startup

Hello all,

I don't know if this is a desired feature, but I noticed that, one some versions of gpg, gpg tests are skipped when I run a test suite multiple times.

Cheers! -Santiago.

On Fri, Jul 07, 2017 at 06:01:59PM -0400, santiago@nyu.edu wrote:
Show 28 quoted lines
> From: Santiago Torres <santiago@nyu.edu>
> 
> When running gpg-relevant tests, a gpg-daemon is ran for a
> trash_directory-specific GNUPGHOME. This daemon creates a unix socket on
> the target host, and it will be used on subsequent runs of the same test
> script.  Add a call to kill the agent and flush the sockets of the
> relevant trash directory.
> 
> Signed-off-by: Santiago Torres <santiago@nyu.edu>
> ---
>  t/lib-gpg.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
> index ec2aa8f68..22ef2fa87 100755
> --- a/t/lib-gpg.sh
> +++ b/t/lib-gpg.sh
> @@ -31,6 +31,7 @@ then
>  		chmod 0700 ./gpghome &&
>  		GNUPGHOME="$(pwd)/gpghome" &&
>  		export GNUPGHOME &&
> +		gpgconf --kill gpg-agent &&
>  		gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
>  			"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
>  		gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \
> -- 
> 2.13.2
> 

← back to recent threads