aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/spinlock.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2019-08-06 20:17:52 -0400
committerAlexei Starovoitov <ast@kernel.org>2019-08-06 20:17:53 -0400
commit682cdbdc216028f5340e48e92e59e3e9503957bb (patch)
tree1822c880732872e2ffb4a9496a4bfaf221da58ce /tools/testing/selftests/bpf/prog_tests/spinlock.c
parent8c30396074c131765b19eb3cb7ff764a4f2f2913 (diff)
parent16e910d4467ccdf1cae5035e71035e5f7197e77d (diff)
Merge branch 'test_progs-stdio'
Stanislav Fomichev says: ==================== I was looking into converting test_sockops* to test_progs framework and that requires using cgroup_helpers.c which rely on stdio/stderr. Let's use open_memstream to override stdout into buffer during subtests instead of custom test_{v,}printf wrappers. That lets us continue to use stdio in the subtests and dump it on failure if required. That would also fix bpf_find_map which currently uses printf to signal failure (missed during test_printf conversion). ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/spinlock.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/spinlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/spinlock.c b/tools/testing/selftests/bpf/prog_tests/spinlock.c
index deb2db5b85b0..114ebe6a438e 100644
--- a/tools/testing/selftests/bpf/prog_tests/spinlock.c
+++ b/tools/testing/selftests/bpf/prog_tests/spinlock.c
@@ -12,7 +12,7 @@ void test_spinlock(void)
12 12
13 err = bpf_prog_load(file, BPF_PROG_TYPE_CGROUP_SKB, &obj, &prog_fd); 13 err = bpf_prog_load(file, BPF_PROG_TYPE_CGROUP_SKB, &obj, &prog_fd);
14 if (err) { 14 if (err) {
15 test__printf("test_spin_lock:bpf_prog_load errno %d\n", errno); 15 printf("test_spin_lock:bpf_prog_load errno %d\n", errno);
16 goto close_prog; 16 goto close_prog;
17 } 17 }
18 for (i = 0; i < 4; i++) 18 for (i = 0; i < 4; i++)