selftests: zram: return Kselftest Skip code for skipped tests
authorShuah Khan (Samsung OSG) <shuah@kernel.org>
Thu, 14 Jun 2018 22:56:13 +0000 (16:56 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:12:27 +0000 (13:12 +0200)
commitdd91188f5611657c16c064fd0d739a994b8262f8
tree57c2e7e6e277a26f705e022eda1e11b14ab59482
parentdbd816e106229adb3ded86ce233878962bd2b469
selftests: zram: return Kselftest Skip code for skipped tests

[ Upstream commit 685814466bf8398192cf855415a0bb2cefc1930e ]

When zram test is skipped because of unmet dependencies and/or
unsupported configuration, it exits with error which is treated as
a fail by the Kselftest framework. This leads to false negative 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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/zram/zram.sh
tools/testing/selftests/zram/zram_lib.sh