]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selftests: user: return Kselftest Skip code for skipped tests
authorShuah Khan (Samsung OSG) <shuah@kernel.org>
Fri, 18 Jan 2019 09:11:17 +0000 (17:11 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Feb 2019 04:53:01 +0000 (04:53 +0000)
commit0670b4f79f07a184547c983a23a4c0379f7cd1a2
tree8cde4ab0cf84eee028b9b93752874f805d3aa8f7
parent83bc8014d6e89c18c0fb7bfb0043adf7697aeb6e
selftests: user: return Kselftest Skip code for skipped tests

BugLink: https://bugs.launchpad.net/bugs/1812198
When user 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. Add an explicit check
for module presence and return skip code if module isn't present.

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>
(cherry picked from commit d7d5311d4aa9611fe1a5a851e6f75733237a668a)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/user/test_user_copy.sh