[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95af874d-626e-00d0-b418-052323e00dd1@blackwall.org>
Date: Mon, 13 Mar 2023 15:34:45 +0200
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: syoshida@...hat.com, j.vosburgh@...il.com, andy@...yhouse.net,
kuba@...nel.org, davem@...emloft.net, pabeni@...hat.com,
edumazet@...gle.com,
syzbot+9dfc3f3348729cc82277@...kaller.appspotmail.com
Subject: Re: [PATCH net 2/2] selftests: rtnetlink: add a bond test trying to
enslave non-eth dev
On 13/03/2023 15:32, Nikolay Aleksandrov wrote:
> On 13/03/2023 15:28, Nikolay Aleksandrov wrote:
> [snip]
>> +kci_test_enslaved_bond_non_eth()
>> +{
>> + local ret=0
>> +
>> + ip link add name test-nlmon0 type nlmon
>> + ip link add name test-bond0 type bond
>> + ip link add name test-bond1 type bond
>> + ip link set dev test-bond0 master test-bond1
>> + ip link set dev test-nlmon0 master test-bond0 1>/dev/null 2>/dev/null
>> +
>> + ip -d l sh dev test-bond0 | grep -q "SLAVE"
>> + if [ $? -ne 0 ]; then
>> + echo "FAIL: IFF_SLAVE flag is missing from the bond device"
>> + check_err 1
>> + fi
>> + ip -d l sh dev test-bond0 | grep -q "MASTER"
>> + if [ $? -ne 0 ]; then
>> + echo "FAIL: IFF_MASTER flag is missing from the bond device"
>> + check_err 1
>> + fi
>> +
>> + # on error we return before cleaning up as that may hang the system
>
> I wasn't sure if this part was ok, let me know if you prefer to always attempt cleaning up
> and I'll send v2 moving the return after the cleanup attempt.
>
Actually sorry for the noise, I'll just send v2 instead with that change.
I don't have a good argument why we shouldn't attempt a cleanup after printing
the error messages even if the system hangs.
Powered by blists - more mailing lists