]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: check if kernel supports for cgroupsv2 matching
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 19 May 2025 23:59:06 +0000 (01:59 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 May 2025 11:42:23 +0000 (13:42 +0200)
Update packetpath/cgroupv2 to skip it if kernel does not support it.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/features/cgroupsv2.nft [new file with mode: 0644]
tests/shell/testcases/packetpath/cgroupv2

diff --git a/tests/shell/features/cgroupsv2.nft b/tests/shell/features/cgroupsv2.nft
new file mode 100644 (file)
index 0000000..b6a3869
--- /dev/null
@@ -0,0 +1,7 @@
+# e0bb96db96f8 ("netfilter: nft_socket: add support for cgroupsv2")
+# v5.13-rc1~94^2~35^2~20
+table ip t {
+       chain c {
+               socket cgroupv2 level 1 "user.slice" counter
+       }
+}
index 65916e9db1e8c72eff6d55978eb59e9bdab25130..0a6199fee91f527594f716d9fa0d8e8fd44a81fe 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 # NFT_TEST_REQUIRES(NFT_TEST_HAVE_socat)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_cgroupsv2)
 
 doit="$1"
 rc=0