[PATCH mptcp-next v8 4/5] Squash to "selftests: bpf: add MPTCP test base"

Geliang Tang posted 5 patches 3 years, 11 months ago
Maintainers: Alexei Starovoitov <ast@kernel.org>, "David S. Miller" <davem@davemloft.net>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, KP Singh <kpsingh@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, Shuah Khan <shuah@kernel.org>, Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>, Martin KaFai Lau <kafai@fb.com>, Mat Martineau <mathew.j.martineau@linux.intel.com>
There is a newer version of this series
[PATCH mptcp-next v8 4/5] Squash to "selftests: bpf: add MPTCP test base"
Posted by Geliang Tang 3 years, 11 months ago
Some cleanups.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 04aef0f147dc..87ee7bd8a689 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -13,12 +13,6 @@ static int verify_sk(int map_fd, int client_fd, const char *msg, __u32 is_mptcp)
 	int err = 0, cfd = client_fd;
 	struct mptcp_storage val;
 
-	/* Currently there is no easy way to get back the subflow sk from the MPTCP
-	 * sk, thus we cannot access here the sk_storage associated to the subflow
-	 * sk. Also, there is no sk_storage associated with the MPTCP sk since it
-	 * does not trigger sockops events.
-	 * We silently pass this situation at the moment.
-	 */
 	if (is_mptcp == 1)
 		return 0;
 
@@ -28,14 +22,14 @@ static int verify_sk(int map_fd, int client_fd, const char *msg, __u32 is_mptcp)
 	}
 
 	if (val.invoked != 1) {
-		log_err("%s: unexpected invoked count %d != %d",
-			msg, val.invoked, 1);
+		log_err("%s: unexpected invoked count %d != 1",
+			msg, val.invoked);
 		err++;
 	}
 
-	if (val.is_mptcp != is_mptcp) {
-		log_err("%s: unexpected bpf_tcp_sock.is_mptcp %d != %d",
-			msg, val.is_mptcp, is_mptcp);
+	if (val.is_mptcp != 0) {
+		log_err("%s: unexpected bpf_tcp_sock.is_mptcp %d != 0",
+			msg, val.is_mptcp);
 		err++;
 	}
 
-- 
2.34.1