summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_progs.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-03-14 04:39:32 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-03-17 21:31:13 +0300
commitfd27b1835e7079d26809cd4d33ba98f84e593766 (patch)
treefd8f222a6926caed7a675f7cd86bb98fa904188c /tools/testing/selftests/bpf/test_progs.h
parentfc32490bff855a539d253c8a52c5a1ba51d1325a (diff)
downloadlinux-fd27b1835e7079d26809cd4d33ba98f84e593766.tar.xz
selftests/bpf: Reset process and thread affinity after each test/sub-test
Some tests and sub-tests are setting "custom" thread/process affinity and don't reset it back. Instead of requiring each test to undo all this, ensure that thread affinity is restored by test_progs test runner itself. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200314013932.4035712-3-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_progs.h')
-rw-r--r--tools/testing/selftests/bpf/test_progs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
index fd85fa61dbf7..f4aff6b8284b 100644
--- a/tools/testing/selftests/bpf/test_progs.h
+++ b/tools/testing/selftests/bpf/test_progs.h
@@ -71,6 +71,7 @@ struct test_env {
FILE *stderr;
char *log_buf;
size_t log_cnt;
+ int nr_cpus;
int succ_cnt; /* successful tests */
int sub_succ_cnt; /* successful sub-tests */