Re: [nft PATCH 0/2] tests: shell: Keep dumps with numeric protocol values

Pablo Neira Ayuso <[email protected]>
Newsgroups gmane.comp.security.firewalls.netfilter.devel
Message-ID <an2x1tOQN99iCI8L@chamomile>
Hi Phil,

On Thu, Aug 13, 2026 at 01:45:54PM +0200, Phil Sutter wrote:
> Adjust the test wrapper to create dumps with --numeric-protocol option
> (patch 1) and update all dumps (patch 2).

Is this to make it consistent through different distros due to
different definitions in /etc/services?

Thanks!

> One could also set --stateless, py test suite does that, too. Though
> there are tests (in packetpath dir) which seem to rely upon counter or
> other stateful data to be matched in dump files, so keep state for now.
> 
> Phil Sutter (2):
>   tests: shell: Use --numeric-protocol for dumps
>   tests: shell: Convert dumps to numeric protocols
> 
>  tests/shell/helpers/test-wrapper.sh           |  9 ++--
>  .../cache/dumps/0003_cache_update_0.json-nft  |  4 +-
>  .../cache/dumps/0003_cache_update_0.nft       |  4 +-
>  .../chains/dumps/0041chain_binding_0.nft      |  4 +-
>  .../maps/dumps/0010concat_map_0.json-nft      |  2 +-
>  .../testcases/maps/dumps/0010concat_map_0.nft |  2 +-
>  .../testcases/maps/dumps/0013map_0.json-nft   |  2 +-
>  .../shell/testcases/maps/dumps/0013map_0.nft  |  2 +-
>  .../maps/dumps/anon_objmap_concat.json-nft    |  4 +-
>  .../maps/dumps/anon_objmap_concat.nft         |  2 +-
>  .../maps/dumps/named_limits.json-nft          | 14 ++---
>  .../testcases/maps/dumps/named_limits.nft     | 14 ++---
>  .../maps/dumps/nat_addr_port.json-nft         | 16 +++---
>  .../testcases/maps/dumps/nat_addr_port.nft    | 16 +++---
>  .../maps/dumps/typeof_maps_0.json-nft         |  6 +--
>  .../testcases/maps/dumps/typeof_maps_0.nft    |  4 +-
>  .../dumps/typeof_maps_add_delete.json-nft     |  2 +-
>  .../maps/dumps/typeof_maps_add_delete.nft     |  2 +-
>  .../dumps/0012different_defines_0.json-nft    |  4 +-
>  .../nft-f/dumps/0012different_defines_0.nft   |  2 +-
>  .../dumps/named_set_as_protocol_dep.json-nft  |  4 +-
>  .../nft-f/dumps/named_set_as_protocol_dep.nft |  2 +-
>  .../testcases/nft-f/dumps/sample-ruleset.nft  |  4 +-
>  .../optimizations/dumps/merge_reject.json-nft | 12 ++---
>  .../optimizations/dumps/merge_reject.nft      |  4 +-
>  .../dumps/merge_stmts_concat.json-nft         |  4 +-
>  .../dumps/merge_stmts_concat.nft              |  2 +-
>  .../dumps/merge_vmap_raw.json-nft             | 10 ++--
>  .../optimizations/dumps/merge_vmap_raw.nft    | 10 ++--
>  .../optimizations/dumps/merge_vmaps.json-nft  |  4 +-
>  .../optimizations/dumps/merge_vmaps.nft       |  2 +-
>  .../dumps/exclusive_start_cond.json-nft       | 52 +++++++++----------
>  .../parsing/dumps/exclusive_start_cond.nft    | 42 +++++++--------
>  .../parsing/dumps/large_rule_pipe.json-nft    | 24 ++++-----
>  .../parsing/dumps/large_rule_pipe.nft         | 12 ++---
>  .../0037_set_with_inet_service_0.json-nft     | 10 ++--
>  .../dumps/0037_set_with_inet_service_0.nft    | 10 ++--
>  .../shell/testcases/sets/dumps/0047nat_0.nft  |  2 +-
>  .../sets/dumps/0067nat_concat_interval_0.nft  |  6 +--
>  .../sets/dumps/0067nat_interval_0.nft         |  2 +-
>  .../testcases/sets/dumps/set_eval_0.json-nft  |  4 +-
>  .../shell/testcases/sets/dumps/set_eval_0.nft |  2 +-
>  .../sets/dumps/sets_with_ifnames.json-nft     |  4 +-
>  .../sets/dumps/sets_with_ifnames.nft          |  4 +-
>  .../transactions/dumps/0049huge_0.json-nft    | 16 +++---
>  .../transactions/dumps/0049huge_0.nft         |  8 +--
>  46 files changed, 186 insertions(+), 185 deletions(-)
> 
> -- 
> 2.54.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.