selftests: mptcp: diag: unique 'cestab' subtest names
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Thu, 15 Feb 2024 18:25:40 +0000 (19:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Feb 2024 10:25:01 +0000 (10:25 +0000)
commit4103d8480866fe5abb71ef0ed8af3a3b7b9625bf
treef45fe88c2e692c2ce3d0c91fddaafb73a286545d
parent645c1dc965ef6b5554e5e69737bb179c7a0f872f
selftests: mptcp: diag: unique 'cestab' subtest names

It is important to have a unique (sub)test name in TAP, because some CI
environments drop tests with duplicated name.

Some 'cestab' subtests from the diag selftest had the same names, e.g.:

    ....chk 0 cestab

Now the previous value is taken, to have different names, e.g.:

    ....chk 2->0 cestab after flush

While at it, the 'after flush' info is added, similar to what is done
with the 'in use' subtests. Also inspired by these 'in use' subtests,
'many' is displayed instead of a large number:

    many msk socket present                           [  ok  ]
    ....chk many msk in use                           [  ok  ]
    ....chk many cestab                               [  ok  ]
    ....chk many->0 msk in use after flush            [  ok  ]
    ....chk many->0 cestab after flush                [  ok  ]

Fixes: 81ab772819da ("selftests: mptcp: diag: check CURRESTAB counters")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/diag.sh