mbox series

[net-next,0/7] selftest: netfilter: additional cleanups

Message ID 20240423130604.7013-1-fw@strlen.de
Headers show
Series selftest: netfilter: additional cleanups | expand

Message

Florian Westphal April 23, 2024, 1:05 p.m. UTC
This is the last planned series of the netfilter-selftest-move.
It contains cleanups (and speedups) and a few small updates to
scripts to improve error/skip reporting.

I intend to route future changes, if any, via nf(-next) trees
now that the 'massive code churn' phase is over.

Florian Westphal (7):
  selftests: netfilter: nft_concat_range.sh: move to lib.sh infra
  selftests: netfilter: nft_concat_range.sh: drop netcat support
  selftests: netfilter: nft_concat_range.sh: shellcheck cleanups
  selftests: netfilter: nft_flowtable.sh: re-run with random mtu sizes
  selftests: netfilter: nft_flowtable.sh: shellcheck cleanups
  selftests: netfilter: skip tests on early errors
  selftests: netfilter: conntrack_vrf.sh: prefer socat, not iperf3

 .../selftests/net/netfilter/br_netfilter.sh   |   4 +
 .../selftests/net/netfilter/conntrack_vrf.sh  |  40 +--
 .../selftests/net/netfilter/nft_audit.sh      |   3 +-
 .../net/netfilter/nft_concat_range.sh         | 187 +++++-------
 .../selftests/net/netfilter/nft_flowtable.sh  | 274 ++++++++++--------
 .../testing/selftests/net/netfilter/rpath.sh  |  10 +-
 6 files changed, 263 insertions(+), 255 deletions(-)

Comments

Jakub Kicinski April 23, 2024, 4:50 p.m. UTC | #1
On Tue, 23 Apr 2024 15:05:43 +0200 Florian Westphal wrote:
> This is the last planned series of the netfilter-selftest-move.
> It contains cleanups (and speedups) and a few small updates to
> scripts to improve error/skip reporting.
> 
> I intend to route future changes, if any, via nf(-next) trees
> now that the 'massive code churn' phase is over.

Got it.

The main thing that seems to be popping up in the netdev runner is:

# TEST: performance
#   net,port                                                      [SKIP]
#   perf not supported

What is "perf" in this case? Some NFT module? the perf tool is
installed, AFAICT..
Florian Westphal April 23, 2024, 7:42 p.m. UTC | #2
Jakub Kicinski <kuba@kernel.org> wrote:
> On Tue, 23 Apr 2024 15:05:43 +0200 Florian Westphal wrote:
> > This is the last planned series of the netfilter-selftest-move.
> > It contains cleanups (and speedups) and a few small updates to
> > scripts to improve error/skip reporting.
> > 
> > I intend to route future changes, if any, via nf(-next) trees
> > now that the 'massive code churn' phase is over.
> 
> Got it.
> 
> The main thing that seems to be popping up in the netdev runner is:
> 
> # TEST: performance
> #   net,port                                                      [SKIP]
> #   perf not supported
> 
> What is "perf" in this case? Some NFT module? the perf tool is
> installed, AFAICT..

Its looking for the pktgen wrapper script
(pktgen_bench_xmit_mode_netif_receive.sh).

I don't think it makes too much sense to have that run as part of the CI.

I can either remove this or move it under some special commandline
option, or I can look into this and see if I can get it to run.

Let me know, thanks.
Jakub Kicinski April 23, 2024, 8:52 p.m. UTC | #3
On Tue, 23 Apr 2024 21:42:21 +0200 Florian Westphal wrote:
> > The main thing that seems to be popping up in the netdev runner is:
> > 
> > # TEST: performance
> > #   net,port                                                      [SKIP]
> > #   perf not supported
> > 
> > What is "perf" in this case? Some NFT module? the perf tool is
> > installed, AFAICT..  
> 
> Its looking for the pktgen wrapper script
> (pktgen_bench_xmit_mode_netif_receive.sh).
> 
> I don't think it makes too much sense to have that run as part of the CI.
> 
> I can either remove this or move it under some special commandline
> option, or I can look into this and see if I can get it to run.

Hm, never used it myself but it makes me think of the extended ksft
vars:

 | TEST_PROGS_EXTENDED, TEST_GEN_PROGS_EXTENDED mean it is the
 | executable which is not tested by default.

https://docs.kernel.org/dev-tools/kselftest.html?highlight=test_progs_extended#contributing-new-tests-details
patchwork-bot+netdevbpf@kernel.org April 25, 2024, 12:20 a.m. UTC | #4
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 23 Apr 2024 15:05:43 +0200 you wrote:
> This is the last planned series of the netfilter-selftest-move.
> It contains cleanups (and speedups) and a few small updates to
> scripts to improve error/skip reporting.
> 
> I intend to route future changes, if any, via nf(-next) trees
> now that the 'massive code churn' phase is over.
> 
> [...]

Here is the summary with links:
  - [net-next,1/7] selftests: netfilter: nft_concat_range.sh: move to lib.sh infra
    https://git.kernel.org/netdev/net-next/c/546fb63fe85e
  - [net-next,2/7] selftests: netfilter: nft_concat_range.sh: drop netcat support
    https://git.kernel.org/netdev/net-next/c/ba6fbd383c12
  - [net-next,3/7] selftests: netfilter: nft_concat_range.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/c54fa6ae35b9
  - [net-next,4/7] selftests: netfilter: nft_flowtable.sh: re-run with random mtu sizes
    https://git.kernel.org/netdev/net-next/c/f84ab634904c
  - [net-next,5/7] selftests: netfilter: nft_flowtable.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/a18f284574ad
  - [net-next,6/7] selftests: netfilter: skip tests on early errors
    https://git.kernel.org/netdev/net-next/c/bb0ee78f9418
  - [net-next,7/7] selftests: netfilter: conntrack_vrf.sh: prefer socat, not iperf3
    https://git.kernel.org/netdev/net-next/c/99bc5950ebd4

You are awesome, thank you!
Jakub Kicinski April 25, 2024, 7:12 p.m. UTC | #5
On Tue, 23 Apr 2024 15:05:43 +0200 Florian Westphal wrote:
> I intend to route future changes, if any, via nf(-next) trees
> now that the 'massive code churn' phase is over.

I hooked the tests which reliably pass up to patchwork now.
(The PW reporting is "combined" so basically the daemon will take 
them into account for the "contest" check).

On the debug kernels we have a bunch of tests failing due to timeout.
We multiply the timeout set in ksft settings by 2 for the debug kernel,
so in netfilter we give them 1000 sec, but looks like that's not enough.

Would you be willing to bump it up? I can override it in the config of
the runner, as last resort.
Florian Westphal April 30, 2024, 1:44 p.m. UTC | #6
Jakub Kicinski <kuba@kernel.org> wrote:
> On Tue, 23 Apr 2024 21:42:21 +0200 Florian Westphal wrote:
> > > The main thing that seems to be popping up in the netdev runner is:
> > > 
> > > # TEST: performance
> > > #   net,port                                                      [SKIP]
> > > #   perf not supported
> > > 
> > > What is "perf" in this case? Some NFT module? the perf tool is
> > > installed, AFAICT..  
> > 
> > Its looking for the pktgen wrapper script
> > (pktgen_bench_xmit_mode_netif_receive.sh).
> > 
> > I don't think it makes too much sense to have that run as part of the CI.
> > 
> > I can either remove this or move it under some special commandline
> > option, or I can look into this and see if I can get it to run.

It runs for ~25m, so I'd say lets NOT have it run by default.

> Hm, never used it myself but it makes me think of the extended ksft
> vars:
> 
>  | TEST_PROGS_EXTENDED, TEST_GEN_PROGS_EXTENDED mean it is the
>  | executable which is not tested by default.
> 
> https://docs.kernel.org/dev-tools/kselftest.html?highlight=test_progs_extended#contributing-new-tests-details

Thanks, I'll add a small wrapper via TEST_PROGS_EXTENDED so folks
can run the performance (pps match rate) manually.