diff mbox series

[mptcp-next,v2] Squash to "selftests: mptcp: add mptcp_lib_get_counter"

Message ID a345cc5ff04729307b7b5b3a26f81e4e653dbefb.1699408002.git.geliang.tang@suse.com (mailing list archive)
State Accepted, archived
Commit e26f5d7bb3841ddf83030f1cb81e3a6500ddbc6a
Delegated to: Matthieu Baerts
Headers show
Series [mptcp-next,v2] Squash to "selftests: mptcp: add mptcp_lib_get_counter" | expand

Checks

Context Check Description
matttbe/build success Build and static analysis OK
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 lines checked
matttbe/KVM_Validation__normal__except_selftest_mptcp_join_ success Success! ✅
matttbe/KVM_Validation__debug__except_selftest_mptcp_join_ warning Unstable: 1 failed test(s): packetdrill_mp_join
matttbe/KVM_Validation__normal__only_selftest_mptcp_join_ success Success! ✅
matttbe/KVM_Validation__debug__only_selftest_mptcp_join_ success Success! ✅

Commit Message

Geliang Tang Nov. 8, 2023, 1:47 a.m. UTC
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 <geliang.tang@suse.com>
---
 v2:
 - add test_skip
---
 tools/testing/selftests/net/mptcp/userspace_pm.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

MPTCP CI Nov. 8, 2023, 2:59 a.m. UTC | #1
Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/4930056766619648
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/4930056766619648/summary/summary.txt

- KVM Validation: debug (except selftest_mptcp_join):
  - Unstable: 1 failed test(s): packetdrill_mp_join 
Matthieu Baerts (NGI0) Nov. 8, 2023, 10:44 a.m. UTC | #2
Hi Geliang,

On 08/11/2023 02:47, Geliang Tang wrote:
> Please add this line into the commit log:
> 
> '''
> Use this helper in test_prio() in userspace_pm.sh too instead of
> open-coding.
> '''

Thank you for the new version. It looks good to me!

New patches for t/upstream:
- e26f5d7bb384: Squash to "selftests: mptcp: add mptcp_lib_get_counter"
- 0b2fef7131ad: tg:msg: update after the recent squash-to patch
- Results: 15e4d31937fc..4d89b70d7306 (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20231108T104316

Cheers,
Matt
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
index f9156f544ebf..6167837f48e1 100755
--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
+++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
@@ -874,9 +874,10 @@  test_prio()
 
 	# Check TX
 	print_test "MP_PRIO TX"
-	count=$(ip netns exec "$ns2" nstat -as | grep MPTcpExtMPPrioTx | awk '{print $2}')
-	[ -z "$count" ] && count=0
-	if [ $count != 1 ]; then
+	count=$(mptcp_lib_get_counter "$ns2" "MPTcpExtMPPrioTx")
+	if [ -z "$count" ]; then
+		test_skip
+	elif [ $count != 1 ]; then
 		test_fail "Count != 1: ${count}"
 	else
 		test_pass
@@ -884,9 +885,10 @@  test_prio()
 
 	# Check RX
 	print_test "MP_PRIO RX"
-	count=$(ip netns exec "$ns1" nstat -as | grep MPTcpExtMPPrioRx | awk '{print $2}')
-	[ -z "$count" ] && count=0
-	if [ $count != 1 ]; then
+	count=$(mptcp_lib_get_counter "$ns1" "MPTcpExtMPPrioRx")
+	if [ -z "$count" ]; then
+		test_skip
+	elif [ $count != 1 ]; then
 		test_fail "Count != 1: ${count}"
 	else
 		test_pass