Jakub Kicinski writes:
> On Fri, 17 Jan 2025 13:49:23 +0100 Petr Machata wrote:
>> This logging and xfail handling duplicates lib.sh. Would a patch like
>> below be OK with you? The gist of it is to just use check_err, log_test
>> and xfail_on_slow from lib.sh to achie
Jakub Kicinski writes:
> Commit b9d5f5711dd8 ("selftests: net: increase the delay for relative
> cmsg_time.sh test") widened the accepted value range 8x but we still
> see flakes (at a rate of around 7%).
>
> Return XFAIL for the most timing sensitive test on slow machines.
>
> Before:
>
> #
tats.pkt_byte_sum
> ok 4 stats.qstat_by_ifindex
> ok 5 stats.check_down
> ok 6 stats.procfs_hammer
> # completed up/down cycles: 6
> ok 7 stats.procfs_downup_hammer
> # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> Signed-off-by: Jakub Kicinski
Reviewed-by: Petr Machata
ult() exists for exactly these add-unless-already-exists
scenarios:
parsed_entry = parsed.setdefault(ifindex, {"rx":[], "tx": []})
parsed_entry[entry["queue-type"]].append(entry['queue-id'])
Sometimes this can be used to inline the whole express
es, expected)
>
>
> def addremove_queues(cfg, nl) -> None:
> @@ -57,7 +60,7 @@ import glob
>
>
> def main() -> None:
> -with NetDrvEnv(__file__, queue_count=3) as cfg:
> +with NetDrvEnv(__file__, queue_count=100) as cfg:
> ksft_run([get_queues, addremove_queues], args=(cfg, NetdevFamily()))
> ksft_exit()
Hmm, get_queues() doesn't use the passed-in NetdevFamily(), but that
gets created anyway for addremove_queues(), so whatever.
Reviewed-by: Petr Machata
y.
> Keep the normal default, we don't want tests to unintentionally
> behave very differently than normal code.
>
> Signed-off-by: Jakub Kicinski
Reviewed-by: Petr Machata
expected.
Add egress filters on $h1 and $h2 that will guarantee the above.
Fixes: a865ad999603 ("selftests: mlxsw: Add shared buffer traffic test")
Signed-off-by: Danielle Ratson
Reviewed-by: Ido Schimmel
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
.../drivers
: Add shared buffer traffic test")
Signed-off-by: Danielle Ratson
Reviewed-by: Ido Schimmel
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
.../selftests/drivers/net/mlxsw/sharedbuffer.sh| 10 --
1 file changed, 10 deletions(-)
diff --git a/tools/testing/selftests/d
failures by removing unintentional test case
regarding the ingress pool of $h1.
Fixes: a865ad999603 ("selftests: mlxsw: Add shared buffer traffic test")
Signed-off-by: Danielle Ratson
Reviewed-by: Ido Schimmel
Signed-off-by: Ido Schimmel
Signed-off-by: Petr Machata
---
tools/testing
Danielle Ratson writes:
Currently, the sharedbuffer test fails sometimes because it is reading a
maximum occupancy that is larger than expected on some different cases.
This is happening because the test assumes that the packet it is sending
is the only packet being passed to the device.
In addi
Run VXLAN packets through a gateway. Flip individual bits of the packet
and/or reserved bits of the gateway, and check that the gateway treats the
packets as expected.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
v2:
- Add the new test to Makefile
CC: Shuah
Let's have a verb in that function name to make it clearer what's going on.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: Vladimir Oltean
CC: linux-kselftest@vger.kernel.org
tools/testing/sel
Add ip_link_set_addr(), ip_link_set_up(), ip_addr_add() and ip_route_add()
to the suite of helpers that automatically schedule a corresponding
cleanup.
When setting a new MAC, one needs to remember the old address first. Move
mac_get() from forwarding/ to that end.
Signed-off-by: Petr Machata
Jakub Kicinski writes:
> On Tue, 3 Dec 2024 15:30:37 +0100 Petr Machata wrote:
>> .../net/forwarding/vxlan_reserved.sh | 352 ++
>> 1 file changed, 352 insertions(+)
>> create mode 100755 tools/testing/selftests/net/forwarding/vxlan_reserved.sh
Run VXLAN packets through a gateway. Flip individual bits of the packet
and/or reserved bits of the gateway, and check that the gateway treats the
packets as expected.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC
Add ip_link_set_addr(), ip_link_set_up(), ip_addr_add() and ip_route_add()
to the suite of helpers that automatically schedule a corresponding
cleanup.
When setting a new MAC, one needs to remember the old address first. Move
mac_get() from forwarding/ to that end.
Signed-off-by: Petr Machata
Let's have a verb in that function name to make it clearer what's going on.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: Vladimir Oltean
CC: linux-kselftest@vger.kernel.org
tools/testing/sel
Add ip_link_set_addr(), ip_link_set_up(), ip_addr_add() and ip_route_add()
to the suite of helpers that automatically schedule a corresponding
cleanup.
When setting a new MAC, one needs to remember the old address first. Move
mac_get() from forwarding/ to that end.
Signed-off-by: Petr Machata
Run VXLAN packets through a gateway. Flip individual bits of the packet
and/or reserved bits of the gateway, and check that the gateway treats the
packets as expected.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC
Let's have a verb in that function name to make it clearer what's going on.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: Vladimir Oltean
CC: linux-kselftest@vger.kernel.org
tools/testing/sel
lways sourced near the top of the
file (checked), and whatever new definitions will simply override the ones
provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest@vger.kerne
A number of selftests run processes in the background and need to kill them
afterwards. Instead for everyone to open-code the kill / wait / redirect
mantra, add a helper in net/lib.sh. Convert existing open-code sites.
Signed-off-by: Petr Machata
Acked-by: Shuah Khan
Reviewed-by: Amit Cohen
vlan_create()
from forwarding/lib.sh are somewhat opaque and perhaps too kitchen-sinky,
so I tried to go in the opposite direction with these ones, and wrapped
only the bare minimum to schedule a corresponding cleanup.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes
names for their functions.
However lib.sh is always sourced near the top of the file (checked), and
whatever new definitions will simply override the ones provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
is
always sourced near the top of the file (checked), and whatever new
definition will simply override the one provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest
Jakub Kicinski writes:
> On Mon, 11 Nov 2024 18:09:01 +0100 Petr Machata wrote:
>> Check that only one notification is produced for various FDB edit
>> operations.
>>
>> Regarding the ip_link_add() and ip_link_master() helpers. This pattern of
>> action plu
vlan_create()
from forwarding/lib.sh are somewhat opaque and perhaps too kitchen-sinky,
so I tried to go in the opposite direction with these ones, and wrapped
only the bare minimum to schedule a corresponding cleanup.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC
names for their functions.
However lib.sh is always sourced near the top of the file (checked), and
whatever new definitions will simply override the ones provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
A number of selftests run processes in the background and need to kill them
afterwards. Instead for everyone to open-code the kill / wait / redirect
mantra, add a helper in net/lib.sh. Convert existing open-code sites.
Signed-off-by: Petr Machata
Acked-by: Shuah Khan
Reviewed-by: Amit Cohen
is
always sourced near the top of the file (checked), and whatever new
definition will simply override the one provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest
lways sourced near the top of the
file (checked), and whatever new definitions will simply override the ones
provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest@vger.kerne
is
always sourced near the top of the file (checked), and whatever new
definition will simply override the one provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest
A number of selftests run processes in the background and need to kill them
afterwards. Instead for everyone to open-code the kill / wait / redirect
mantra, add a helper in net/lib.sh. Convert existing open-code sites.
Signed-off-by: Petr Machata
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
names for their functions.
However lib.sh is always sourced near the top of the file (checked), and
whatever new definitions will simply override the ones provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
vlan_create()
from forwarding/lib.sh are somewhat opaque and perhaps too kitchen-sinky,
so I tried to go in the opposite direction with these ones, and wrapped
only the bare minimum to schedule a corresponding cleanup.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC
lways sourced near the top of the
file (checked), and whatever new definitions will simply override the ones
provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
Acked-by: Shuah Khan
---
Notes:
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest@vger.kerne
Shuah Khan writes:
> On 10/22/24 08:50, Petr Machata wrote:
>> Many net selftests invent their own logging helpers. These really should be
>> in a library sourced by these tests. Currently forwarding/lib.sh has a
>> suite of perfectly fine logging helpers, but sourcing
names for their functions.
However lib.sh is always sourced near the top of the file (checked), and
whatever new definitions will simply override the ones provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux
vlan_create()
from forwarding/lib.sh are somewhat opaque and perhaps too kitchen-sinky,
so I tried to go in the opposite direction with these ones, and wrapped
only the bare minimum to schedule a corresponding cleanup.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
CC: Shuah Khan
CC: Benjamin
A number of selftests run processes in the background and need to kill them
afterwards. Instead for everyone to open-code the kill / wait / redirect
mantra, add a helper in net/lib.sh. Convert existing open-code sites.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
CC: Shuah Khan
CC
is
always sourced near the top of the file (checked), and whatever new
definition will simply override the one provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest@vger.kernel.org
CC: Jiri Pirko
lways sourced near the top of the
file (checked), and whatever new definitions will simply override the ones
provided by lib.sh.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
CC: Shuah Khan
CC: Benjamin Poirier
CC: Hangbin Liu
CC: linux-kselftest@vger.kernel.org
CC: Jiri Pirko
---
Use the defer framework to schedule cleanups as soon as the command is
executed.
Note that the start_traffic commands in __burst_test() are each sending a
fixed number of packets (note the -c flag) and then ending. They therefore
do not need a matching stop_traffic.
Signed-off-by: Petr Machata
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/qos_max_descriptors.sh | 118 ++
1 file changed, 41 insertions(+), 77 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/qos_ets_strict.sh | 167 +-
1 file changed, 85 insertions(+), 82 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/qos_mc_aware.sh | 146 --
1 file changed, 68 insertions(+), 78 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../selftests/drivers/net/mlxsw/sch_ets.sh| 26 +++---
.../selftests/net/forwarding/sch_ets.sh | 7 +-
.../selftests/net/forwarding/sch_ets_core.sh | 81
dd a
local helper to stop traffic and sleep afterwards.
Signed-off-by: Petr Machata
---
Notes:
v2:
- Defer stop_traffic including the sleep. The sleep is actually
necessary and v1 was wrong in that it had the sleep prior to the
stop_traffic invocation.
.../drivers/net/mlxsw/sch_r
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../selftests/net/forwarding/sch_tbf_core.sh | 91 ++-
.../net/forwarding/sch_tbf_etsprio.sh | 7 +-
.../selftests/net/forwarding/sch_tbf_root.sh | 3
after the traffic is started without confusing the cleanup.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing/selftests/net/forwarding
free to override the function.
Since pre_cleanup() is too entangled with forwarding-specific minutia, the
function cannot currently be in net/lib.sh.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools
ling their cleanups.
Signed-off-by: Petr Machata
---
Notes:
v2:
- In __defer__schedule(), use ndefers in place of
${__DEFER__NJOBS[$ndefers_key]}
tools/testing/selftests/net/forwarding/lib.sh | 3 +-
tools/testing/selftests/net/lib.sh| 3 +
tools/testing/selftes
just stop_traffic
- Patches #6, #7, #8, #9, #10:
- New patch
Petr Machata (10):
selftests: net: lib: Introduce deferred commands
selftests: forwarding: Add a fallback cleanup()
selftests: forwarding: lib: Allow passing PID to stop_traffic()
selftests: RED: Use defer for test cleanup
self
Paolo Abeni writes:
> Hi,
>
> On 10/9/24 14:06, Petr Machata wrote:
>> diff --git a/tools/testing/selftests/net/lib/sh/defer.sh
>> b/tools/testing/selftests/net/lib/sh/defer.sh
>> new file mode 100644
>> index ..8d205c3f0445
>> --- /dev/nu
Paolo Abeni writes:
> On 10/9/24 14:06, Petr Machata wrote:
>> @@ -450,6 +415,7 @@ __do_ecn_test()
>> start_tcp_traffic $h1.$vlan $(ipaddr 1 $vlan) $(ipaddr 3 $vlan) \
>>$h3_mac tos=0x01
>> +defer stop_traffic $!
>> sleep
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/qos_max_descriptors.sh | 118 ++
1 file changed, 41 insertions(+), 77 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw
Use the defer framework to schedule cleanups as soon as the command is
executed.
Note that the start_traffic commands in __burst_test() are each sending a
fixed number of packets (note the -c flag) and then ending. They therefore
do not need a matching stop_traffic.
Signed-off-by: Petr Machata
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/qos_ets_strict.sh | 167 +-
1 file changed, 85 insertions(+), 82 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/qos_mc_aware.sh | 146 --
1 file changed, 68 insertions(+), 78 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../selftests/drivers/net/mlxsw/sch_ets.sh| 26 +++---
.../selftests/net/forwarding/sch_ets.sh | 7 +-
.../selftests/net/forwarding/sch_ets_core.sh | 81
Use the defer framework to schedule cleanups as soon as the command is
executed.
Signed-off-by: Petr Machata
---
.../selftests/net/forwarding/sch_tbf_core.sh | 91 ++-
.../net/forwarding/sch_tbf_etsprio.sh | 7 +-
.../selftests/net/forwarding/sch_tbf_root.sh | 3
Instead of having a suite of dedicated cleanup functions, use the defer
framework to schedule cleanups right as their setup functions are run.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/sch_red_core.sh | 171 +-
.../drivers/net/mlxsw/sch_red_ets.sh
after the traffic is started without confusing the cleanup.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing/selftests/net/forwarding
free to override the function.
Since pre_cleanup() is too entangled with forwarding-specific minutia, the
function cannot currently be in net/lib.sh.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools
, not just stop_traffic
- Patches #6, #7, #8, #9, #10:
- New patch
Petr Machata (10):
selftests: net: lib: Introduce deferred commands
selftests: forwarding: Add a fallback cleanup()
selftests: forwarding: lib: Allow passing PID to stop_traffic()
selftests: RED: Use defer for test cl
ling their cleanups.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 3 +-
tools/testing/selftests/net/lib.sh| 3 +
tools/testing/selftests/net/lib/Makefile | 2 +-
tools/testing/selftests/net/lib/sh/defer.sh | 115 ++
4 fil
-by: Petr Machata
---
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
index 316444389c4e
ins, while actually narrowing them relatively.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../selftests/drivers/net/mlxsw/sch_red_core.sh | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
ects all in-flight traffic.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
b/tools/testing/selftests/drivers/net/mlx
ing for several seconds hoping to get within the bounds, but that
still proved to be too noisy (or the wait time would be impractically
long). Unfortunately we have to bump the value tolerance from 10% to 15%,
which in this patch do.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
to
Backlog fluctuates on Spectrum-4 much more than on <4. Increasing the
desired backlog seems to help, as the constant fluctuations do not overlap
into the territory where packets are marked.
Signed-off-by: Petr Machata
Reviewed-by: Amit Cohen
---
tools/testing/selftests/drivers/net/ml
Tweak the mlxsw-specific RED selftests to increase stability on
Spectrum-3 and Spectrum-4 machines.
Petr Machata (5):
selftests: mlxsw: sch_red_ets: Increase required backlog
selftests: mlxsw: sch_red_core: Increase backlog size tolerance
selftests: mlxsw: sch_red_core: Sleep before
o Schimmel
Signed-off-by: Petr Machata
---
tools/testing/selftests/drivers/net/mlxsw/rtnetlink.sh | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/rtnetlink.sh
b/tools/testing/selftests/drivers/net/mlxsw/rtnetlink.sh
index 89
Jakub Kicinski writes:
> On Tue, 27 Aug 2024 10:53:53 +0200 Petr Machata wrote:
>> >> I can do it, but it's gonna be more pain in setting up those
>> >> TEST_INCLUDES. People will forget. It will be a nuisance.
>> >> I'm thinking
Przemek Kitszel writes:
> On 8/26/24 17:20, Petr Machata wrote:
>> Przemek Kitszel writes:
>>
>>> On 8/22/24 15:49, Petr Machata wrote:
>>>> In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule
>>>> cleanup with de
This test neglects to put ports down on cleanup. Fix it.
Fixes: 90b9566aa5cd ("selftests: forwarding: add a test for
local_termination.sh")
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/local_termination.sh | 4
1 file changed, 4 insertions(+)
diff --g
Przemek Kitszel writes:
> On 8/22/24 15:49, Petr Machata wrote:
>> In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule
>> cleanup with defer()"), a defer helper was added to Python selftests.
>> The idea is to keep cleanup commands close
Ido Schimmel writes:
> On Thu, Aug 22, 2024 at 03:49:44PM +0200, Petr Machata wrote:
>> Tests interrupted part-way through leave behind a running mausezahn. Use
>> defer to schedule a traffic stop after traffic is started.
>
> Any reason not to convert the setup part to t
Ido Schimmel writes:
> On Thu, Aug 22, 2024 at 03:49:40PM +0200, Petr Machata wrote:
>> The following patches will convert several selftests to this new framework.
>
> The intention is to make sure new tests are using these helpers?
Well, I sent this as RFC because I'm
This test neglects to put ports down on cleanup. Fix it.
Fixes: 476a4f05d9b8 ("selftests: forwarding: add a no_forwarding.sh test")
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/no_forwarding.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/too
Use defer scopes to manage qdisc lifetime.
Signed-off-by: Petr Machata
---
.../drivers/net/mlxsw/sch_red_ets.sh | 32 +--
.../drivers/net/mlxsw/sch_red_root.sh | 24 ++
2 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/tools/testing
Tests interrupted part-way through leave behind a running mausezahn. Use
defer to schedule a traffic stop after traffic is started.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/sch_tbf_core.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools
Tests interrupted part-way through leave behind a running mausezahn. Use
defer to schedule a traffic stop after traffic is started. Mark the
functions that run traffic as defer-scoped, such that the traffic is
stopped right after the function returns.
Signed-off-by: Petr Machata
---
.../drivers
: Petr Machata
---
.../drivers/net/mlxsw/sch_red_core.sh | 109 ++
1 file changed, 37 insertions(+), 72 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
index 7151b0c7bf8d
efer scope
before the function is called, and pops it after it returns.
The following patches will convert several selftests to this new framework.
Signed-off-by: Petr Machata
---
tools/testing/selftests/net/forwarding/lib.sh | 83 +++
1 file changed, 83 insertions(+)
diff --g
remove it again, _why is it still broken_?") This is an attempt at
squashing this whole class of problems.
Patch #1 has more details about the primitives being introduced.
Patches #2 to #5 the convert several selftests to give an idea of how it
looks in practice.
Petr Machata (5):
selfte
Jakub Kicinski writes:
> On Mon, 19 Aug 2024 02:03:53 -0700 Breno Leitao wrote:
>> +function check_for_dependencies() {
>> +if [ "$(id -u)" -ne 0 ]; then
>> +echo "This test must be run as root" >&2
>> +exit "${ksft_skip}"
>> +fi
>> +
>> +if ! which socat > /
o Schimmel
Signed-off-by: Petr Machata
---
tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh
b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lane
Breno Leitao writes:
> Adds a selftest that creates two virtual interfaces, assigns one to a
> new namespace, and assigns IP addresses to both.
>
> It listens on the destination interface using socat and configures a
> dynamic target on netconsole, pointing to the destination IP address.
>
> Th
Jakub Kicinski writes:
> On Fri, 9 Aug 2024 14:36:17 +0200 Petr Machata wrote:
>> > +env_level = env.get('VERBOSE')
>> > +set_verbosity(env_level)
>> > +
>>
>> Actually, the ksft_setup() here was merged last week, and I think t
Mohsin Bashir writes:
> Add verbosity support to show the commands executed while
> running tests. Enable verbosity if either an environment
> variable 'VERBOSE' is set to a non-zero number or it is defined
> in a config file under driver tests as discussed here:
> https://github.com/linux-netd
Mohsin Bashir writes:
> Add verbosity support to show the commands executed while
> running tests. Enable verbosity if either an environment
> variable 'VERBOSE' is set to a non-zero number or it is defined
> in a config file under driver tests as discussed here:
> https://github.com/linux-netd
Stanislav Fomichev writes:
> On 08/01, Petr Machata wrote:
>>
>> Stanislav Fomichev writes:
>>
>> > On 07/31, Jakub Kicinski wrote:
>> >> On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote:
>> >> > > +qstat = netf
Jakub Kicinski writes:
> On Thu, 1 Aug 2024 10:36:18 +0200 Petr Machata wrote:
>> You seem to be right about the exit code. This was discussed some time
>> ago, that SKIP is considered a sort of a failure. As the person running
>> the test you would want to go in and fix w
Add tests that attempt to create NH groups that use full 16 bits of NH
weight.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
tools/testing/selftests/net/fib_nexthops.sh | 55 -
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests
Add tests that exercise full 16 bits of NH weight.
Like in the previous patch, omit the 255:65535 test when KSFT_MACHINE_SLOW.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
.../net/forwarding/router_mpath_nh_res.sh | 56 ---
1 file changed, 48 insertions(+), 8
Add tests that exercise full 16 bits of NH weight.
To test the 255:65535, it is necessary to run more packets than for the
other tests. On a debug kernel, the test can take up to a minute, therefore
avoid the test when KSFT_MACHINE_SLOW.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
In the context of an offloaded datapath, it may take a while for the ip
link stats to be updated. This causes the test to fail when MZ_DELAY is too
low. Sleep after the packets are sent for the link stats to get up to date.
Signed-off-by: Petr Machata
Reviewed-by: Ido Schimmel
---
tools
Stanislav Fomichev writes:
> On 07/31, Petr Machata wrote:
>>
>> Stanislav Fomichev writes:
>>
>> > Add new @ksft_disruptive decorator to mark the tests that might
>> > be disruptive to the system. Depending on how well the previous
>> &g
Stanislav Fomichev writes:
> On 07/31, Jakub Kicinski wrote:
>> On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote:
>> > > +qstat = netfam.qstats_get({"ifindex": cfg.ifindex}, dump=True)
>> > > +except NlError as e:
>> > &g
1 - 100 of 201 matches
Mail list logo