diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-06 16:11:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-06 16:11:51 -0400 |
commit | ca95bf62fcf528a0d8069731d39303ba43fb9af4 (patch) | |
tree | e5d746396a7aa08efecd69bf8917c23810797efe /tools/testing/selftests/kvm/lib/assert.c | |
parent | 0ad39cb3d70fb4324d127aeceee7f63e3f71605c (diff) | |
parent | fa32156921daa5c175228e2cac7679d50efd6c52 (diff) |
Merge tag 'linux-kselftest-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest update from Shuah Khan:
- Work to restructure timers test suite to move PIE out of rtctest from
Alexandre Belloni.
- Several minor spelling and bug fixes.
- New cgroup tests from Roman Gushchin and Mike Rapoport.
- Kselftest framework changes to handle and report skipped tests
correctly.
Prior to these changes, framework treated all non-zero return codes
from tests as failures. When tests are skipped with non-zero return
code, due to unmet dependencies and/or unsupported configuration,
reporting them as failed lead to false negatives on the tests that
couldn't be run.
- Fixes to test Makefiles to remove unnecessary RUN_TESTS and
EMIT_TESTS overrides and use common defines from lib.mk.
- Fixes to several tests to return correct Kselftest skip code.
- Changes to improve test output.
* tag 'linux-kselftest-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (55 commits)
selftests: lib: fix prime_numbers module search and skip logic
selftests: intel_pstate: notification about privilege required to run intel_pstate testing script
selftests: cgroup/memcontrol: add basic test for socket accounting
selftest: intel_pstate: debug support message from aperf.c and return value
kselftest/cgroup: fix variable dereferenced before check warning
selftests/intel_pstate: Enhance table printing
selftests/intel_pstate: Improve test, minor fixes
selftests: cgroup/memcontrol: add basic test for swap controls
selftests: cgroup: add memory controller self-tests
selftests: memfd: split regular and hugetlbfs tests
selftests: net: return Kselftest Skip code for skipped tests
selftests: mqueue: return Kselftest Skip code for skipped tests
selftests: memory-hotplug: return Kselftest Skip code for skipped tests
selftests: memfd: return Kselftest Skip code for skipped tests
selftests: membarrier: return Kselftest Skip code for skipped tests
selftests: media_tests: return Kselftest Skip code for skipped tests
selftests: locking: return Kselftest Skip code for skipped tests
selftests: locking: add Makefile for locking test
selftests: lib: return Kselftest Skip code for skipped tests
selftests: lib: add prime_numbers.sh test to Makefile
...
Diffstat (limited to 'tools/testing/selftests/kvm/lib/assert.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/assert.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/lib/assert.c b/tools/testing/selftests/kvm/lib/assert.c index c9f5b7d4ce38..cd01144d27c8 100644 --- a/tools/testing/selftests/kvm/lib/assert.c +++ b/tools/testing/selftests/kvm/lib/assert.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <execinfo.h> | 13 | #include <execinfo.h> |
14 | #include <sys/syscall.h> | 14 | #include <sys/syscall.h> |
15 | 15 | ||
16 | #include "../../kselftest.h" | ||
17 | |||
16 | /* Dumps the current stack trace to stderr. */ | 18 | /* Dumps the current stack trace to stderr. */ |
17 | static void __attribute__((noinline)) test_dump_stack(void); | 19 | static void __attribute__((noinline)) test_dump_stack(void); |
18 | static void test_dump_stack(void) | 20 | static void test_dump_stack(void) |
@@ -70,8 +72,9 @@ test_assert(bool exp, const char *exp_str, | |||
70 | 72 | ||
71 | fprintf(stderr, "==== Test Assertion Failure ====\n" | 73 | fprintf(stderr, "==== Test Assertion Failure ====\n" |
72 | " %s:%u: %s\n" | 74 | " %s:%u: %s\n" |
73 | " pid=%d tid=%d\n", | 75 | " pid=%d tid=%d - %s\n", |
74 | file, line, exp_str, getpid(), gettid()); | 76 | file, line, exp_str, getpid(), gettid(), |
77 | strerror(errno)); | ||
75 | test_dump_stack(); | 78 | test_dump_stack(); |
76 | if (fmt) { | 79 | if (fmt) { |
77 | fputs(" ", stderr); | 80 | fputs(" ", stderr); |
@@ -80,6 +83,8 @@ test_assert(bool exp, const char *exp_str, | |||
80 | } | 83 | } |
81 | va_end(ap); | 84 | va_end(ap); |
82 | 85 | ||
86 | if (errno == EACCES) | ||
87 | ksft_exit_skip("Access denied - Exiting.\n"); | ||
83 | exit(254); | 88 | exit(254); |
84 | } | 89 | } |
85 | 90 | ||