Skip to content

json: Accept more than two operands in binary expressions

Phil Sutter netfilter-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v11 patch 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5json: Accept more than two operands in binary expressionsdoc/libnftables-json.adoc src/json.c src/parser_json.c +4 more+91 -2350 replies
2/5mergesort: Avoid accidental set element reorderingsrc/intervals.c src/mergesort.c tests/shell/testcases/sets/dumps/0055tcpflags_0.json-nft +1 more+22 -220 replies
3/5tests: py: Fix some JSON equivalentstests/py/any/meta.t.json tests/py/any/tcpopt.t.json tests/py/inet/tcp.t.json+75 -550 replies
4/5tests: py: Warn if recorded JSON output matches the inputtests/py/nft-test.py+2 -00 replies
5/5tests: py: Drop needless recorded JSON outputstests/py/any/last.t.json.output tests/py/any/meta.t.json.output tests/py/inet/tcp.t.json.output +2 more+0 -5120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [nft PATCH v2 0/5] json: Accept more than two operands in binary expressions

This needed rebase of patch 1 to cover for intermediate changes got a bit out of hand and resulted in this series:

Patch 2 fixes a bug in set element sorting triggered by binop expression elements being treated equal in value if the LHS parts match.

Patch 3 collates general bugs in recorded JSON equivalents for py testsuite.

Patch 4 adds detection of needless recorded JSON outputs to nft-tests.py, patch 5 then performs the cleanup to eliminate the warnings it generates.

Phil Sutter (5):
json: Accept more than two operands in binary expressions
mergesort: Avoid accidental set element reordering
tests: py: Fix some JSON equivalents
tests: py: Warn if recorded JSON output matches the input
tests: py: Drop needless recorded JSON outputs

 doc/libnftables-json.adoc                     |  18 +-
 src/intervals.c                               |   2 +-
 src/json.c                                    |  19 +-
 src/mergesort.c                               |   2 +-
 src/parser_json.c                             |  12 +
 tests/py/any/last.t.json.output               |   7 -
 tests/py/any/meta.t.json                      |   2 +-
 tests/py/any/meta.t.json.output               | 180 ----------
 tests/py/any/tcpopt.t.json                    |   4 +-
 tests/py/inet/tcp.t.json                      | 189 ++++------
 tests/py/inet/tcp.t.json.output               | 339 +-----------------
 tests/py/ip/numgen.t.json.output              |  30 --
 tests/py/ip6/exthdr.t.json.output             |  30 --
 tests/py/nft-test.py                          |   2 +
 .../dumps/0012different_defines_0.json-nft    |   8 +-
 .../sets/dumps/0055tcpflags_0.json-nft        | 114 ++----
 .../testcases/sets/dumps/0055tcpflags_0.nft   |   8 +-
 17 files changed, 166 insertions(+), 800 deletions(-)
Signature · 1 line
2.43.0