diff options
author | 2022-05-10 17:52:31 +0200 | |
---|---|---|
committer | 2022-05-10 11:20:45 -0700 | |
commit | 6b2d16b6579acf63456817fda3bc9bf4a35c6a60 (patch) | |
tree | 1cffa5334e828f9576a41a33c8d8a0f3253c04c7 /tools/testing/selftests/bpf/prog_tests/bpf_iter.c | |
parent | bpf: Add bpf_link iterator (diff) | |
download | linux-6b2d16b6579acf63456817fda3bc9bf4a35c6a60.tar.gz linux-6b2d16b6579acf63456817fda3bc9bf4a35c6a60.tar.bz2 linux-6b2d16b6579acf63456817fda3bc9bf4a35c6a60.zip |
selftests/bpf: Fix result check for test_bpf_hash_map
The original condition looks like a typo, verify the skeleton loading
result instead.
Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
Link: https://lore.kernel.org/r/20220510155233.9815-3-9erthalion6@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/bpf_iter.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c index 2c403ddc8076..6943209b7457 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c @@ -629,8 +629,7 @@ static void test_bpf_hash_map(void) skel->bss->in_test_mode = true; err = bpf_iter_bpf_hash_map__load(skel); - if (CHECK(!skel, "bpf_iter_bpf_hash_map__load", - "skeleton load failed\n")) + if (!ASSERT_OK(err, "bpf_iter_bpf_hash_map__load")) goto out; /* iterator with hashmap2 and hashmap3 should fail */ |