aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-03-23 10:45:17 +0000
committerWerner Koch <[email protected]>2017-03-23 16:55:21 +0000
commit2c9d9ac55ea455a5ec26428989dced0311ed46cc (patch)
tree0b45d913814b7fdbfc8fa2e54c0ca1028f95eee3 /tests
parentgpgscm: Make test cleanup more robust. (diff)
downloadgnupg-2c9d9ac55ea455a5ec26428989dced0311ed46cc.tar.gz
gnupg-2c9d9ac55ea455a5ec26428989dced0311ed46cc.zip
tests: Use gpgconf to stop the agent.
* tests/openpgp/defs.scm (stop-agent): Swap order of actions. Kill all daemons using gpgconf. * tools/gpgconf.c (main) <aRemoveSocketDir>: Try to remove known socketfails on rmdir failure. Do no fail for ENONET. -- Killing all daemons is not really required but it does not harm to be prepared for the future. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--tests/openpgp/defs.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index 7c8e10a7e..e8d06c048 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -453,10 +453,12 @@
"|--debug-quick-random")
/bye)))
-;; Stop the agent and remove the socket dir.
+;; Stop the agent and other daemons and remove the socket dir.
(define (stop-agent)
(log "Stopping gpg-agent...")
+ (call-check `(,(tool 'gpgconf) --kill all))
(catch (log "Warning: Removing socket directory failed.")
- (call-popen `(,(tool 'gpgconf) --remove-socketdir) ""))
- (call-check `(,(tool 'gpg-connect-agent) --verbose --no-autostart
- killagent /bye)))
+ (call-popen `(,(tool 'gpgconf) --remove-socketdir) "")))
+
+
+;; end