From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Thomas Haller <thaller@redhat.com>
Cc: NetFilter <netfilter-devel@vger.kernel.org>,
Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH nft v2 3/6] tests/shell: add JSON dump files
Date: Mon, 6 Nov 2023 15:04:11 +0100 [thread overview]
Message-ID: <ZUjyW5Kx40Z8TUYo@calendula> (raw)
In-Reply-To: <a26297c51f49e2f8af1c6eb3f2f18a54b5cd347b.camel@redhat.com>
On Mon, Nov 06, 2023 at 02:56:18PM +0100, Thomas Haller wrote:
> On Fri, 2023-11-03 at 19:26 +0100, Thomas Haller wrote:
> > Generate and add ".json-nft" files. These files contain the output of
> > `nft -j list ruleset` after the test. Also, "test-wrapper.sh" will
> > compare the current ruleset against the ".json-nft" files and test
> > them
> > with "nft -j --check -f $FILE`. These are useful extra tests, that we
> > almost get for free.
> >
> > Note that for some JSON dumps, `nft -f --check` fails (or prints
> > something). For those tests no *.json-nft file is added. The bugs
> > needs
> > to be fixed first.
> >
> > An example of such an issue is:
> >
> > $ DUMPGEN=all ./tests/shell/run-tests.sh
> > tests/shell/testcases/maps/nat_addr_port
> >
> > which gives a file "rc-failed-chkdump" with
> >
> > Command `./tests/shell/../../src/nft -j --check -f
> > "tests/shell/testcases/maps/dumps/nat_addr_port.json-nft"` failed
> > >>>>
> > internal:0:0-0: Error: Invalid map type 'ipv4_addr .
> > inet_service'.
> >
> > internal:0:0-0: Error: Parsing command array at index 3 failed.
> >
> > internal:0:0-0: Error: unqualified type integer specified in map
> > definition. Try "typeof expression" instead of "type datatype".
> >
> > <<<<
> >
> > Tests like "tests/shell/testcases/nft-f/0012different_defines_0" and
> > "tests/shell/testcases/nft-f/0024priority_0" also don't get a .json-
> > nft
> > dump yet, because their output is not stable. That needs fixing too.
> >
> > Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> > Cc: Florian Westphal <fw@strlen.de>
> > Signed-off-by: Thomas Haller <thaller@redhat.com>
> > ---
> ...
> > tests/shell/testcases/sets/dumps/0062set_connlimit_0.json-nft |
> ...
> > tests/shell/testcases/sets/dumps/0062set_connlimit_0.json-nft
> > create mode 100644
>
>
> "tests/shell/testcases/sets/dumps/0062set_connlimit_0.json-nft" need to
> be dropped from this patch.
>
> Otherwise,
>
> make && ./tests/shell/run-tests.sh tests/shell/testcases/sets/0062set_connlimit_0 -V
>
> fails (in valgrind mode).
I have to fix 0062set_connlimit_0, the listing fails because the GC is
fast enough to remove the entry that just got added, because it has no
conntrack entries.
Maybe valgrind is just getting things slowier there to trigger what
I can already reproduce here on a VM?
next prev parent reply other threads:[~2023-11-06 14:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 18:25 [PATCH nft v2 0/6] add and check dump files for JSON in tests/shell Thomas Haller
2023-11-03 18:25 ` [PATCH nft v2 1/6] json: fix use after free in table_flags_json() Thomas Haller
2023-11-03 18:25 ` [PATCH nft v2 2/6] tests/shell: check and generate JSON dump files Thomas Haller
2023-11-03 18:26 ` [PATCH nft v2 4/6] tools: simplify error handling in "check-tree.sh" by adding msg_err()/msg_warn() Thomas Haller
2023-11-03 18:26 ` [PATCH nft v2 5/6] tools: check more strictly for bash shebang in "check-tree.sh" Thomas Haller
2023-11-03 18:26 ` [PATCH nft v2 6/6] tools: check for consistency of .json-nft dumps " Thomas Haller
[not found] ` <20231103182901.3795263-4-thaller@redhat.com>
2023-11-06 13:56 ` [PATCH nft v2 3/6] tests/shell: add JSON dump files Thomas Haller
2023-11-06 14:04 ` Pablo Neira Ayuso [this message]
2023-11-06 14:18 ` Thomas Haller
2023-11-07 11:32 ` [PATCH nft v2 0/6] add and check dump files for JSON in tests/shell Pablo Neira Ayuso
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=ZUjyW5Kx40Z8TUYo@calendula \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=thaller@redhat.com \
/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.