diff options
author | 2019-08-21 16:44:26 -0700 | |
---|---|---|
committer | 2019-08-28 00:35:40 +0200 | |
commit | 62d69f24fe5eca23410b6a21334a7267b0c8838b (patch) | |
tree | 4a52983c85c22384959287d5a0d4a9700664ee19 /tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | |
parent | selftests/bpf: test_progs: remove global fail/success counts (diff) | |
download | linux-62d69f24fe5eca23410b6a21334a7267b0c8838b.tar.gz linux-62d69f24fe5eca23410b6a21334a7267b0c8838b.tar.bz2 linux-62d69f24fe5eca23410b6a21334a7267b0c8838b.zip |
selftests/bpf: test_progs: remove asserts from subtests
Otherwise they can bring the whole process down.
Cc: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c index 9557b7dfb782..f62aa0eb959b 100644 --- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c +++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c @@ -82,9 +82,10 @@ retry: "err %d errno %d\n", err, errno)) goto disable_pmu; - assert(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null") - == 0); - assert(system("taskset 0x1 ./urandom_read 100000") == 0); + if (CHECK_FAIL(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null"))) + goto disable_pmu; + if (CHECK_FAIL(system("taskset 0x1 ./urandom_read 100000"))) + goto disable_pmu; /* disable stack trace collection */ key = 0; val = 1; |