diff options
author | 2020-11-07 12:50:48 +0100 | |
---|---|---|
committer | 2020-11-07 13:20:17 +0100 | |
commit | 666fab4a3ea143315a9c059fad9f3a0f1365d54b (patch) | |
tree | e9e4be3b0eeac79346d52a86183326617d0c9999 /lib/kunit/executor.c | |
parent | Merge branch 'linus' into perf/kprobes (diff) | |
parent | Merge tag 'ceph-for-5.10-rc3' of git://github.com/ceph/ceph-client (diff) | |
download | wireguard-linux-666fab4a3ea143315a9c059fad9f3a0f1365d54b.tar.xz wireguard-linux-666fab4a3ea143315a9c059fad9f3a0f1365d54b.zip |
Merge branch 'linus' into perf/kprobes
Conflicts:
include/asm-generic/atomic-instrumented.h
kernel/kprobes.c
Use the upstream atomic-instrumented.h checksum, and pick
the kprobes version of kernel/kprobes.c, which effectively
reverts this upstream workaround:
645f224e7ba2: ("kprobes: Tell lockdep about kprobe nesting")
Since the new code *should* be fine without nesting.
Knock on wood ...
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/kunit/executor.c')
-rw-r--r-- | lib/kunit/executor.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c new file mode 100644 index 000000000000..a95742a4ece7 --- /dev/null +++ b/lib/kunit/executor.c @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <kunit/test.h> + +/* + * These symbols point to the .kunit_test_suites section and are defined in + * include/asm-generic/vmlinux.lds.h, and consequently must be extern. + */ +extern struct kunit_suite * const * const __kunit_suites_start[]; +extern struct kunit_suite * const * const __kunit_suites_end[]; + +#if IS_BUILTIN(CONFIG_KUNIT) + +static void kunit_print_tap_header(void) +{ + struct kunit_suite * const * const *suites, * const *subsuite; + int num_of_suites = 0; + + for (suites = __kunit_suites_start; + suites < __kunit_suites_end; + suites++) + for (subsuite = *suites; *subsuite != NULL; subsuite++) + num_of_suites++; + + pr_info("TAP version 14\n"); + pr_info("1..%d\n", num_of_suites); +} + +int kunit_run_all_tests(void) +{ + struct kunit_suite * const * const *suites; + + kunit_print_tap_header(); + + for (suites = __kunit_suites_start; + suites < __kunit_suites_end; + suites++) + __kunit_test_suites_init(*suites); + + return 0; +} + +#endif /* IS_BUILTIN(CONFIG_KUNIT) */ |