summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-08-22 02:44:26 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-08-28 01:35:40 +0300
commit62d69f24fe5eca23410b6a21334a7267b0c8838b (patch)
tree4a52983c85c22384959287d5a0d4a9700664ee19 /tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c
parentd38835b75f67df16cef65c14aa64796a1832e6b4 (diff)
downloadlinux-62d69f24fe5eca23410b6a21334a7267b0c8838b.tar.xz
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.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c
index ac44fda84833..d841dced971f 100644
--- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c
+++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id.c
@@ -51,9 +51,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("./urandom_read") == 0);
+ if (CHECK_FAIL(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null")))
+ goto disable_pmu;
+ if (CHECK_FAIL(system("./urandom_read")))
+ goto disable_pmu;
/* disable stack trace collection */
key = 0;
val = 1;