netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] selftests: net: cope with slow env in gro.sh test
@ 2024-02-07 18:36 Paolo Abeni
  2024-02-07 22:14 ` Matthieu Baerts
  2024-02-09 19:15 ` Jakub Kicinski
  0 siblings, 2 replies; 4+ messages in thread
From: Paolo Abeni @ 2024-02-07 18:36 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Shuah Khan,
	Willem de Bruijn, Coco Li, linux-kselftest, Matthieu Baerts

The gro self-tests sends the packets to be aggregated with
multiple write operations.

When running is slow environment, it's hard to guarantee that
the GRO engine will wait for the last packet in an intended
train.

The above causes almost deterministic failures in our CI for
the 'large' test-case.

Address the issue explicitly ignoring failures for such case
in slow environments (KSFT_MACHINE_SLOW==true).

Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test")
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
v1 -> v2:
  - replace the '-a' operator with '&&' - Mattbe

Note that the fixes tag is there mainly to justify targeting the net
tree, and this is aiming at net to hopefully make the test more stable
ASAP for both trees.

I experimented with a largish refactory replacing the multiple writes
with a single GSO packet, but exhausted by time budget before reaching
any good result.
---
 tools/testing/selftests/net/gro.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/net/gro.sh b/tools/testing/selftests/net/gro.sh
index 19352f106c1d..3190b41e8bfc 100755
--- a/tools/testing/selftests/net/gro.sh
+++ b/tools/testing/selftests/net/gro.sh
@@ -31,6 +31,10 @@ run_test() {
       1>>log.txt
     wait "${server_pid}"
     exit_code=$?
+    if [[ ${test} == "large" && -n "${KSFT_MACHINE_SLOW}" ]]; then
+        echo "Ignoring errors due to slow environment" 1>&2
+        exit_code=0
+    fi
     if [[ "${exit_code}" -eq 0 ]]; then
         break;
     fi
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2] selftests: net: cope with slow env in gro.sh test
  2024-02-07 18:36 [PATCH net v2] selftests: net: cope with slow env in gro.sh test Paolo Abeni
@ 2024-02-07 22:14 ` Matthieu Baerts
  2024-02-09 19:15 ` Jakub Kicinski
  1 sibling, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2024-02-07 22:14 UTC (permalink / raw)
  To: Paolo Abeni, netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Shuah Khan,
	Willem de Bruijn, Coco Li, linux-kselftest

Hi Paolo,

On 07/02/2024 19:36, Paolo Abeni wrote:
> The gro self-tests sends the packets to be aggregated with
> multiple write operations.
> 
> When running is slow environment, it's hard to guarantee that
> the GRO engine will wait for the last packet in an intended
> train.
> 
> The above causes almost deterministic failures in our CI for
> the 'large' test-case.
> 
> Address the issue explicitly ignoring failures for such case
> in slow environments (KSFT_MACHINE_SLOW==true).
> 
> Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test")
> Reviewed-by: Willem de Bruijn <willemb@google.com>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> v1 -> v2:
>   - replace the '-a' operator with '&&' - Mattbe

Thank you for the v2!

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2] selftests: net: cope with slow env in gro.sh test
  2024-02-07 18:36 [PATCH net v2] selftests: net: cope with slow env in gro.sh test Paolo Abeni
  2024-02-07 22:14 ` Matthieu Baerts
@ 2024-02-09 19:15 ` Jakub Kicinski
  2024-02-12  8:40   ` Paolo Abeni
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2024-02-09 19:15 UTC (permalink / raw)
  To: Paolo Abeni
  Cc: netdev, David S. Miller, Eric Dumazet, Shuah Khan,
	Willem de Bruijn, Coco Li, linux-kselftest, Matthieu Baerts

On Wed,  7 Feb 2024 19:36:46 +0100 Paolo Abeni wrote:
> +    if [[ ${test} == "large" && -n "${KSFT_MACHINE_SLOW}" ]]; then
> +        echo "Ignoring errors due to slow environment" 1>&2
> +        exit_code=0
> +    fi

Would it make sense to also add "&& $exit_code -ne 0" ?
It may be useful to see in logs how many times we actually
ignored the error?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2] selftests: net: cope with slow env in gro.sh test
  2024-02-09 19:15 ` Jakub Kicinski
@ 2024-02-12  8:40   ` Paolo Abeni
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2024-02-12  8:40 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: netdev, David S. Miller, Eric Dumazet, Shuah Khan,
	Willem de Bruijn, Coco Li, linux-kselftest, Matthieu Baerts

On Fri, 2024-02-09 at 11:15 -0800, Jakub Kicinski wrote:
> On Wed,  7 Feb 2024 19:36:46 +0100 Paolo Abeni wrote:
> > +    if [[ ${test} == "large" && -n "${KSFT_MACHINE_SLOW}" ]]; then
> > +        echo "Ignoring errors due to slow environment" 1>&2
> > +        exit_code=0
> > +    fi
> 
> Would it make sense to also add "&& $exit_code -ne 0" ?
> It may be useful to see in logs how many times we actually
> ignored the error?

Yep, I'll send a v3.

Thanks!

Paolo


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-12  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 18:36 [PATCH net v2] selftests: net: cope with slow env in gro.sh test Paolo Abeni
2024-02-07 22:14 ` Matthieu Baerts
2024-02-09 19:15 ` Jakub Kicinski
2024-02-12  8:40   ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).