[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZaCSog00Bj8GmOZ4@Laptop-X1>
Date: Fri, 12 Jan 2024 09:15:14 +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 v4 2/2] selftests: rtnetlink: check enslaving iface
 in a bond
On Mon, Jan 08, 2024 at 10:41:03AM +0100, Nicolas Dichtel wrote:
> The goal is to check the following two sequences:
> > ip link set dummy0 up
> > ip link set dummy0 master bond0 down
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> ---
>  tools/testing/selftests/net/rtnetlink.sh | 28 ++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
> index 26827ea4e3e5..bbf9d2bd3d7b 100755
> --- a/tools/testing/selftests/net/rtnetlink.sh
> +++ b/tools/testing/selftests/net/rtnetlink.sh
> @@ -28,6 +28,7 @@ ALL_TESTS="
>  	kci_test_neigh_get
>  	kci_test_bridge_parent_id
>  	kci_test_address_proto
> +	kci_test_enslave_bonding
>  "
>  
>  devdummy="test-dummy0"
> @@ -1239,6 +1240,33 @@ kci_test_address_proto()
>  	return $ret
>  }
>  
> +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
> +		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
Hi Nicolas,
FYI, the selftests/net/lib.sh has been merged to net tree. Please remember
send a following up update to create the netns with setup_ns.
Thanks
Hangbin
Powered by blists - more mailing lists
 
