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: <bbb91e78-018f-c09c-47db-119010c810c2@fujitsu.com>
Date:   Tue, 7 Dec 2021 06:05:58 +0000
From:   "lizhijian@...itsu.com" <lizhijian@...itsu.com>
To:     "lizhijian@...itsu.com" <lizhijian@...itsu.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "shuah@...nel.org" <shuah@...nel.org>,
        "dsahern@...il.com" <dsahern@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jie2x Zhou <jie2x.zhou@...el.com>,
        "Li Zhijian(intel)" <zhijianx.li@...el.com>
Subject: Re: [PATCH v2] selftests: net: Correct case name

Hi folks

Currently,  LKP/0Day will cover bind tests, but LKP/0DAY observered 3 failures.

> # TESTS=bind ./fcnal-test.sh
> ###########################################################################
> IPv4 address binds
> ###########################################################################
>
>
> #################################################################
> No VRF
>
> TEST: Raw socket bind to local address - ns-A IP                              [ OK ]
> TEST: Raw socket bind to local address after device bind - ns-A IP            [ OK ]
> TEST: Raw socket bind to local address - ns-A loopback IP                     [ OK ]
> TEST: Raw socket bind to local address after device bind - ns-A loopback IP   [ OK ]
> TEST: TCP socket bind to local address - ns-A IP                              [ OK ]
> TEST: TCP socket bind to local address after device bind - ns-A IP            [ OK ]
>
> #################################################################
> With VRF
>
> TEST: Raw socket bind to local address - ns-A IP                              [ OK ]
> TEST: Raw socket bind to local address after device bind - ns-A IP            [ OK ]
> TEST: Raw socket bind to local address after VRF bind - ns-A IP               [ OK ]
> TEST: Raw socket bind to local address - VRF IP                               [FAIL]
>

i found that above case failed with "server: error binding socket: 99: Cannot assign requested address"
i have manually check it with below command after setup(), same errors:

# ip netns exec ns-A nettest -s -R -P icmp -l 172.16.3.1 -b
05:55:11 server: error binding socket: 99: Cannot assign requested address

But when i specified specific network interface, it works
# ip netns exec ns-A nettest -s -R -P icmp -l 172.16.3.1 -b -I red
# echo $?
0
# ip netns exec ns-A nettest -s -R -P icmp -l 172.16.3.1 -b
06:01:55 server: error binding socket: 99: Cannot assign requested address
# echo $?
1


So i wonder if i missed something ?




>
> TEST: Raw socket bind to local address after device bind - VRF IP             [ OK ]
> TEST: Raw socket bind to local address after VRF bind - VRF IP                [ OK ]
> TEST: Raw socket bind to out of scope address after VRF bind - ns-A loopback IP  [ OK ]
> TEST: TCP socket bind to local address - ns-A IP                              [ OK ]
> TEST: TCP socket bind to local address after device bind - ns-A IP            [ OK ]
> TEST: TCP socket bind to local address - VRF IP                               [ OK ]
> TEST: TCP socket bind to local address after device bind - VRF IP             [ OK ]
> TEST: TCP socket bind to invalid local address for VRF - ns-A loopback IP     [ OK ]
> TEST: TCP socket bind to invalid local address for device bind - ns-A loopback IP  [ OK ]
>
>
>
> # TESTS=bind6 ./fcnal-test.sh
>
> ###########################################################################
> IPv6 address binds
> ###########################################################################
>
>
> #################################################################
> No VRF
>
> TEST: Raw socket bind to local address - ns-A IPv6                            [FAIL]
> TEST: Raw socket bind to local address after device bind - ns-A IPv6          [ OK ]
> TEST: Raw socket bind to local address - ns-A loopback IPv6                   [ OK ]
> TEST: Raw socket bind to local address after device bind - ns-A loopback IPv6  [ OK ]
> TEST: TCP socket bind to local address - ns-A IPv6                            [ OK ]
> TEST: TCP socket bind to local address after device bind - ns-A IPv6          [ OK ]
> TEST: TCP socket bind to out of scope local address - ns-A loopback IPv6      [FAIL]
>
> #################################################################
> With VRF
>
> TEST: Raw socket bind to local address after vrf bind - ns-A IPv6             [ OK ]
> TEST: Raw socket bind to local address after device bind - ns-A IPv6          [ OK ]
> TEST: Raw socket bind to local address after vrf bind - VRF IPv6              [ OK ]
> TEST: Raw socket bind to local address after device bind - VRF IPv6           [ OK ]
> TEST: Raw socket bind to invalid local address after vrf bind - ns-A loopback IPv6  [ OK ]
> TEST: TCP socket bind to local address with VRF bind - ns-A IPv6              [ OK ]
> TEST: TCP socket bind to local address with VRF bind - VRF IPv6               [ OK ]
> TEST: TCP socket bind to local address with device bind - ns-A IPv6           [ OK ]
> TEST: TCP socket bind to VRF address with device bind - VRF IPv6              [FAIL]
> TEST: TCP socket bind to invalid local address for VRF - ns-A loopback IPv6   [ OK ]
> TEST: TCP socket bind to invalid local address for device bind - ns-A loopback IPv6  [ OK ]


Thanks
Zhijian


On 02/12/2021 10:28, Li Zhijian wrote:
> ipv6_addr_bind/ipv4_addr_bind are function names. Previously, bind test
> would not be run by default due to the wrong case names
>
> Fixes: 34d0302ab861 ("selftests: Add ipv6 address bind tests to fcnal-test")
> Fixes: 75b2b2b3db4c ("selftests: Add ipv4 address bind tests to fcnal-test")
> Signed-off-by: Li Zhijian <lizhijian@...fujitsu.com>
> ---
>   tools/testing/selftests/net/fcnal-test.sh | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
> index 3313566ce906..7f5b265fcb90 100755
> --- a/tools/testing/selftests/net/fcnal-test.sh
> +++ b/tools/testing/selftests/net/fcnal-test.sh
> @@ -4002,8 +4002,8 @@ EOF
>   ################################################################################
>   # main
>   
> -TESTS_IPV4="ipv4_ping ipv4_tcp ipv4_udp ipv4_addr_bind ipv4_runtime ipv4_netfilter"
> -TESTS_IPV6="ipv6_ping ipv6_tcp ipv6_udp ipv6_addr_bind ipv6_runtime ipv6_netfilter"
> +TESTS_IPV4="ipv4_ping ipv4_tcp ipv4_udp ipv4_bind ipv4_runtime ipv4_netfilter"
> +TESTS_IPV6="ipv6_ping ipv6_tcp ipv6_udp ipv6_bind ipv6_runtime ipv6_netfilter"
>   TESTS_OTHER="use_cases"
>   
>   PAUSE_ON_FAIL=no

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ