Skip to contentSkip to conversation

tests: shell: Fix owner/0002-persist on aarch64

PATCH In review Phil Sutter 2 participants 3 messages Mar 28, 2025 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 tests: shell: Fix owner/0002-persist on aarch64

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")
---
 tests/shell/testcases/owner/0002-persist | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/shell/testcases/owner/0002-persist +2 -1
index 98a8eb1368bc1..700f00ec5e5f1 100755
@@ -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) || {
Signature · 1 line
2.48.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Phil Sutter

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.

I've seen this as well before, thanks for investigating and fixing it.

author reviewer
#2 lore raw
Quoted 9 lines · Florian Westphal
Quoted 4 lines · Phil Sutter

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.

I've seen this as well before, thanks for investigating and fixing it.

Patch applied!