Commit 5c2ae98b authored by Shuah Khan (Samsung OSG)'s avatar Shuah Khan (Samsung OSG) Committed by Kleber Sacilotto de Souza

selftests: efivarfs: return Kselftest Skip code for skipped tests

BugLink: https://bugs.launchpad.net/bugs/1809704

When efivarfs test is skipped because of unmet dependencies and/or
unsupported configuration, it returns 0 which is treated as a pass
by the Kselftest framework. This leads to false positive result even
when the test could not be run.

Change it to return kselftest skip code when a test gets skipped to
clearly report that the test could not be run.

Kselftest framework SKIP code is 4 and the framework prints appropriate
messages to indicate that the test is skipped.
Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
(backported from commit 1f0ea958)
[PHLin: return 0 as the framework can't handle ksft_skip]
Signed-off-by: default avatarPo-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e45de47d
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
efivarfs_mount=/sys/firmware/efi/efivars efivarfs_mount=/sys/firmware/efi/efivars
test_guid=210be57c-9849-4fc7-a635-e6382d1aec27 test_guid=210be57c-9849-4fc7-a635-e6382d1aec27
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
check_prereqs() check_prereqs()
{ {
local msg="skip all tests:" local msg="skip all tests:"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment