From 518fcf2c27b89ed738a060afdb5f04e802b4dbda Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Mon, 6 Nov 2023 20:55:49 +0800 Subject: [PATCH] Squash to "selftests: mptcp: add mptcp_lib_get_counter" Please add this line into the commit log: ''' Use this helper in test_prio() in userspace_pm.sh too instead of open-coding. ''' Signed-off-by: Geliang Tang --- tools/testing/selftests/net/mptcp/userspace_pm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index f9156f544ebfb2..8d95ea94c01964 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -874,7 +874,7 @@ test_prio() # Check TX print_test "MP_PRIO TX" - count=$(ip netns exec "$ns2" nstat -as | grep MPTcpExtMPPrioTx | awk '{print $2}') + count=$(mptcp_lib_get_counter "$ns2" "MPTcpExtMPPrioTx") [ -z "$count" ] && count=0 if [ $count != 1 ]; then test_fail "Count != 1: ${count}" @@ -884,7 +884,7 @@ test_prio() # Check RX print_test "MP_PRIO RX" - count=$(ip netns exec "$ns1" nstat -as | grep MPTcpExtMPPrioRx | awk '{print $2}') + count=$(mptcp_lib_get_counter "$ns1" "MPTcpExtMPPrioRx") [ -z "$count" ] && count=0 if [ $count != 1 ]; then test_fail "Count != 1: ${count}"