From: Phil Sutter <phil@nwl.cc>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2 iptables-nft 2/3] extensions: change expected output for new format
Date: Tue, 29 Nov 2022 16:46:57 +0100 [thread overview]
Message-ID: <Y4Ypce59j6HbKl0k@orbyte.nwl.cc> (raw)
In-Reply-To: <20221129140542.28311-3-fw@strlen.de>
On Tue, Nov 29, 2022 at 03:05:41PM +0100, Florian Westphal wrote:
> Now that xtables-translate encloses the entire command line in ', update
> the test cases accordingly.
We could also do something like this (untested) and leave the test cases
as-is:
diff --git a/xlate-test.py b/xlate-test.py
index f3fcd797af908..82999beadb2d6 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -158,9 +158,14 @@ xtables_nft_multi = 'xtables-nft-multi'
sourceline = line.split(';')[0]
expected = payload.readline().rstrip(" \n")
- next_expected = payload.readline()
+ if expected.startswith("nft ") and expected[5] != "'":
+ expected = "nft '" + expected.removeprefix("nft ") + "'"
+ next_expected = payload.readline().rstrip(" \n")
if next_expected.startswith("nft"):
- expected += "\n" + next_expected.rstrip(" \n")
+ if next_expected[5] != "'":
+ expected += "\nnft '" + next_expected.removeprefix("nft ") + "'"
+ else:
+ expected += "\n" + next_expected
line = payload.readline()
else:
line = next_expected
Cheers, Phil
next prev parent reply other threads:[~2022-11-29 15:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 14:05 [PATCH v2 iptables-nft 0/3] remove escape_quotes support Florian Westphal
2022-11-29 14:05 ` [PATCH v2 iptables-nft 1/3] xlate: get rid of escape_quotes Florian Westphal
2022-11-29 15:37 ` Phil Sutter
2022-11-30 7:47 ` Florian Westphal
2022-11-30 9:34 ` Phil Sutter
2022-11-29 14:05 ` [PATCH v2 iptables-nft 2/3] extensions: change expected output for new format Florian Westphal
2022-11-29 15:46 ` Phil Sutter [this message]
2022-11-30 8:00 ` Florian Westphal
2022-11-30 9:28 ` Phil Sutter
2022-11-29 14:05 ` [PATCH v2 iptables-nft 3/3] xlate-test: avoid shell entanglements Florian Westphal
2022-11-29 15:50 ` Phil Sutter
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=Y4Ypce59j6HbKl0k@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).