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: <ZaXSNR5NMAh-qaG8@Laptop-X1>
Date: Tue, 16 Jan 2024 08:47:49 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: "David S . Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>, Phil Sutter <phil@....cc>,
	David Ahern <dsahern@...nel.org>, Jiri Pirko <jiri@...nulli.us>,
	netdev@...r.kernel.org
Subject: Re: [PATCH net] selftests: rtnetlink: use setup_ns in bonding test

On Mon, Jan 15, 2024 at 02:59:22PM +0100, Nicolas Dichtel wrote:
> This is a follow-up of commit a159cbe81d3b ("selftests: rtnetlink: check
> enslaving iface in a bond") after the merge of net-next into net.
> 
> The goal is to follow the new convention,
> see commit d3b6b1116127 ("selftests/net: convert rtnetlink.sh to run it in
> unique namespace") for more details.
> 
> Let's use also the generic dummy name instead of defining a new one.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> ---
>  tools/testing/selftests/net/rtnetlink.sh | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
> index a31be0eaaa50..4667d74579d1 100755
> --- a/tools/testing/selftests/net/rtnetlink.sh
> +++ b/tools/testing/selftests/net/rtnetlink.sh
> @@ -1244,21 +1244,19 @@ kci_test_address_proto()
>  
>  kci_test_enslave_bonding()
>  {
> -	local testns="testns"
>  	local bond="bond123"
> -	local dummy="dummy123"
>  	local ret=0
>  
> -	run_cmd ip netns add "$testns"
> -	if [ $ret -ne 0 ]; then
> +	setup_ns testns
> +	if [ $? -ne 0 ]; then
>  		end_test "SKIP bonding tests: cannot add net namespace $testns"
>  		return $ksft_skip
>  	fi
>  
>  	run_cmd ip -netns $testns link add dev $bond type bond mode balance-rr
> -	run_cmd ip -netns $testns link add dev $dummy type dummy
> -	run_cmd ip -netns $testns link set dev $dummy up
> -	run_cmd ip -netns $testns link set dev $dummy master $bond down
> +	run_cmd ip -netns $testns link add dev $devdummy type dummy
> +	run_cmd ip -netns $testns link set dev $devdummy up
> +	run_cmd ip -netns $testns link set dev $devdummy master $bond down
>  	if [ $ret -ne 0 ]; then
>  		end_test "FAIL: initially up interface added to a bond and set down"
>  		ip netns del "$testns"
> -- 
> 2.39.2
> 

Thanks for the update.

Reviewed-by: Hangbin Liu <liuhangbin@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ