Re: [PATCH nft] tests: shell: Add coverage for nf_connlabels_replace()

Florian Westphal <[email protected]>
Newsgroups gmane.comp.security.firewalls.netfilter.devel
Message-ID <[email protected]>
Jiri Peska <[email protected]> wrote:
> Signed-off-by: Jiri Peska <[email protected]>
> ---
>  tests/shell/testcases/packetpath/ct_label_set |  27 ++++
>  .../packetpath/dumps/ct_label_set.json-nft    | 132 ++++++++++++++++++
>  .../packetpath/dumps/ct_label_set.nft         |  11 ++
>  3 files changed, 170 insertions(+)
>  create mode 100755 tests/shell/testcases/packetpath/ct_label_set
>  create mode 100644 tests/shell/testcases/packetpath/dumps/ct_label_set.json-nft
>  create mode 100644 tests/shell/testcases/packetpath/dumps/ct_label_set.nft

This fails for me in dump validation, diff is:

-               icmp type echo-request ip daddr 127.0.0.1 ct label set 1
-               icmp type echo-request ip daddr 127.0.0.1 ct label 1 counter name "labeled"
+               icmp type echo-request ip daddr 127.0.0.1 ct label set "bar"
+               icmp type echo-request ip daddr 127.0.0.1 ct label "bar" counter name "labeled"

This is caused by local configuration.  I'd remove the dump files here
before applying (and add a nodump file instead).

As the test explicitly checks counters in the script, it will still be
useful to assert match/nomatch.

What do you think?
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.