Message ID | c709a0184de5824f2ff4ee3e8522ac673c7bea86.1700652422.git.geliang.tang@suse.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | add helpers and vars in mptcp_lib.sh | expand |
Context | Check | Description |
---|---|---|
matttbe/KVM_Validation__normal__except_selftest_mptcp_join_ | success | Success! ✅ |
matttbe/KVM_Validation__debug__except_selftest_mptcp_join_ | success | Success! ✅ |
matttbe/KVM_Validation__debug__only_selftest_mptcp_join_ | success | Success! ✅ |
matttbe/KVM_Validation__normal__only_selftest_mptcp_join_ | success | Success! ✅ |
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 57 lines checked |
matttbe/build | success | Build and static analysis OK |
diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh index ab62737bd501..300aec419dd6 100755 --- a/tools/testing/selftests/net/mptcp/diag.sh +++ b/tools/testing/selftests/net/mptcp/diag.sh @@ -10,7 +10,6 @@ ksft_skip=4 test_cnt=1 timeout_poll=100 timeout_test=$((timeout_poll * 2 + 1)) -ret=0 flush_pids() { diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 98f4e82789ba..5e28292e1889 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -6,7 +6,6 @@ time_start=$(date +%s) optstring="S:R:d:e:l:r:h4cm:f:tC" -ret=0 final_ret=0 sin="" sout="" diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index faaadb2f335c..a6b32104003b 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -12,7 +12,6 @@ . "$(dirname "${0}")/mptcp_lib.sh" -ret=0 sin="" sinfail="" sout="" diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh index bb22dc17b0f0..4ec23a697d00 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh @@ -8,6 +8,8 @@ readonly KSFT_SKIP=4 # shellcheck disable=SC2155 # declare and assign separately readonly KSFT_TEST=$(basename "${0}" | sed 's/\.sh$//g') +ret=0 + MPTCP_LIB_SUBTESTS=() # only if supported (or forced) and not disabled, see no-color.org diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh index 75d8c648f9de..45e5b5810a6a 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh @@ -3,7 +3,6 @@ . "$(dirname "${0}")/mptcp_lib.sh" -ret=0 sin="" sout="" cin="" diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index e995dfca52cc..75c7594dbd71 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -4,7 +4,6 @@ . "$(dirname "${0}")/mptcp_lib.sh" ksft_skip=4 -ret=0 usage() { echo "Usage: $0 [ -h ]" diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 23f5bc0aeaf2..3536c7160ce5 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -13,7 +13,6 @@ ksft_skip=4 timeout_poll=30 timeout_test=$((timeout_poll * 2 + 1)) test_cnt=1 -ret=0 bail=0 slack=50 diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh index c60143133277..108a7548a1ed 100755 --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh @@ -54,7 +54,6 @@ sec=$(date +%s) rndh=$(printf %x "$sec")-$(mktemp -u XXXXXX) ns1="ns1-$rndh" ns2="ns2-$rndh" -ret=0 TEST_NAME="" _printf() {
The variable 'ret' has been defined in every script. This patch moves it into mptcp_lib.sh as a public variable. Signed-off-by: Geliang Tang <geliang.tang@suse.com> --- tools/testing/selftests/net/mptcp/diag.sh | 1 - tools/testing/selftests/net/mptcp/mptcp_connect.sh | 1 - tools/testing/selftests/net/mptcp/mptcp_join.sh | 1 - tools/testing/selftests/net/mptcp/mptcp_lib.sh | 2 ++ tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 1 - tools/testing/selftests/net/mptcp/pm_netlink.sh | 1 - tools/testing/selftests/net/mptcp/simult_flows.sh | 1 - tools/testing/selftests/net/mptcp/userspace_pm.sh | 1 - 8 files changed, 2 insertions(+), 7 deletions(-)