From: Petr Machata <petrm@nvidia.com>
To: Pablo Martin Medrano <pablmart@redhat.com>
Cc: <netdev@vger.kernel.org>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Petr Machata <petrm@nvidia.com>
Subject: Re: [PATCH net v2] selftests/net: big_tcp: return xfail on slow machines
Date: Thu, 27 Feb 2025 11:42:32 +0100 [thread overview]
Message-ID: <87ikovhdhy.fsf@nvidia.com> (raw)
In-Reply-To: <3e35d85e-c136-f87e-a215-f2e9ccd43490@redhat.com>
Pablo Martin Medrano <pablmart@redhat.com> writes:
> On Tue, 25 Feb 2025, Petr Machata wrote:
>
>> Due to all the &&'s peppered down there, do_test() only gets called at
>> most once, so it's OK in this case.
>
> Actually do_test() do always returns 0, so it gets called all times in the
You are right, I missed that you kept the ret == PASS test at the end of
the function. So just drop that? It's not adding anything, it could be
replaced with a : or true if you truly want to return 0. Then local
ret="PASS" can go away as well.
> code. check_err is setting RET and keeping it at the failing return
> value, so check_err is always returning error after the first error
>
> If I force the error by injecting in do_test():
>
> if [ $gw_tso = off -a $cli_tso = on ]; then
> check_err 1 "forced to fail when GW_GSO is off and CLI GSO is on"
> else
> check_err $ret_check_counter "fail on link1"
> fi
>
> The output is:
>
> Testing for BIG TCP:
> CLI GSO | GW GRO | GW GSO | SER GRO
> TEST: on on on on [ OK ]
> TEST: on off on off [ OK ]
> TEST: off on on on [ OK ]
> TEST: on on off on [FAIL]
> forced to fail when GW_GSO is off and CLI GSO is on
> TEST: off on off on [FAIL]
> forced to fail when GW_GSO is off and CLI GSO is on
> ***v4 Tests Done***
>
> So setting RET at the end of do_test is needed indeed.
The convention is to do it at the start of the test, before the first
check_err etc.
prev parent reply other threads:[~2025-02-27 10:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 17:07 [PATCH net v2] selftests/net: big_tcp: return xfail on slow machines Pablo Martin Medrano
2025-02-24 13:44 ` Simon Horman
2025-02-24 17:34 ` Pablo Martin Medrano
2025-02-25 10:24 ` Simon Horman
2025-02-25 12:56 ` Petr Machata
2025-02-26 17:32 ` Pablo Martin Medrano
2025-02-25 13:01 ` Petr Machata
2025-02-26 18:53 ` Pablo Martin Medrano
2025-02-27 10:42 ` Petr Machata [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ikovhdhy.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablmart@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.