All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Thomas Haller <thaller@redhat.com>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft 2/2] json: drop handling missing json() hook for "struct expr_ops"
Date: Thu, 2 Nov 2023 21:51:35 +0100	[thread overview]
Message-ID: <ZUQL1690tW+XAnS4@calendula> (raw)
In-Reply-To: <6856ecfb5630d546f0d99a8fcb6008a20aea1324.camel@redhat.com>

On Thu, Nov 02, 2023 at 05:17:56PM +0100, Thomas Haller wrote:
> On Thu, 2023-11-02 at 16:54 +0100, Pablo Neira Ayuso wrote:
> > What example would be triggering bug?
> 
> when you apply above patchset (and revert patch 2/7), and:
> 
>     $ make
>     $ ./tests/shell/run-tests.sh
>     ...
>     $ grep '^[^ ]*W[^ ]*:' /tmp/nft-test.latest.*/test.log
>     W: [CHK DUMP]     8/381 tests/shell/testcases/chains/0041chain_binding_0  
>     W: [CHK DUMP]    66/381 tests/shell/testcases/cache/0010_implicit_chain_0
>     W: [CHK DUMP]   226/381 tests/shell/testcases/nft-f/sample-ruleset
>     $ grep -R 'Command `./tests/shell/../../src/nft -j list ruleset""` failed' /tmp/nft-test.latest.*/
>     ...
> 
> Gives:
> 
> tests/shell/testcases/nft-f/sample-ruleset
> tests/shell/testcases/cache/0010_implicit_chain_0
> tests/shell/testcases/chains/0041chain_binding_0
> 
> For example:
> 
> /tmp/nft-test.latest.thom/test-tests-shell-testcases-chains-0041chain_binding_0.4/rc-failed-chkdump:Command `./tests/shell/../../src/nft -j list ruleset""` failed
> /tmp/nft-test.latest.thom/test-tests-shell-testcases-chains-0041chain_binding_0.4/rc-failed-chkdump:>>>>
> /tmp/nft-test.latest.thom/test-tests-shell-testcases-chains-0041chain_binding_0.4/rc-failed-chkdump:warning: stmt ops chain have no json callback
> /tmp/nft-test.latest.thom/test-tests-shell-testcases-chains-0041chain_binding_0.4/rc-failed-chkdump:warning: stmt ops chain have no json callback

Yes, chain statement is lacking a json output, that is correct, that
needs to be done.

But, as for variable and symbol expressions, I do not see how those
can be found in the 'list ruleset' path. Note that symbol expressions
represent a preliminary state of the expression, these type of
expressions go away after evaluation. Same thing applies to variable
expression. They have no use for listing path.

Do you have tests that explicitly refer to the lack of json callback
for variable and symbol expressions just like in the warning above?

> /tmp/nft-test.latest.thom/test-tests-shell-testcases-chains-0041chain_binding_0.4/rc-failed-chkdump:<<<<
> 
> There are also other failures. e.g.
> tests/shell/testcases/parsing/large_rule_pipe does not give stable
> output. I need to drop that .json-nft file in v2.

What does 'unstable' mean in this case?

  reply	other threads:[~2023-11-02 20:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 11:20 [PATCH nft 1/2] json: implement json() hook for "symbol_expr_ops"/"variabl_expr_ops" Thomas Haller
2023-11-02 11:20 ` [PATCH nft 2/2] json: drop handling missing json() hook for "struct expr_ops" Thomas Haller
2023-11-02 11:27   ` Pablo Neira Ayuso
2023-11-02 14:09     ` Thomas Haller
2023-11-02 15:54       ` Pablo Neira Ayuso
2023-11-02 16:17         ` Thomas Haller
2023-11-02 20:51           ` Pablo Neira Ayuso [this message]
2023-11-03  8:45             ` Thomas Haller
2023-11-03 11:53               ` Pablo Neira Ayuso
2023-11-03 12:19                 ` Florian Westphal
2023-11-03 15:16                   ` Pablo Neira Ayuso
2023-11-03 12:14               ` Florian Westphal
2023-11-02 17:39   ` Thomas Haller
2023-11-02 19:49     ` Thomas Haller
2023-11-02 11:24 ` [PATCH nft 1/2] json: implement json() hook for "symbol_expr_ops"/"variabl_expr_ops" 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=ZUQL1690tW+XAnS4@calendula \
    --to=pablo@netfilter.org \
    --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.