mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
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>
This commit is contained in:
parent
b0df366bbd
commit
fd63b2eae5
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue