Skip to content

Commit

Permalink
test: Skip trusted test if keyctl cannot load user key.
Browse files Browse the repository at this point in the history
Some very old systems do not support -x option for keyctl,
skip the test in this case.
  • Loading branch information
mbroz committed Nov 26, 2024
1 parent 0805cc0 commit 82bee1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/keyring-trusted-test
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ modprobe encrypted-keys 2>/dev/null || skip "Failed to load encrypted keys kerne

# Encrypted keyring key (encrypted with user key)
# User key needed for encrypted key
keyctl add -x user $KEYNAME bb21158c733229347bd4e681891e213d94c685be6a5b84818afe7a78a6de7a1a @s >/dev/null || fail "User key failed."
keyctl add -x user $KEYNAME bb21158c733229347bd4e681891e213d94c685be6a5b84818afe7a78a6de7a1a @s >/dev/null 2>&1 || skip "User key load failed, test skipped."
keyctl print %user:$KEYNAME >/dev/null || fail "Cannot read user key."

keyctl add encrypted $KEYNAME "new user:$KEYNAME 32" @s >/dev/null || fail "Encrypted keys are not supported."
Expand Down

0 comments on commit 82bee1c

Please sign in to comment.