Some cleanups:
- Make the sysctl command working with busybox too.
- Set scheduler to default after test.
- Fix the checkpatch.pl warning:
WARNING: Avoid line continuations in quoted strings
+ system("ip link add veth1 type veth; \
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/bpf/prog_tests/mptcp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 0768eb850b6c..cc65e9afb796 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -393,11 +393,11 @@ static void test_rr(void)
return;
}
- system("ip link add veth1 type veth; \
- ip addr add 10.0.1.1/24 dev veth1; \
- ip link set veth1 up");
+ system("ip link add veth1 type veth");
+ system("ip addr add 10.0.1.1/24 dev veth1");
+ system("ip link set veth1 up");
system("ip mptcp endpoint add 10.0.1.1 subflow");
- system("sysctl -q net.mptcp.scheduler=bpf_rr");
+ system("sysctl -qw net.mptcp.scheduler=bpf_rr");
server_fd = start_mptcp_server(AF_INET, NULL, 0, 0);
client_fd = connect_to_mptcp_fd(server_fd, 0);
@@ -405,6 +405,7 @@ static void test_rr(void)
close(client_fd);
close(server_fd);
+ system("sysctl -qw net.mptcp.scheduler=default");
system("ip mptcp endpoint flush");
system("ip link del veth1");
bpf_link__destroy(link);
--
2.34.1