lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230103161101.GB19686@breakpoint.cc>
Date:   Tue, 3 Jan 2023 17:11:01 +0100
From:   Florian Westphal <fw@...len.de>
To:     Mirsad Goran Todorovac <mirsad.todorovac@....unizg.hr>
Cc:     Florian Westphal <fw@...len.de>, linux-kselftest@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        Shuah Khan <shuah@...nel.org>, Jakub Kicinski <kuba@...nel.org>
Subject: Re: PROBLEM: Hang in selftests/netfilter/nft_trans_stress.sh

Mirsad Goran Todorovac <mirsad.todorovac@....unizg.hr> wrote:
> > Can you send me the output of 'bash -x nft_trans_stress.sh'?
> > It should tell which command/program isn't making progress.
> 
> Hi, Florian!
> 
> Well, when ran alone, the script ended successfully:
> 
> root@...vin-IdeaPad-3-15ITL6:/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/netfilter# bash nft_trans_stress.sh
> PASS: nft add/delete test returned 0
> PASS: nft reload test returned 0
> PASS: nft add/delete with nftrace enabled test returned 0
> PASS: nft add/delete with nftrace enabled test returned 0
> root@...vin-IdeaPad-3-15ITL6:/home/marvin/linux/kernel/linux_torvalds/tools/testing/selftests/netfilter#
> 
> There was no stall after "nft reload test" in a standalone superuser run.

Hmm.  Does this patch make it work when running via 'make kselftest'?

diff --git a/tools/testing/selftests/netfilter/nft_trans_stress.sh b/tools/testing/selftests/netfilter/nft_trans_stress.sh
--- a/tools/testing/selftests/netfilter/nft_trans_stress.sh
+++ b/tools/testing/selftests/netfilter/nft_trans_stress.sh
@@ -10,12 +10,20 @@
 ksft_skip=4
 
 testns=testns-$(mktemp -u "XXXXXXXX")
+tmp=""
 
 tables="foo bar baz quux"
 global_ret=0
 eret=0
 lret=0
 
+cleanup() {
+	ip netns pids "$testns" | xargs kill 2>/dev/null
+	ip netns del "$testns"
+
+	rm -f "$tmp"
+}
+
 check_result()
 {
 	local r=$1
@@ -43,6 +51,7 @@ if [ $? -ne 0 ];then
 	exit $ksft_skip
 fi
 
+trap cleanup EXIT
 tmp=$(mktemp)
 
 for table in $tables; do
@@ -139,11 +148,4 @@ done
 
 check_result $lret "add/delete with nftrace enabled"
 
-pkill -9 ping
-
-wait
-
-rm -f "$tmp"
-ip netns del "$testns"
-
 exit $global_ret

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ