Hi Geliang,
On 25/09/2023 10:41, Geliang Tang wrote:
> Just like displaying "invert" after "Info: ", "simult" should be
> displayed too when rm_subflow_nr dosen't match the expect value in
> chk_rm_nr():
>
> syn [ ok ]
> synack [ ok ]
> ack [ ok ]
> add [ ok ]
> echo [ ok ]
> rm [ ok ]
> rmsf [ ok ] 3 in [2:4]
> Info: invert simult
>
> syn [ ok ]
> synack [ ok ]
> ack [ ok ]
> add [ ok ]
> echo [ ok ]
> rm [ ok ]
> rmsf [ ok ]
> Info: invert
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index ee1f89a872b3..d02e53be8b31 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -1766,7 +1766,9 @@ chk_rm_nr()
> # in case of simult flush, the subflow removal count on each side is
> # unreliable
> count=$((count + cnt))
> - [ "$count" != "$rm_subflow_nr" ] && suffix="$count in [$rm_subflow_nr:$((rm_subflow_nr*2))]"
> + [ "$count" != "$rm_subflow_nr" ] && \
> + suffix="$count in [$rm_subflow_nr:$((rm_subflow_nr*2))]" && \
> + extra_msg="$extra_msg simult"
Good idea!
I think it would be clearer to use an explicit "if":
if [ "$count" != "$rm_subflow_nr" ]; then
(...)
I can do the modification when applying the patch if needed.
Cheers,
Matt
> if [ $count -ge "$rm_subflow_nr" ] && \
> [ "$count" -le "$((rm_subflow_nr *2 ))" ]; then
> print_ok "$suffix"
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net