From: Thomas Haller <thaller@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, Florian Westphal <fw@strlen.de>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v3 2/6] tests/shell: check and generate JSON dump files
Date: Wed, 15 Nov 2023 11:11:10 +0100 [thread overview]
Message-ID: <ae718b9a5c02ac981c2f5b854056ab3ec15ba163.camel@redhat.com> (raw)
In-Reply-To: <ZVSVPgRFv9tTF4yQ@calendula>
On Wed, 2023-11-15 at 10:54 +0100, Pablo Neira Ayuso wrote:
> On Wed, Nov 15, 2023 at 09:24:27AM +0100, Florian Westphal wrote:
> > Thomas Haller <thaller@redhat.com> wrote:
> > > The rules after a successful test are good opportunity to test
> > > `nft -j list ruleset` and `nft -j --check`. This quite possibly
> > > touches
> > > code paths that are not hit by other tests yet.
> >
> > This series looks good to me, I'll apply it in the next few hours
> > if
> > noone else takes any action by then.
>
> Just a question, patch 3 is missing in patchwork. I guess it is too
> big.
Yes, it's not on the list, as it's too large. I CC-ed you and Florian
on patch 2/6.
You can also find it here:
https://gitlab.freedesktop.org/thaller/nftables/-/commit/b0edc64d005510b8c3db8a8ebe496a8296271bf4.patch
>
> My understanding is that this performs the json tests if nft comes
> with
> json support.
right.
>
> I wanted to give this a run, description says a few tests are
> failing.
For tests that fail, the patch 2/6 does not add a `.json-nft` file.
If you get any failure, that's wrong. Then the corresponding .json-nft
should be excluded from patch 2/6.
> Last time we talked it is chain binding support, then there is a good
> number of tests that are going to fail (or there is a mechanism to
> temporarily disable json tests for this without losing coverage?).
If chain binding support is missing, then that is detected via the
common mechanism (NFT_TEST_HAVE_chain_binding=n) and the test will be
marked as SKIPPED.
SKIPPED tests don't get their .nft dump checked. The same for .json-nft
files.
(of course, it also honors NFT_TEST_HAVE_json=n to skip the check).
>
> What is the current output from tests? I wanted to make this run
> myself so I don't need to ask.
it's the same as with .nft files.
If the .nft/.json-nft dump does not match, the test fails with [DUMP
FAIL]. As always, you can find the result data in /tmp.
I find it most useful to run
grep --color=always ^ -a -R /tmp/nft-test.latest.*/ | less -R
but whatever works for you.
Also, the test wrapper will call `nft --check -f x.nft` and `nft -j --
check -f x.json-nft` after tests. When those fail, you'll see [CHK
DUMP].
You can see that with:
DUMPGEN=all ./tests/shell/run-tests.sh tests/shell/testcases/chains/0011endless_jump_loop_1
Thomas
prev parent reply other threads:[~2023-11-15 10:11 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 15:29 [PATCH nft v3 0/6] add and check dump files for JSON in tests/shell Thomas Haller
2023-11-14 15:29 ` [PATCH nft v3 1/6] json: fix use after free in table_flags_json() Thomas Haller
2023-11-15 9:58 ` Pablo Neira Ayuso
2023-11-14 16:08 ` [PATCH nft v3 2/6] tests/shell: check and generate JSON dump files Thomas Haller
2023-11-14 16:08 ` [PATCH nft v3 4/6] tools: simplify error handling in "check-tree.sh" by adding msg_err()/msg_warn() Thomas Haller
2023-11-14 16:08 ` [PATCH nft v3 5/6] tools: check more strictly for bash shebang in "check-tree.sh" Thomas Haller
2023-11-14 16:08 ` [PATCH nft v3 6/6] tools: check for consistency of .json-nft dumps " Thomas Haller
2023-11-15 8:24 ` [PATCH nft v3 2/6] tests/shell: check and generate JSON dump files Florian Westphal
2023-11-15 9:54 ` Pablo Neira Ayuso
2023-11-15 10:01 ` Florian Westphal
2023-11-15 10:05 ` Pablo Neira Ayuso
2023-11-15 10:10 ` Florian Westphal
2023-11-15 10:26 ` Pablo Neira Ayuso
2023-11-15 10:31 ` Florian Westphal
2023-11-15 10:35 ` Pablo Neira Ayuso
2023-11-15 10:43 ` Pablo Neira Ayuso
2023-11-15 12:21 ` Florian Westphal
2023-11-15 12:30 ` Pablo Neira Ayuso
2023-11-15 12:36 ` Thomas Haller
2023-11-16 16:10 ` Pablo Neira Ayuso
2023-11-16 16:49 ` Thomas Haller
2023-11-16 16:55 ` Thomas Haller
2023-11-16 23:00 ` Florian Westphal
2023-11-16 23:02 ` Florian Westphal
2023-11-17 8:27 ` Pablo Neira Ayuso
2023-11-17 16:16 ` Thomas Haller
2023-11-17 16:36 ` Pablo Neira Ayuso
2023-11-17 16:56 ` Thomas Haller
2023-11-17 16:57 ` Phil Sutter
2023-11-17 17:06 ` Thomas Haller
2023-11-17 17:11 ` Phil Sutter
2023-11-17 17:23 ` Thomas Haller
2023-11-17 22:30 ` Phil Sutter
2023-11-15 10:11 ` 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=ae718b9a5c02ac981c2f5b854056ab3ec15ba163.camel@redhat.com \
--to=thaller@redhat.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).