summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2019-04-24 16:12:34 -0700
committerShuah Khan <skhan@linuxfoundation.org>2019-04-25 13:15:10 -0600
commitfd63b2eae5f6ff91ab60819ef083136aebb0e88b (patch)
treee409017adbb0d58c622b5e495c3d12995aae4dcc /tools/testing/selftests
parentb0df366bbd701c45e93af0dcb87ce22398589d1d (diff)
downloadlinux-stable-fd63b2eae5f6ff91ab60819ef083136aebb0e88b.tar.gz
linux-stable-fd63b2eae5f6ff91ab60819ef083136aebb0e88b.tar.bz2
linux-stable-fd63b2eae5f6ff91ab60819ef083136aebb0e88b.zip
selftests: Distinguish between missing and non-executable
If a test was missing (e.g. wrong architecture, etc), the test runner would incorrectly claim the test was non-executable. This adds an existence check to report correctly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r--tools/testing/selftests/kselftest/runner.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index e0621974e01e..a66fb64e61e9 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -19,7 +19,12 @@ run_one()
echo "$TEST_HDR_MSG"
echo "========================================"
if [ ! -x "$TEST" ]; then
- echo "$TEST_HDR_MSG: Warning: file $TEST is not executable, correct this."
+ echo -n "$TEST_HDR_MSG: Warning: file $TEST is "
+ if [ ! -e "$TEST" ]; then
+ echo "missing!"
+ else
+ echo "not executable, correct this."
+ fi
echo "not ok $test_num $TEST_HDR_MSG"
else
cd `dirname $TEST` > /dev/null