selftests: mptcp: userspace: fix v4-v6 test in v6.1
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Tue, 14 Feb 2023 16:05:10 +0000 (17:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:45 +0000 (12:59 +0100)
commit421eea6b41adbeddc236515917f131d39632d7ab
treeecc7b3151c51c84c236a9e3bd492f498ac5b7b16
parent66ec619e4591f8350f99c5269a7ce160cccc7a7c
selftests: mptcp: userspace: fix v4-v6 test in v6.1

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