summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2019-08-29 16:43:21 -0400
committerDavid Howells <dhowells@redhat.com>2019-09-04 10:47:43 +0100
commit7e34f5795b8fb35e95356a12dceeb714c1aa7f93 (patch)
tree2f45e707a83fba3d02f25e6aecd2b3951c3fbf69
parent11831c5de44f9dec5f42f172cec5189fad60573c (diff)
downloadkeyutils-7e34f5795b8fb35e95356a12dceeb714c1aa7f93.tar.gz
tests/search: test searching with a mismatched type
This should fail because the actually found key has a type mismatch. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--tests/keyctl/search/valid/runtest.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/keyctl/search/valid/runtest.sh b/tests/keyctl/search/valid/runtest.sh
index d60ea61..a9912ee 100644
--- a/tests/keyctl/search/valid/runtest.sh
+++ b/tests/keyctl/search/valid/runtest.sh
@@ -32,6 +32,11 @@ expect_error ENOKEY
marker "SEARCH SESSION"
search_for_key --expect=$keyid @s user lizard
+# search the session keyring for the key using the wrong type
+marker "SEARCH SESSION USING WRONG TYPE"
+search_for_key --fail @s keyring lizard $keyring2id
+expect_error ENOKEY
+
# search the session keyring for the key and attach to second keyring
marker "SEARCH SESSION AND ATTACH"
search_for_key --expect=$keyid @s user lizard $keyring2id