Skip to content

Commit a4e21ff

Browse files
liu-song-6borkmann
authored andcommitted
bpf: minor fix to selftest test_stacktrace_build_id()
1. remove useless parameter list to ./urandom_read 2. add missing "\n" to the end of an error message Fixes: 81f77fd ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID") Cc: Alexei Starovoitov <[email protected]> Cc: Daniel Borkmann <[email protected]> Signed-off-by: Song Liu <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 8154255 commit a4e21ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/test_progs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ static void test_stacktrace_build_id(void)
11081108

11091109
assert(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null")
11101110
== 0);
1111-
assert(system("./urandom_read if=/dev/urandom of=/dev/zero count=4 2> /dev/null") == 0);
1111+
assert(system("./urandom_read") == 0);
11121112
/* disable stack trace collection */
11131113
key = 0;
11141114
val = 1;
@@ -1158,7 +1158,7 @@ static void test_stacktrace_build_id(void)
11581158
} while (bpf_map_get_next_key(stackmap_fd, &previous_key, &key) == 0);
11591159

11601160
CHECK(build_id_matches < 1, "build id match",
1161-
"Didn't find expected build ID from the map");
1161+
"Didn't find expected build ID from the map\n");
11621162

11631163
disable_pmu:
11641164
ioctl(pmu_fd, PERF_EVENT_IOC_DISABLE);

0 commit comments

Comments
 (0)