summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-10-16 08:00:46 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-10-17 21:15:08 +0200
commitd25c5e23552d54ebb9eea0de0d8cf9b7a7c5535c (patch)
tree6b657ff5ce821fabe2ef9ceb62d24d16d1796c9f /tools/testing/selftests/bpf/prog_tests
parentselftests/bpf: Teach test_progs to cd into subdir (diff)
downloadlinux-d25c5e23552d54ebb9eea0de0d8cf9b7a7c5535c.tar.xz
linux-d25c5e23552d54ebb9eea0de0d8cf9b7a7c5535c.zip
selftests/bpf: Make CO-RE reloc test impartial to test_progs flavor
test_core_reloc_kernel test captures its own process name and validates it as part of the test. Given extra "flavors" of test_progs, this break for anything by default test_progs binary. Fix the test to cut out flavor part of the process name. Fixes: ee2eb063d330 ("selftests/bpf: Add BPF_CORE_READ and BPF_CORE_READ_STR_INTO macro tests") Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20191016060051.2024182-3-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/core_reloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/core_reloc.c b/tools/testing/selftests/bpf/prog_tests/core_reloc.c
index 7e2f5b4bf7f3..2b3586dc6c86 100644
--- a/tools/testing/selftests/bpf/prog_tests/core_reloc.c
+++ b/tools/testing/selftests/bpf/prog_tests/core_reloc.c
@@ -211,8 +211,8 @@ static struct core_reloc_test_case test_cases[] = {
.input_len = 0,
.output = STRUCT_TO_CHAR_PTR(core_reloc_kernel_output) {
.valid = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, },
- .comm = "test_progs\0\0\0\0\0",
- .comm_len = 11,
+ .comm = "test_progs",
+ .comm_len = sizeof("test_progs"),
},
.output_len = sizeof(struct core_reloc_kernel_output),
},