aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-03-06 17:35:50 +0000
committerDavid Howells <dhowells@redhat.com>2014-03-06 17:35:50 +0000
commit2c8f6c0b35aece330356717907a26bd45fb2e354 (patch)
tree0ff6b7195cbc601b5be2ff3acb4ac73803dc515b
parent805b57f8ca39e3e0aa71d487f4cd203524a74eba (diff)
downloadkeyutils-2c8f6c0b35aece330356717907a26bd45fb2e354.tar.gz
TEST: Insert a delay in the key invalidation test to allow for gc delays
The key invalidation test may fail because the check for a key having been invalidated may occur too quickly after the call to invalidate the key. The problem is that whilst the key is marked invalidated immediately, the subsequent process of garbage collecting the invalidated key isn't synchronous and may be delayed as the keyrings gc is merely scheduled to be run at some later time. Stick a small delay in there to give the gc a chance to run. Bugzilla-entry: https://bugzilla.redhat.com/show_bug.cgi?id=1072798 Reported-by: Jan Stancek <jstancek@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--tests/keyctl/invalidate/valid/runtest.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/keyctl/invalidate/valid/runtest.sh b/tests/keyctl/invalidate/valid/runtest.sh
index 46262fd..afc0d3e 100644
--- a/tests/keyctl/invalidate/valid/runtest.sh
+++ b/tests/keyctl/invalidate/valid/runtest.sh
@@ -39,6 +39,9 @@ expect_keyring_rlist rlist $keyid
marker "INVALIDATE KEY"
invalidate_key $keyid
+# need to wait for the gc
+sleep 1
+
# check that it's now empty again
marker "LIST KEYRING 3"
list_keyring $keyringid