diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2019-08-28 00:35:40 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-08-28 00:35:40 +0200 |
commit | 7bc7d83870b2bcbdd10e85935fc435e9d5d15659 (patch) | |
tree | 655d18d477eac4e67179af7be663a04050bd1f6b /tools/testing/selftests/bpf/prog_tests/queue_stack_map.c | |
parent | 08eea4f312c09e1c203ad3e7840978fe3240888e (diff) | |
parent | 86ccc384cfcac22f45b1158b57d9ef5b4079e027 (diff) |
Merge branch 'bpf-misc-test-fixes'
Stanislav Fomichev says:
====================
* add test__skip to indicate skipped tests
* remove global success/error counts (use environment)
* remove asserts from the tests
* remove unused ret from send_signal test
v3:
* QCHECK -> CHECK_FAIL (Daniel Borkmann)
v2:
* drop patch that changes output to keep consistent with test_verifier
(Alexei Starovoitov)
* QCHECK instead of test__fail (Andrii Nakryiko)
* test__skip count number of subtests (Andrii Nakryiko)
====================
Cc: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/queue_stack_map.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/queue_stack_map.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c b/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c index e60cd5ff1f55..faccc66f4e39 100644 --- a/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c +++ b/tools/testing/selftests/bpf/prog_tests/queue_stack_map.c @@ -27,10 +27,8 @@ static void test_queue_stack_map_by_type(int type) return; err = bpf_prog_load(file, BPF_PROG_TYPE_SCHED_CLS, &obj, &prog_fd); - if (err) { - error_cnt++; + if (CHECK_FAIL(err)) return; - } map_in_fd = bpf_find_map(__func__, obj, "map_in"); if (map_in_fd < 0) @@ -43,10 +41,8 @@ static void test_queue_stack_map_by_type(int type) /* Push 32 elements to the input map */ for (i = 0; i < MAP_SIZE; i++) { err = bpf_map_update_elem(map_in_fd, NULL, &vals[i], 0); - if (err) { - error_cnt++; + if (CHECK_FAIL(err)) goto out; - } } /* The eBPF program pushes iph.saddr in the output map, |