aboutsummaryrefslogtreecommitdiff
path: root/tests/agent-pkcs11.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/agent-pkcs11.testscript')
-rw-r--r--tests/agent-pkcs11.testscript18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/agent-pkcs11.testscript b/tests/agent-pkcs11.testscript
index de7ecf2..31a4d9f 100644
--- a/tests/agent-pkcs11.testscript
+++ b/tests/agent-pkcs11.testscript
@@ -39,10 +39,20 @@
echo Agent pid $pid
EOO
- kill -0 "$pid"; # Make sure the agent is running.
- kill "$pid"; # Signal the agent to terminate.
- sleep 2; # Wait a bit while the agent is terminating.
- kill -0 "$pid" 2>! != 0 # Make sure the agent is not running.
+ kill -0 "$pid"; # Make sure the agent is running.
+ kill "$pid"; # Signal the agent to terminate.
+ sleep 2; # Wait a bit while the agent is terminating.
+
+ # Make sure the agent is not running.
+ #
+ # Normally two seconds should be enough for the agent to terminate. It can
+ # probably take longer in some rear cases, but not being able to terminate
+ # in ten seconds most likely indicates an issue.
+ #
+ if kill -0 "$pid" 2>!
+ sleep 8
+ kill -0 "$pid" 2>! != 0
+ end
}
}