Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1717692 > unrolled thread
| Started by | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| First post | 2017-08-22 21:20 +0200 |
| Last post | 2017-08-22 21:20 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] selftests: kselftest framework: change skip exit code to 0 Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-22 21:20 +0200
[PATCH] selftests: lib.mk: suppress "cd" output from run_tests target Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-22 21:20 +0200
[PATCH] selftests: timers: suppress "cd" output from run_destructive_tests target Shuah Khan <shuahkh@osg.samsung.com> - 2017-08-22 21:20 +0200
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2017-08-22 21:20 +0200 |
| Subject | [PATCH] selftests: kselftest framework: change skip exit code to 0 |
| Message-ID | <uhmSv-6HP-39@gated-at.bofh.it> |
When a test is skipped, instead of using a special exit code of 4, treat
it as pass condition and use exit code of 0. It makes sense to treat skip
as pass since the test couldn't be run as opposed to a failed test.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/kselftest.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index e2714d0a1452..1ae565ed9bf0 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -19,7 +19,8 @@
#define KSFT_FAIL 1
#define KSFT_XFAIL 2
#define KSFT_XPASS 3
-#define KSFT_SKIP 4
+/* Treat skip as pass */
+#define KSFT_SKIP KSFT_PASS
/* counters */
struct ksft_count {
--
2.11.0
[toc] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2017-08-22 21:20 +0200 |
| Subject | [PATCH] selftests: lib.mk: suppress "cd" output from run_tests target |
| Message-ID | <uhmSx-6HP-79@gated-at.bofh.it> |
| In reply to | #1717692 |
Suppress "cd" output from run_tests while running tests to declutter the test results. Running efivarfs test: make --silent -C tools/testing/selftests/efivarfs/ run_tests Before the change: skip all tests: must be run as root selftests: efivarfs.sh [PASS] /lkml/linux-kselftest/tools/testing/selftests/efivarfs After the change: skip all tests: must be run as root selftests: efivarfs.sh [PASS] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index e71f8e4633b1..02989b2465a3 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -18,7 +18,7 @@ define RUN_TESTS echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\ echo "selftests: $$BASENAME_TEST [FAIL]"; \ else \ - cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd -;\ + cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\ fi; \ done; endef -- 2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2017-08-22 21:20 +0200 |
| Subject | [PATCH] selftests: timers: suppress "cd" output from run_destructive_tests target |
| Message-ID | <uhmSy-6HP-109@gated-at.bofh.it> |
| In reply to | #1717692 |
Suppress "cd" output from run_destructive_tests while running tests to declutter the test results. Running timers run_destructive_tests: make --silent -C tools/testing/selftests/timers run_destructive_tests Before the change: /lkml/linux_4.13/tools/testing/selftests/timers ntpd: no process found Maybe you're not running as root? selftests: change_skew [FAIL] /lkml/linux_4.13/tools/testing/selftests/timers After the change: ntpd: no process found Maybe you're not running as root? selftests: change_skew [FAIL] Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> --- tools/testing/selftests/timers/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile index 6c1327278d5f..4ed9e45c7f38 100644 --- a/tools/testing/selftests/timers/Makefile +++ b/tools/testing/selftests/timers/Makefile @@ -20,7 +20,7 @@ define RUN_DESTRUCTIVE_TESTS echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\ echo "selftests: $$BASENAME_TEST [FAIL]"; \ else \ - cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd -;\ + cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\ fi; \ done; endef -- 2.11.0
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web