netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Haller <thaller@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft 1/3] tests/shell: skip "table_onoff" test if kernel patch is missing
Date: Tue, 17 Oct 2023 13:14:27 +0200	[thread overview]
Message-ID: <9179367fc2f8eaaad8fcc21d1bb724d4ad67e5c6.camel@redhat.com> (raw)
In-Reply-To: <20231017093228.GB10901@breakpoint.cc>

On Tue, 2023-10-17 at 11:32 +0200, Florian Westphal wrote:
> Thomas Haller <thaller@redhat.com> wrote:
> > As you probably run a self-built kernel, wouldn't you just `export
> > NFT_TEST_FAIL_ON_SKIP=y` and reject all skips as failures? What's
> > the
> > problem with that? That exists exactly for your use case.
> 
> No, its not my use case.
> 
> The use case is to make sure that the frankenkernels that I am in
> charge
> of do not miss any important bug fixes.
> 
> This is the reason for the feature probing, "skip" should tell me
> that
> I can safely ignore it because the feature is not present.
> 
> I could built a list of "expected failures", but that will mask real
> actual regressions.

How did you handle that, before the recent addition of the skip
functionality? Did you just have a list of known failures, and manually
ignored them?


Anyway, the "eval-exit-code" in v2 can easily honor an environment
variable, to always fail hard. The only question is how exactly it
should work.

I propse that NFT_TEST_FAIL_ON_SKIP=y should honor a variable
"NFT_TEST_FAIL_ON_SKIP_EXCEPT=", which takes a regex of test names, for
which a skip is *not* fatal (you opt-in the tests that are allowed to
fail). If you maintain c9s, the list of known skipped tests is small
and relatively static. You can maintain a per-kernel-variant regex in
that case.

If we want, we can even parse /etc/os-release and uname and code a
default list of regexes.



> > > This is a bug, and it tells me that I might have to do something
> > > about it.
> > 
> > OK, do you intend to fix this bug in a very timely manner on Fedora
> > 38
> > (and other popular kernels)? Then maybe hold back the test until
> > that
> > happend? (or let it skip for now, and in a few weeks, upgrade to
> > hard
> > failure -- the only problem is not to forget about that).
> 
> I did keep the test back until I saw that -stable had picked it up.
> 
> I can wait longer, sure.

I think it is good to merge tests soon. There just needs to be a
reasonable+convenient way to handle the problem.

Having a policy that requires you to wait is broken. Especially, since
it's unclear how long to wait. You are not waiting for yourself, but
for any unknown user who is affected.


> > Ah right. "tests/shell/testcases/transactions/table_onoff" is fixed
> > on
> > 6.5.6-200.fc38.x86_64. There still is a general problem. For
> > example
> > what about tests/shell/testcases/packetpath/vlan_8021ad_tag ?
> 
> Its also a bug that needs to be fixed in the kernel.
> I applied it after stable had picked it up for 6.5.7.
> 
> > 1) the test would exit 78 instead of 77. And run-test.sh would
> > treat 78
> > either as failure or as skip, based on NFT_TEST_FAIL_ON_SKIP
> > 
> > 2) the test itself could look at NFT_TEST_FAIL_ON_SKIP and decide
> > whether to exit with 77 or 1.
> > 
> > 
> > Or how about adding a mechanism, that compares the kernel version
> > and
> > decides whether to skip? For example
> 
> I don't think that kernel versions work or are something that we can
> realistically handle.  Even just RHEL would be a nightmare if one
> considers all the different release streams.
> 
> I think even just handling upstream -stable is too much work.

I think the kernel versions work reasonably well for upstream and
Fedora kernels (which is something already!).

I guess, there could be a smarter

  "$NFT_TEST_BASEDIR/helpers/eval-exit-code" kernel  upstream-6.6  upstream-6.5.6  c9s-5.14.0-373

that also can cover different "streams" (e.g. the uname from a centos).
But I like a NFT_TEST_FAIL_ON_SKIP_EXCEPT= better.

Also, at worst on the Frankenkernel you get a SKIP, when it should have
been a FAIL. For the non-expert user who writes a patch to fix a type
the SKIP is better during `make check`.

On upstream/Fedora kernels, you also don't need anything, and "eval-
exit-code" will end up doing the right thing automatically.

And if you maintain CentOS9Stream, then set NFT_TEST_FAIL_ON_SKIP=y and
NFT_TEST_FAIL_ON_SKIP_EXCEPT=<REGEX> and keep track of the tests that
are known to fail. You know your kernel, and the tests that are known
to be skipped.

How about that?

> 
> That said, I hope that these kinds of tests will happen less
> frequently
> over time.
> 

I like the optimism :)


Thomas


      reply	other threads:[~2023-10-17 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 13:12 [PATCH nft 1/3] tests/shell: skip "table_onoff" test if kernel patch is missing Thomas Haller
2023-10-16 13:12 ` [PATCH nft 2/3] tests/shell: skip "vlan_8021ad_tag" test instead of failing Thomas Haller
2023-10-16 13:12 ` [PATCH nft 3/3] tests/shell: add missing "vlan_8021ad_tag.nodump" file Thomas Haller
2023-10-16 20:20 ` [PATCH nft 1/3] tests/shell: skip "table_onoff" test if kernel patch is missing Florian Westphal
2023-10-17  6:22   ` Thomas Haller
2023-10-17  8:53     ` Thomas Haller
2023-10-17  9:32     ` Florian Westphal
2023-10-17 11:14       ` Thomas Haller [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=9179367fc2f8eaaad8fcc21d1bb724d4ad67e5c6.camel@redhat.com \
    --to=thaller@redhat.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.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 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).