On Tue, 26 Nov 2019 at 21:26, Florian Westphal fw@strlen.de wrote:
Naresh Kamboju naresh.kamboju@linaro.org wrote:
Do you see the following error while running selftests netfilter nft_nat.sh test ? Are we missing any kernel config fragments ? We are merging configs from the directory.
# selftests netfilter nft_nat.sh netfilter: nft_nat.sh_ # # Cannot create namespace file "/var/run/netns/ns1" File exists
'ns1' is not a good name. What is the output of nft --version?
nftables v0.7 (Scrooge McDuck)
Does this patch help? Even if it doesn't, its probably a good idea to add it.
I tested on arm64 Hikey and did not help. However, I will validate on x86_64 and other devices and let you know.
Subject: [PATCH] selftests: netfilter: use randomized netns names
Using ns0, ns1, etc. isn't a good idea, they might already exist. Add a random suffix to avoid interering with other, unrelated net namespaces.
Signed-off-by: Florian Westphal fw@strlen.de
tools/testing/selftests/netfilter/nft_nat.sh | 332 ++++++++++--------- 1 file changed, 176 insertions(+), 156 deletions(-)
+ ./nft_nat.sh [ 29.100929] IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready [ 29.191505] IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready internal:0:0-0: Error: Could not open file "-": No such file or directory internal:0:0-0: Error: Could not open file "-": No such file or directory internal:0:0-0: Error: Could not open file "-": No such file or directory [ 29.985551] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready <cmdline>:1:6-12: Error: syntax error, unexpected counter list counter inet filter ns0in ^^^^^^^ ERROR: ns0in counter in ns1-Tj5FGVgK has unexpected value (expected packets 1 bytes 84) at check_counters 1 <cmdline>:1:6-12: Error: syntax error, unexpected counter list counter inet filter ns0in ^^^^^^^ <cmdline>:1:6-12: Error: syntax error, unexpected counter list counter inet filter ns0out ^^^^^^^
ref: https://lkft.validation.linaro.org/scheduler/job/1025331#L1508