Commit 52929912 authored by Martin KaFai Lau's avatar Martin KaFai Lau Committed by Andrii Nakryiko
Browse files

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: 3082f8cd ("selftests/bpf: Convert tcp_hdr_options test to ASSERT_* macros")
Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarWang Yufen <wangyufen@huawei.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20221107230420.4192307-3-martin.lau@linux.dev
parent 9bb05349
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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++) {