Commit fd63b2ea authored by Kees Cook's avatar Kees Cook Committed by Shuah Khan

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: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent b0df366b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment