netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH iptables-nft] tests: extend native delinearize script
Date: Fri, 23 Sep 2022 16:12:27 +0200	[thread overview]
Message-ID: <Yy2+y1z7p/FhpRGN@orbyte.nwl.cc> (raw)
In-Reply-To: <20220923121725.875-1-fw@strlen.de>

On Fri, Sep 23, 2022 at 02:17:25PM +0200, Florian Westphal wrote:
[...]
> diff --git a/iptables/tests/shell/testcases/nft-only/0010-native-delinearize_0 b/iptables/tests/shell/testcases/nft-only/0010-native-delinearize_0
> index cca36fd88d6c..7859e76c9dd5 100755
> --- a/iptables/tests/shell/testcases/nft-only/0010-native-delinearize_0
> +++ b/iptables/tests/shell/testcases/nft-only/0010-native-delinearize_0
> @@ -5,22 +5,5 @@ nft -v >/dev/null || exit 0
>  
>  set -e
>  
> -nft -f - <<EOF
> -table ip filter {
> -	chain FORWARD {
> -		type filter hook forward priority filter;
> -		limit rate 10/day counter
> -		udp dport 42 counter
> -	}
> -}
> -EOF
> -
> -EXPECT="*filter
> -:INPUT ACCEPT [0:0]
> -:FORWARD ACCEPT [0:0]
> -:OUTPUT ACCEPT [0:0]
> --A FORWARD -m limit --limit 10/day
> --A FORWARD -p udp -m udp --dport 42
> -COMMIT"
> -
> -diff -u -Z <(echo -e "$EXPECT") <($XT_MULTI iptables-save | grep -v '^#')
> +unshare -n bash -c "nft -f $(dirname $0)/0010-nft-native.txt;
> +  diff -u -Z $(dirname $0)/0010-iptables-nft-save.txt <($XT_MULTI iptables-save | grep -v '^#')"

run-test.sh calls unshare already. Apart from that:

Acked-by: Phil Sutter <phil@nwl.cc>

      reply	other threads:[~2022-09-23 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 12:17 [PATCH iptables-nft] tests: extend native delinearize script Florian Westphal
2022-09-23 14:12 ` Phil Sutter [this message]

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=Yy2+y1z7p/FhpRGN@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).