All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH] tests: shell: Add missing feature tests to packetpath tests
@ 2026-10-20 14:04 Phil Sutter
  2026-10-21 10:15 ` Phil Sutter
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2026-10-20 14:04 UTC (permalink / raw)
  To: netfilter-devel

Test system may lack conntrack-tools, add a feature test covering it.
Also add missing socat requirement where needed.

Fixes: e1c4f734eae7c ("tests: shell: add packetpath test for nft ct expectation support")
Fixes: cbb928d3307c4 ("tests: shell: add packetpath test for timeout policy overrides")
Fixes: fcef13a358a07 ("tests: shell: add 'nft ct set zone' test case")
Fixes: 3d4ed753c1231 ("tests: shell: Add a test case for FTP helper combined with NAT.")
Fixes: 9d8c7bbe82504 ("tests: shell: add packetpath test for nat on loopback")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tests/shell/features/conntrack.sh                  | 4 ++++
 tests/shell/testcases/packetpath/ct_expect         | 1 +
 tests/shell/testcases/packetpath/ct_timeout_policy | 3 +++
 tests/shell/testcases/packetpath/ct_zone_template  | 2 ++
 tests/shell/testcases/packetpath/nat_ftp           | 1 +
 tests/shell/testcases/packetpath/nat_lo            | 2 ++
 6 files changed, 13 insertions(+)
 create mode 100644 tests/shell/features/conntrack.sh

diff --git a/tests/shell/features/conntrack.sh b/tests/shell/features/conntrack.sh
new file mode 100644
index 0000000000000..5454c6b0cf0aa
--- /dev/null
+++ b/tests/shell/features/conntrack.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# check whether conntrack command is available
+conntrack --help >/dev/null 2>&1
diff --git a/tests/shell/testcases/packetpath/ct_expect b/tests/shell/testcases/packetpath/ct_expect
index cc8f52678cc5f..8b8981bb0b9fe 100755
--- a/tests/shell/testcases/packetpath/ct_expect
+++ b/tests/shell/testcases/packetpath/ct_expect
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_socat)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_conntrack)
 
 . $NFT_TEST_LIBRARY_FILE
 
diff --git a/tests/shell/testcases/packetpath/ct_timeout_policy b/tests/shell/testcases/packetpath/ct_timeout_policy
index 1fefcb52d6c38..13b790bfa5051 100755
--- a/tests/shell/testcases/packetpath/ct_timeout_policy
+++ b/tests/shell/testcases/packetpath/ct_timeout_policy
@@ -3,6 +3,9 @@
 # Defines ct timeout policies (1s) and verifies they expire for matching flows
 # while non matching flow stay alive >2s
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_socat)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_conntrack)
+
 . "$NFT_TEST_LIBRARY_FILE"
 
 ip link set lo up
diff --git a/tests/shell/testcases/packetpath/ct_zone_template b/tests/shell/testcases/packetpath/ct_zone_template
index c851e8f3280e7..0c8f92ba32e15 100755
--- a/tests/shell/testcases/packetpath/ct_zone_template
+++ b/tests/shell/testcases/packetpath/ct_zone_template
@@ -3,6 +3,8 @@
 # Check 'ct zone set 1' actually works, i.e. conntrack is created in
 # the assigned zone.
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_conntrack)
+
 . $NFT_TEST_LIBRARY_FILE
 
 set -e
diff --git a/tests/shell/testcases/packetpath/nat_ftp b/tests/shell/testcases/packetpath/nat_ftp
index bc44ed866125a..cfadd4a6b006e 100755
--- a/tests/shell/testcases/packetpath/nat_ftp
+++ b/tests/shell/testcases/packetpath/nat_ftp
@@ -3,6 +3,7 @@
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_tcpdump)
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_curl)
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_vsftpd)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_conntrack)
 
 # modprobe does not work in fake root env
 [ "$NFT_TEST_HAS_REALROOT" != y ] && exit 77
diff --git a/tests/shell/testcases/packetpath/nat_lo b/tests/shell/testcases/packetpath/nat_lo
index 862aadc82ef13..761c4433afd54 100755
--- a/tests/shell/testcases/packetpath/nat_lo
+++ b/tests/shell/testcases/packetpath/nat_lo
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_socat)
+
 set -e
 
 $NFT -f - <<EOF
-- 
2.54.0


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

* Re: [nft PATCH] tests: shell: Add missing feature tests to packetpath tests
  2026-10-20 14:04 [nft PATCH] tests: shell: Add missing feature tests to packetpath tests Phil Sutter
@ 2026-10-21 10:15 ` Phil Sutter
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Sutter @ 2026-10-21 10:15 UTC (permalink / raw)
  To: netfilter-devel

On Tue, Oct 20, 2026 at 04:04:03PM +0200, Phil Sutter wrote:
> Test system may lack conntrack-tools, add a feature test covering it.
> Also add missing socat requirement where needed.
> 
> Fixes: e1c4f734eae7c ("tests: shell: add packetpath test for nft ct expectation support")
> Fixes: cbb928d3307c4 ("tests: shell: add packetpath test for timeout policy overrides")
> Fixes: fcef13a358a07 ("tests: shell: add 'nft ct set zone' test case")
> Fixes: 3d4ed753c1231 ("tests: shell: Add a test case for FTP helper combined with NAT.")
> Fixes: 9d8c7bbe82504 ("tests: shell: add packetpath test for nat on loopback")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> ---
>  tests/shell/features/conntrack.sh                  | 4 ++++
>  tests/shell/testcases/packetpath/ct_expect         | 1 +
>  tests/shell/testcases/packetpath/ct_timeout_policy | 3 +++
>  tests/shell/testcases/packetpath/ct_zone_template  | 2 ++
>  tests/shell/testcases/packetpath/nat_ftp           | 1 +
>  tests/shell/testcases/packetpath/nat_lo            | 2 ++
>  6 files changed, 13 insertions(+)
>  create mode 100644 tests/shell/features/conntrack.sh
> 
> diff --git a/tests/shell/features/conntrack.sh b/tests/shell/features/conntrack.sh
> new file mode 100644

Patch applied after fixing for missing execute permissions in the new
feature test.

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

end of thread, other threads:[~2026-10-21 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 14:04 [nft PATCH] tests: shell: Add missing feature tests to packetpath tests Phil Sutter
2026-10-21 10:15 ` 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.