selftests: mptcp: join: fix dev in check_endpoint
BugLink: https://bugs.launchpad.net/bugs/2065400
commit 40061817d95bce6dd5634a61a65cd5922e6ccc92 upstream.
There's a bug in pm_nl_check_endpoint(), 'dev' didn't be parsed correctly.
If calling it in the 2nd test of endpoint_tests() too, it fails with an
error like this:
creation [FAIL] expected '10.0.2.2 id 2 subflow dev dev' \
found '10.0.2.2 id 2 subflow dev ns2eth2'
The reason is '$2' should be set to 'dev', not '$1'. This patch fixes it.
Fixes: 69c6ce7b6e ("selftests: mptcp: add implicit endpoint test case")
Cc: stable@vger.kernel.org
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20240329-upstream-net-20240329-fallback-mib-v1-2-324a8981da48@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
73fe040f89
commit
06736053ab
@@ -773,7 +773,7 @@ pm_nl_check_endpoint()
|
||||
[ -n "$_flags" ]; flags="flags $_flags"
|
||||
shift
|
||||
elif [ $1 = "dev" ]; then
|
||||
[ -n "$2" ]; dev="dev $1"
|
||||
[ -n "$2" ]; dev="dev $2"
|
||||
shift
|
||||
elif [ $1 = "id" ]; then
|
||||
_id=$2
|
||||
@@ -3589,6 +3589,8 @@ endpoint_tests()
|
||||
local tests_pid=$!
|
||||
|
||||
wait_mpj $ns2
|
||||
pm_nl_check_endpoint "creation" \
|
||||
$ns2 10.0.2.2 id 2 flags subflow dev ns2eth2
|
||||
chk_subflow_nr "before delete" 2
|
||||
chk_mptcp_info subflows 1 subflows 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user