]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.1
authorSasha Levin <sashal@kernel.org>
Wed, 15 Feb 2023 16:51:00 +0000 (11:51 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 15 Feb 2023 16:51:00 +0000 (11:51 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.1/selftests-mptcp-userspace-fix-v4-v6-test-in-v6.1.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/selftests-mptcp-userspace-fix-v4-v6-test-in-v6.1.patch b/queue-6.1/selftests-mptcp-userspace-fix-v4-v6-test-in-v6.1.patch
new file mode 100644 (file)
index 0000000..3a080cb
--- /dev/null
@@ -0,0 +1,67 @@
+From 04528d9a108fc192a924a1387bc873aecd9ab9fa Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 14 Feb 2023 17:05:10 +0100
+Subject: selftests: mptcp: userspace: fix v4-v6 test in v6.1
+
+From: Matthieu Baerts <matthieu.baerts@tessares.net>
+
+The commit 4656d72c1efa ("selftests: mptcp: userspace: validate v4-v6 subflows mix")
+has been backported to v6.1.8 without any conflicts. But it looks like
+it was depending on a previous one:
+
+  commit 1cc94ac1af4b ("selftests: mptcp: make evts global in userspace_pm")
+
+Without it, the test fails with:
+
+  ./userspace_pm.sh: line 788: : No such file or directory
+  # ADD_ADDR4 id:14 10.0.2.1 (ns1) => ns2, reuse port        [FAIL]
+  sed: can't read : No such file or directory
+
+This dependence refactors the way the monitoring files are being
+created: only once for all the different sub-tests instead of per
+sub-test.
+
+It is probably better to avoid backporting the refactoring. That is why
+the new sub-test has been adapted to work using the previous way that is
+still in place here in v6.1: the monitoring is started at the beginning
+of each sub-test and the created file is removed at the end.
+
+Fixes: f59549814a64 ("selftests: mptcp: userspace: validate v4-v6 subflows mix")
+Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/testing/selftests/net/mptcp/userspace_pm.sh | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
+index 0040e3bc7b16e..ad6547c79b831 100755
+--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
++++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
+@@ -778,6 +778,14 @@ test_subflows()
+ test_subflows_v4_v6_mix()
+ {
++      local client_evts
++      client_evts=$(mktemp)
++      # Capture events on the network namespace running the client
++      :>"$client_evts"
++      ip netns exec "$ns2" ./pm_nl_ctl events >> "$client_evts" 2>&1 &
++      evts_pid=$!
++      sleep 0.5
++
+       # Attempt to add a listener at 10.0.2.1:<subflow-port>
+       ip netns exec "$ns1" ./pm_nl_ctl listen 10.0.2.1\
+          $app6_port > /dev/null 2>&1 &
+@@ -820,6 +828,9 @@ test_subflows_v4_v6_mix()
+       ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
+          "$server6_token" > /dev/null 2>&1
+       sleep 0.5
++
++      kill_wait $evts_pid
++      rm -f "$client_evts"
+ }
+ test_prio()
+-- 
+2.39.0
+
index 48a33a372bf351dfc7c713fecaaaca998e551510..6548dd9c640d6c59e5bd9952c1e7c2d2730d0329 100644 (file)
@@ -45,3 +45,4 @@ drm-amd-display-properly-handle-additional-cases-whe.patch
 platform-x86-touchscreen_dmi-add-chuwi-vi8-cwi501-dm.patch
 ceph-move-mount-state-enum-to-super.h.patch
 ceph-blocklist-the-kclient-when-receiving-corrupted-.patch
+selftests-mptcp-userspace-fix-v4-v6-test-in-v6.1.patch