.../testing/selftests/net/mptcp/mptcp_join.sh | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-)
Reflect the ns_invert.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v4:
- show extra_msg after dump_stats
v3:
- add extra_msg
v2:
- update the output message from
rtx[ ok ] - rstrx [ ok ] - invert
to
rtx[ ok ] - rstrx [ ok ] invert
---
.../testing/selftests/net/mptcp/mptcp_join.sh | 21 +++++++------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 3252865352f3..644db851a56c 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -809,13 +809,14 @@ chk_rst_nr()
local ns_invert=${3:-""}
local count
local dump_stats
+ local ns_tx=$ns1
+ local ns_rx=$ns2
+ local extra_msg=""
- if [ -z $ns_invert ]; then
- ns_tx=$ns1
- ns_rx=$ns2
- elif [ $ns_invert = "invert" ]; then
+ if [[ $ns_invert = "invert" ]]; then
ns_tx=$ns2
ns_rx=$ns1
+ extra_msg=" invert"
fi
printf "%-${nr_blank}s %s" " " "rtx"
@@ -837,18 +838,12 @@ chk_rst_nr()
ret=1
dump_stats=1
else
- if [ -z $ns_invert ]; then
- echo "[ ok ]"
- elif [ $ns_invert = "invert" ]; then
- echo -n "[ ok ]"
- fi
- fi
-
- if [ ! -z $ns_invert ] && [ $ns_invert = "invert" ]; then
- echo " - invert"
+ echo -n "[ ok ]"
fi
[ "${dump_stats}" = 1 ] && dump_stats
+
+ echo "$extra_msg"
}
chk_infi_nr()
--
2.34.1
On Fri, 18 Feb 2022, Geliang Tang wrote: > Reflect the ns_invert. > > Signed-off-by: Geliang Tang <geliang.tang@suse.com> > --- > v4: > - show extra_msg after dump_stats > Looks ok to squash, thanks Geliang. -Mat > v3: > - add extra_msg > > v2: > - update the output message from > rtx[ ok ] - rstrx [ ok ] - invert > to > rtx[ ok ] - rstrx [ ok ] invert > --- > .../testing/selftests/net/mptcp/mptcp_join.sh | 21 +++++++------------ > 1 file changed, 8 insertions(+), 13 deletions(-) > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh > index 3252865352f3..644db851a56c 100755 > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh > @@ -809,13 +809,14 @@ chk_rst_nr() > local ns_invert=${3:-""} > local count > local dump_stats > + local ns_tx=$ns1 > + local ns_rx=$ns2 > + local extra_msg="" > > - if [ -z $ns_invert ]; then > - ns_tx=$ns1 > - ns_rx=$ns2 > - elif [ $ns_invert = "invert" ]; then > + if [[ $ns_invert = "invert" ]]; then > ns_tx=$ns2 > ns_rx=$ns1 > + extra_msg=" invert" > fi > > printf "%-${nr_blank}s %s" " " "rtx" > @@ -837,18 +838,12 @@ chk_rst_nr() > ret=1 > dump_stats=1 > else > - if [ -z $ns_invert ]; then > - echo "[ ok ]" > - elif [ $ns_invert = "invert" ]; then > - echo -n "[ ok ]" > - fi > - fi > - > - if [ ! -z $ns_invert ] && [ $ns_invert = "invert" ]; then > - echo " - invert" > + echo -n "[ ok ]" > fi > > [ "${dump_stats}" = 1 ] && dump_stats > + > + echo "$extra_msg" > } > > chk_infi_nr() > -- > 2.34.1 > > > -- Mat Martineau Intel
© 2016 - 2024 Red Hat, Inc.