Skip to content

Commit 82bee1c

Browse files
committed
test: Skip trusted test if keyctl cannot load user key.
Some very old systems do not support -x option for keyctl, skip the test in this case.
1 parent 0805cc0 commit 82bee1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/keyring-trusted-test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ modprobe encrypted-keys 2>/dev/null || skip "Failed to load encrypted keys kerne
151151

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

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

0 commit comments

Comments
 (0)