All of lore.kernel.org
 help / color / mirror / Atom feed
* [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode
@ 2023-02-17 13:48 Phil Sutter
  2023-02-17 13:48 ` [iptables PATCH 2/2] tests: xlate: Print file names even if specified Phil Sutter
  2023-02-17 18:49 ` [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode Phil Sutter
  0 siblings, 2 replies; 3+ messages in thread
From: Phil Sutter @ 2023-02-17 13:48 UTC (permalink / raw)
  To: netfilter-devel

Source command may contain quotes, using shlex.split() does the right
thing there.

Fixes: 7705b2daa3bdc ("tests: xlate: Use --check to verify replay")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 xlate-test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xlate-test.py b/xlate-test.py
index 1b544600aa242..09e3b67a853df 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -64,7 +64,7 @@ xtables_nft_multi = 'xtables-nft-multi'
     if sourceline.find(';') >= 0:
         sourceline, searchline = sourceline.split(';')
 
-    srcwords = sourceline.split()
+    srcwords = shlex.split(sourceline)
 
     srccmd = srcwords[0]
     ipt = srccmd.split('-')[0]
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [iptables PATCH 2/2] tests: xlate: Print file names even if specified
  2023-02-17 13:48 [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode Phil Sutter
@ 2023-02-17 13:48 ` Phil Sutter
  2023-02-17 18:49 ` [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode Phil Sutter
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2023-02-17 13:48 UTC (permalink / raw)
  To: netfilter-devel

Since the script now supports running for multiple files given on
command line, do not skip printing a status line for each.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 xlate-test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xlate-test.py b/xlate-test.py
index 09e3b67a853df..6a11659868479 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -176,7 +176,7 @@ xtables_nft_multi = 'xtables-nft-multi'
                 result.append(name + ": " + red("Fail"))
                 result.append("nft flush ruleset call failed: " + error)
 
-    if (passed == tests) and not args.test:
+    if (passed == tests):
         print(name + ": " + green("OK"))
     if not test_passed:
         print("\n".join(result), file=sys.stderr)
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode
  2023-02-17 13:48 [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode Phil Sutter
  2023-02-17 13:48 ` [iptables PATCH 2/2] tests: xlate: Print file names even if specified Phil Sutter
@ 2023-02-17 18:49 ` Phil Sutter
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2023-02-17 18:49 UTC (permalink / raw)
  To: netfilter-devel

On Fri, Feb 17, 2023 at 02:48:54PM +0100, Phil Sutter wrote:
> Source command may contain quotes, using shlex.split() does the right
> thing there.
> 
> Fixes: 7705b2daa3bdc ("tests: xlate: Use --check to verify replay")
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Series also applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-17 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 13:48 [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode Phil Sutter
2023-02-17 13:48 ` [iptables PATCH 2/2] tests: xlate: Print file names even if specified Phil Sutter
2023-02-17 18:49 ` [iptables PATCH 1/2] tests: xlate: Properly split input in replay mode Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.