diff options
author | Kees Cook | 2021-05-26 19:46:30 -0700 |
---|---|---|
committer | Kees Cook | 2021-06-28 12:49:52 -0700 |
commit | 62ddb91b7771626658c382c2b849a058f1586123 (patch) | |
tree | 36474f0ec7d5d8205dd3b33cd9212b0a6d4ce3fb /tools | |
parent | 93e720d710dfe689099c23bb91414303cf715d27 (diff) |
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 <wad@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/seccomp/seccomp_benchmark.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/seccomp/seccomp_benchmark.c b/tools/testing/selftests/seccomp/seccomp_benchmark.c index fcc806585266..363cad755042 100644 --- a/tools/testing/selftests/seccomp/seccomp_benchmark.c +++ b/tools/testing/selftests/seccomp/seccomp_benchmark.c @@ -143,6 +143,8 @@ int main(int argc, char *argv[]) unsigned long long native, filter1, filter2, bitmap1, bitmap2; unsigned long long entry, per_filter1, per_filter2; + setbuf(stdout, NULL); + printf("Current BPF sysctl settings:\n"); system("sysctl net.core.bpf_jit_enable"); system("sysctl net.core.bpf_jit_harden"); |