Re: [PATCH v2] selftests: net: Correct case name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

>After the last round of patches all tests but 2 pass with the 5.16.0-rc3
>kernel (net-next based) and ubuntu 20.04 OS.
>The 2 failures are due local pings and to bugs in 'ping' - it removes
>the device bind by calling setsockopt with an "" arg.

The failed testcase command is nettest not ping.
COMMAND: ip netns exec ns-A nettest -s -R -P icmp -l 172.16.1.1 -b
TEST: Raw socket bind to local address - ns-A IP                              [FAIL]

It failed because it return 0.
But the patch expected return 1.

May be the patch should expected 0 return value for  ${NSA_IP}.
And expected 1 return value for  ${VRF_IP}.

diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index dd7437dd2680b..4340477863d36 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -1810,8 +1810,9 @@ ipv4_addr_bind_vrf()
        for a in ${NSA_IP} ${VRF_IP}
        do
                log_start
+               show_hint "Socket not bound to VRF, but address is in VRF"
                run_cmd nettest -s -R -P icmp -l ${a} -b
-               log_test_addr ${a} $? 0 "Raw socket bind to local address"
+               log_test_addr ${a} $? 1 "Raw socket bind to local address"

                log_start
                run_cmd nettest -s -R -P icmp -l ${a} -I ${NSA_DEV} -b

best regards,

________________________________________
From: David Ahern <dsahern@xxxxxxxxx>
Sent: Monday, December 13, 2021 12:09 PM
To: Zhou, Jie2X; lizhijian@xxxxxxxxxxx; davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx; shuah@xxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx; linux-kselftest@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Li, ZhijianX; Li, Philip; Ma, XinjianX
Subject: Re: [PATCH v2] selftests: net: Correct case name

On 12/12/21 8:08 PM, Zhou, Jie2X wrote:
> hi,
>
> I try to apply the "selftests: Fix raw socket bind tests with VRF" patch.
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=0f108ae44520
>
> And found that following changes.
> TEST: Raw socket bind to local address - ns-A IP                              [ OK ]
> => TEST: Raw socket bind to local address - ns-A IP                              [FAIL]
> TEST: Raw socket bind to local address - VRF IP                               [FAIL]
> => TEST: Raw socket bind to local address - VRF IP                               [ OK ]
>

After the last round of patches all tests but 2 pass with the 5.16.0-rc3
kernel (net-next based) and ubuntu 20.04 OS.

The 2 failures are due local pings and to bugs in 'ping' - it removes
the device bind by calling setsockopt with an "" arg.




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux