diff options
| author | Martin KaFai Lau <[email protected]> | 2022-11-07 23:04:19 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-11-11 21:18:23 +0000 |
| commit | 52929912d7bda040b43538e8d88e8d231b76eb4e (patch) | |
| tree | a5f6dd80f986bf53668031b731f2339b632c165e /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | |
| parent | bpf: Add hwtstamp field for the sockops prog (diff) | |
| download | kernel-52929912d7bda040b43538e8d88e8d231b76eb4e.tar.gz kernel-52929912d7bda040b43538e8d88e8d231b76eb4e.zip | |
selftests/bpf: Fix incorrect ASSERT in the tcp_hdr_options test
This patch fixes the incorrect ASSERT test in tcp_hdr_options during
the CHECK to ASSERT macro cleanup.
Fixes: 3082f8cd4ba3 ("selftests/bpf: Convert tcp_hdr_options test to ASSERT_* macros")
Signed-off-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Wang Yufen <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c index 617bbce6ef8f..57191773572a 100644 --- a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c +++ b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c @@ -485,7 +485,7 @@ static void misc(void) goto check_linum; ret = read(sk_fds.passive_fd, recv_msg, sizeof(recv_msg)); - if (ASSERT_EQ(ret, sizeof(send_msg), "read(msg)")) + if (!ASSERT_EQ(ret, sizeof(send_msg), "read(msg)")) goto check_linum; } @@ -539,7 +539,7 @@ void test_tcp_hdr_options(void) goto skel_destroy; cg_fd = test__join_cgroup(CG_NAME); - if (ASSERT_GE(cg_fd, 0, "join_cgroup")) + if (!ASSERT_GE(cg_fd, 0, "join_cgroup")) goto skel_destroy; for (i = 0; i < ARRAY_SIZE(tests); i++) { |
