From: Pablo Neira Ayuso Date: Tue, 7 Nov 2023 09:05:59 +0000 (+0100) Subject: tests: shell: skip NAT netmap tests if kernel lacks support X-Git-Tag: v1.1.0~237 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfd94cc1be09c8ec9e2e8017dfdcf9694af6c88d;p=thirdparty%2Fnftables.git tests: shell: skip NAT netmap tests if kernel lacks support Skip tests that require NAT netmap support Signed-off-by: Pablo Neira Ayuso --- diff --git a/tests/shell/features/netmap.nft b/tests/shell/features/netmap.nft new file mode 100644 index 00000000..2580a8dc --- /dev/null +++ b/tests/shell/features/netmap.nft @@ -0,0 +1,8 @@ +# 3ff7ddb1353d ("netfilter: nft_nat: add netmap support") +# v5.8-rc1~165^2~393^2 +table ip x { + chain y { + type nat hook postrouting priority srcnat; policy accept; + snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24 } + } +} diff --git a/tests/shell/testcases/sets/0046netmap_0 b/tests/shell/testcases/sets/0046netmap_0 index 60bda401..7533623e 100755 --- a/tests/shell/testcases/sets/0046netmap_0 +++ b/tests/shell/testcases/sets/0046netmap_0 @@ -1,5 +1,7 @@ #!/bin/bash +# NFT_TEST_REQUIRES(NFT_TEST_HAVE_netmap) + EXPECTED="table ip x { chain y { type nat hook postrouting priority srcnat; policy accept;