From: keescook at chromium.org (Kees Cook)
Subject: [PATCH 5/6] selftests/runner: Distinguish between missing and non-executable
Date: Tue, 9 Apr 2019 16:55:55 -0700 [thread overview]
Message-ID: <20190409235556.3967-6-keescook@chromium.org> (raw)
In-Reply-To: <20190409235556.3967-1-keescook@chromium.org>
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 at chromium.org>
---
tools/testing/selftests/kselftest/runner.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index 7f8d6b127693..5793660dbe3f 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -17,7 +17,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
--
2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: keescook@chromium.org (Kees Cook)
Subject: [PATCH 5/6] selftests/runner: Distinguish between missing and non-executable
Date: Tue, 9 Apr 2019 16:55:55 -0700 [thread overview]
Message-ID: <20190409235556.3967-6-keescook@chromium.org> (raw)
Message-ID: <20190409235555.X1YY_J2I0Ai4xPtWPQjroyxJyJFkwnrroez6lICv6QE@z> (raw)
In-Reply-To: <20190409235556.3967-1-keescook@chromium.org>
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 at chromium.org>
---
tools/testing/selftests/kselftest/runner.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index 7f8d6b127693..5793660dbe3f 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -17,7 +17,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
--
2.17.1
next prev parent reply other threads:[~2019-04-09 23:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 23:55 [PATCH 0/6] selftests: Move test output to diagnostic lines keescook
2019-04-09 23:55 ` Kees Cook
2019-04-09 23:55 ` [PATCH 1/6] selftests: Extract single-test shell logic from lib.mk keescook
2019-04-09 23:55 ` Kees Cook
2019-04-16 23:11 ` shuah
2019-04-16 23:11 ` shuah
2019-04-16 23:16 ` keescook
2019-04-16 23:16 ` Kees Cook
2019-04-16 23:21 ` shuah
2019-04-16 23:21 ` shuah
2019-04-23 22:31 ` keescook
2019-04-23 22:31 ` Kees Cook
2019-04-23 22:47 ` shuah
2019-04-23 22:47 ` shuah
2019-04-24 2:43 ` keescook
2019-04-24 2:43 ` Kees Cook
2019-04-24 2:46 ` shuah
2019-04-24 2:46 ` shuah
2019-04-09 23:55 ` [PATCH 2/6] selftests: Use runner.sh for emit targets keescook
2019-04-09 23:55 ` Kees Cook
2019-04-09 23:55 ` [PATCH 3/6] selftests: Extract logic for multiple test runs keescook
2019-04-09 23:55 ` Kees Cook
2019-04-09 23:55 ` [PATCH 4/6] selftests/runner: Add plan line and fix result line syntax keescook
2019-04-09 23:55 ` Kees Cook
2019-04-09 23:55 ` keescook [this message]
2019-04-09 23:55 ` [PATCH 5/6] selftests/runner: Distinguish between missing and non-executable Kees Cook
2019-04-09 23:55 ` [PATCH 6/6] selftests: Move test output to diagnostic lines keescook
2019-04-09 23:55 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190409235556.3967-6-keescook@chromium.org \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.