Skip to content

Commit 62ddb91

Browse files
committed
selftests/seccomp: Flush benchmark output
When running the seccomp benchmark under a test runner, it wouldn't provide any feedback on progress. Set stdout unbuffered. Suggested-by: Will Drewry <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent 93e720d commit 62ddb91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/seccomp/seccomp_benchmark.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ int main(int argc, char *argv[])
143143
unsigned long long native, filter1, filter2, bitmap1, bitmap2;
144144
unsigned long long entry, per_filter1, per_filter2;
145145

146+
setbuf(stdout, NULL);
147+
146148
printf("Current BPF sysctl settings:\n");
147149
system("sysctl net.core.bpf_jit_enable");
148150
system("sysctl net.core.bpf_jit_harden");

0 commit comments

Comments
 (0)