diff options
author | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-05-03 16:34:22 -0600 |
---|---|---|
committer | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-05-30 15:21:52 -0600 |
commit | a6a9be9270c871b22725c34de35a21d918867672 (patch) | |
tree | 741482531745194d467871f7076da24f7dbf61f0 /tools/testing/selftests/firmware/fw_fallback.sh | |
parent | 7357dcf2ef2811156fdf223a9a27f73528934e1f (diff) |
selftests: firmware: return Kselftest Skip code for skipped tests
When firmware test(s) get 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: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing/selftests/firmware/fw_fallback.sh')
-rwxr-xr-x | tools/testing/selftests/firmware/fw_fallback.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/firmware/fw_fallback.sh b/tools/testing/selftests/firmware/fw_fallback.sh index 8e2e34a2ca69..70d18be46af5 100755 --- a/tools/testing/selftests/firmware/fw_fallback.sh +++ b/tools/testing/selftests/firmware/fw_fallback.sh @@ -74,7 +74,7 @@ load_fw_custom() { if [ ! -e "$DIR"/trigger_custom_fallback ]; then echo "$0: custom fallback trigger not present, ignoring test" >&2 - return 1 + exit $ksft_skip fi local name="$1" @@ -107,7 +107,7 @@ load_fw_custom_cancel() { if [ ! -e "$DIR"/trigger_custom_fallback ]; then echo "$0: canceling custom fallback trigger not present, ignoring test" >&2 - return 1 + exit $ksft_skip fi local name="$1" |