selftests/run_kselftest.sh: Make each test individually selectable
authorKees Cook <keescook@chromium.org>
Mon, 28 Sep 2020 20:26:49 +0000 (13:26 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 7 Oct 2020 13:59:15 +0000 (07:59 -0600)
commit5da1918446a1d50d57f2f6062f7fdede0b052473
tree1eee530b5d54455c9a939f042831d84a3856c457
parentf0f0a5df4e081e7a659929303fe83450edce9a3e
selftests/run_kselftest.sh: Make each test individually selectable

Currently with run_kselftest.sh there is no way to choose which test
we could run. All the tests listed in kselftest-list.txt are all run
every time. This patch enhanced the run_kselftest.sh to make the test
collections (or tests) individually selectable. e.g.:

$ ./run_kselftest.sh -c seccomp -t timers:posix_timers -t timers:nanosleep

Additionally adds a way to list all known tests with "-l", usage
with "-h", and perform a dry run without running tests with "-n".

Co-developed-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/run_kselftest.sh