]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/kselftest/runner.sh: Pass optional command parameters in environment
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 26 Jan 2022 10:32:30 +0000 (10:32 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 24 Feb 2022 00:14:36 +0000 (17:14 -0700)
commit486c6d26c9408dc1f03d5fc6b4666626e28287cc
treef361ebf23d59dea6b69645586e72e9b734e12af1
parent14248f540c2a63979cc0b6d26ba6756218d81baf
selftests/kselftest/runner.sh: Pass optional command parameters in environment

Some testcases allow for optional commandline parameters but as of now
there is now way to provide such arguments to the runner script.

Add support to retrieve such optional command parameters fron environment
variables named so as to include the all-uppercase test executable name,
sanitized substituting any non-acceptable varname characters with "_",
following the pattern:

KSELFTEST_<UPPERCASE_SANITIZED_TEST_NAME>_ARGS="options"

Optional command parameters support is not available if 'tr' is not
installed on the test system.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest/runner.sh