[PATCH mptcp-next v13 0/9] add helpers and vars in mptcp_lib.sh, part 3

Geliang Tang posted 9 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1709688778.git.tanggeliang@kylinos.cn
tools/testing/selftests/net/mptcp/diag.sh     |  19 ++-
.../selftests/net/mptcp/mptcp_connect.sh      | 123 ++++++++++--------
.../testing/selftests/net/mptcp/mptcp_join.sh |  28 ++--
.../testing/selftests/net/mptcp/mptcp_lib.sh  |  42 +++++-
.../selftests/net/mptcp/mptcp_sockopt.sh      |  44 ++++---
.../testing/selftests/net/mptcp/pm_netlink.sh |   5 +-
.../selftests/net/mptcp/simult_flows.sh       |  14 +-
.../selftests/net/mptcp/userspace_pm.sh       |  28 ++--
8 files changed, 163 insertions(+), 140 deletions(-)
[PATCH mptcp-next v13 0/9] add helpers and vars in mptcp_lib.sh, part 3
Posted by Geliang Tang 1 month, 3 weeks ago
From: Geliang Tang <tanggeliang@kylinos.cn>

v13:
 - fix the shellcheck error reported by CI in patch 8
 - rebased

v12:
 - patch 1 Drop one more 1>&2, and update commit log
 - patch 2 use port_base=10000 instead of PORT=0
 - patch 4 fix the TAP output
 - patch 8 a new patch
 - patch 9 drop _printf in userspace_pm.sh

v11:
 - fix the shellcheck error in v10

v10:
 - split two more patches (#4 and #5) from #6 and #7
 - update commit logs

v9:
 - move print_larger_title from patch 5 to patch 2
 - move MPTCP_LIB_TEST_FORMAT to a more suitable location in patch 4 and
   patch 5

v8:
 - address every comment from Matt in v7.

v7:
 - address every comment from Matt in v6.

v6:
 - only include the first 7 patches in v5
 - add mptcp_lib_pr_* helpers
 - add print_title helpers
 - align the output of simult_flows.sh

v5:
 - don't use mptcp_lib_print_test_counter in mptcp_join.sh, it breaks
   skip_test().

v4:
 - set test_cnt to 0, use ++counter in mptcp_lib_print_test_counter() to
   fix the following mismatched test counters:

# 012 userspace pm server fullmesh
#       syn                                 [ OK ]
#       synack                              [ OK ]
#       ack                                 [ OK ]
#       add                                 [ OK ]
#       echo                                [FAIL] got 1 ADD_ADDR echo[s] expected 2
# Server ns stats
# TcpPassiveOpens                 5                  0.0
# TcpInSegs                       25                 0.0
... ...
#
# 1 failure(s) has(ve) been detected:
#       - 13: userspace pm server fullmesh

v3:
 - fix shellcheck errors in v2

v2:
 - fix shellcheck errors in v1
 - print test results with counters

Geliang Tang (9):
  selftests: mptcp: print all error messages to stdout
  selftests: mptcp: connect: add dedicated port counter
  selftests: mptcp: connect: fix misaligned output
  selftests: mptcp: sockopt: print every test result
  selftests: mptcp: export TEST_COUNTER variable
  selftests: mptcp: add print_title in mptcp_lib
  selftests: mptcp: print test results with counters
  selftests: mptcp: connect: use += operator to append strings
  selftests: mptcp: print test results with colors

 tools/testing/selftests/net/mptcp/diag.sh     |  19 ++-
 .../selftests/net/mptcp/mptcp_connect.sh      | 123 ++++++++++--------
 .../testing/selftests/net/mptcp/mptcp_join.sh |  28 ++--
 .../testing/selftests/net/mptcp/mptcp_lib.sh  |  42 +++++-
 .../selftests/net/mptcp/mptcp_sockopt.sh      |  44 ++++---
 .../testing/selftests/net/mptcp/pm_netlink.sh |   5 +-
 .../selftests/net/mptcp/simult_flows.sh       |  14 +-
 .../selftests/net/mptcp/userspace_pm.sh       |  28 ++--
 8 files changed, 163 insertions(+), 140 deletions(-)

-- 
2.40.1
Re: [PATCH mptcp-next v13 0/9] add helpers and vars in mptcp_lib.sh, part 3
Posted by Matthieu Baerts 1 month, 3 weeks ago
Hi Geliang,

On 06/03/2024 02:40, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> v13:
>  - fix the shellcheck error reported by CI in patch 8
>  - rebased
> 
> v12:
>  - patch 1 Drop one more 1>&2, and update commit log
>  - patch 2 use port_base=10000 instead of PORT=0
>  - patch 4 fix the TAP output
>  - patch 8 a new patch
>  - patch 9 drop _printf in userspace_pm.sh

Thank you for the new version and the changelog. This v13 looks good to me.

Before applying the series, I have 3 suggestions (see my comments on
patches 2, 3, 9), and one important question (from v11):

Did you check the output when you force failure (e.g. by modifying the
code to force and issue, e.g. changing counters, set ret values, etc.)?
Just to make sure they are still presented correctly, and if we still
catch them!

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v13 0/9] add helpers and vars in mptcp_lib.sh, part 3
Posted by Matthieu Baerts 1 month, 3 weeks ago
Hi Geliang,

On 06/03/2024 13:01, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 06/03/2024 02:40, Geliang Tang wrote:
>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>
>> v13:
>>  - fix the shellcheck error reported by CI in patch 8
>>  - rebased
>>
>> v12:
>>  - patch 1 Drop one more 1>&2, and update commit log
>>  - patch 2 use port_base=10000 instead of PORT=0
>>  - patch 4 fix the TAP output
>>  - patch 8 a new patch
>>  - patch 9 drop _printf in userspace_pm.sh
> 
> Thank you for the new version and the changelog. This v13 looks good to me.
> 
> Before applying the series, I have 3 suggestions (see my comments on
> patches 2, 3, 9), and one important question (from v11):
> 
> Did you check the output when you force failure (e.g. by modifying the
> code to force and issue, e.g. changing counters, set ret values, etc.)?
> Just to make sure they are still presented correctly, and if we still
> catch them!

I just applied the patches in our tree (with the modifications I
suggested), so we can discuss them at the meeting today to check if we
send them before the end of the merge window.

Please tell me if the modifications I did were OK or not, and more
importantly, if you checked we are still catching and printing errors
correctly.

New patches for t/upstream:
- 1078cbfbcaca: selftests: mptcp: print all error messages to stdout
- 41d8173fc08e: selftests: mptcp: connect: add dedicated port counter
- 2f5133832972: selftests: mptcp: connect: fix misaligned output
- 675afbc67f16: selftests: mptcp: sockopt: print every test result
- ea343f146c45: selftests: mptcp: export TEST_COUNTER variable
- 7f8d83dedeec: selftests: mptcp: add print_title in mptcp_lib
- a7107253146f: selftests: mptcp: print test results with counters
- 4d5fa38b0feb: selftests: mptcp: connect: use += operator to append strings
- eb2df7f20113: selftests: mptcp: print test results with colors
- Results: 22573260e303..f5104afeca7c (export)

My modifications:
- 24a6ed34b014: Squash to "selftests: mptcp: connect: add dedicated port
counter"
- d1395cdf78c9: tg:msg: 'prot_base' (typo) -> 'port'
- 29f333cf764b: conflict in t/selftests-mptcp-export-TEST_COUNTER-variable
- a7d331066c9a: conflict in
t/selftests-mptcp-print-test-results-with-counters
- f6a25c3bc6f2: Squash to "selftests: mptcp: print test results with
counters"
- 8664917a10d3: Squash to "selftests: mptcp: print test results with colors"
- Results: f5104afeca7c..03439b759bbc (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20240306T152450

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.