]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: Fix owner/0002-persist on aarch64
authorPhil Sutter <phil@nwl.cc>
Sun, 23 Mar 2025 21:46:18 +0000 (22:46 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 28 Mar 2025 15:47:02 +0000 (16:47 +0100)
Not sure if arch-specific, but for some reason src/nft wrapper script
would call src/.libs/lt-nft and thus the owner appeared as 'lt-nft'
instead of the expected 'nft'. Cover for that by extracting the expected
program name from /proc.

Fixes: b5205165bd708 ("tests: shell: Extend table persist flag test a bit")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
tests/shell/testcases/owner/0002-persist

index 98a8eb1368bc159958c30a5454991bb076a12e9f..700f00ec5e5f1ab4a3dc860381e81e00174def61 100755 (executable)
@@ -47,7 +47,8 @@ cat >&"${COPROC[1]}" <<EOF
 add table ip t { flags owner, persist; }
 EOF
 
-EXPECT="table ip t { # progname nft
+COMM=$(</proc/${COPROC_PID}/comm)
+EXPECT="table ip t { # progname $COMM
        flags owner,persist
 }"
 diff -u <(echo "$EXPECT") <($NFT list ruleset) || {