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] [day] [month] [year] [list]
Message-ID: <ZIF3fVvDUESywBcp@shredder>
Date: Thu, 8 Jun 2023 09:38:53 +0300
From: Ido Schimmel <idosch@...sch.org>
To: Vladimir Nikishkin <vladimir@...ishkin.pw>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com,
	eng.alaamohamedsoliman.am@...il.com, gnault@...hat.com,
	razor@...ckwall.org, idosch@...dia.com, liuhangbin@...il.com,
	eyal.birger@...il.com, jtoppins@...hat.com, shuah@...nel.org,
	linux-kselftest@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [PATCH net-next v1] selftests: net: vxlan: Fix selftest
 regression after changes in iproute2.

On Thu, Jun 08, 2023 at 09:04:00AM +0800, Vladimir Nikishkin wrote:
> The iproute2 output that eventually landed upstream is different than
> the one used in this test, resulting in failures. Fix by adjusting the
> test to use iproute2's JSON output, which is more stable than regular
> output.
> 
> Fixes: 305c04189997 ("selftests: net: vxlan: Add tests for vxlan nolocalbypass option.")
> Signed-off-by: Vladimir Nikishkin <vladimir@...ishkin.pw>
> ---
> v0=>v1: Fix spaces in indentation. Correct commit message.
> 
> tools/testing/selftests/net/test_vxlan_nolocalbypass.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh b/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
> index 46067db53068..3ce630e4a18b 100755
> --- a/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
> +++ b/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
> @@ -130,7 +130,7 @@ nolocalbypass()
>  	run_cmd "tc -n ns1 qdisc add dev lo clsact"
>  	run_cmd "tc -n ns1 filter add dev lo ingress pref 1 handle 101 proto ip flower ip_proto udp dst_port 4790 action drop"
>  
> -	run_cmd "ip -n ns1 -d link show dev vx0 | grep ' localbypass'"
> +        run_cmd "ip -n ns1 -d -j link show dev vx0 | jq -e '.[][\"linkinfo\"][\"info_data\"][\"localbypass\"] == true'"

Still has spaces instead of tab. Visible in the diff

>  	log_test $? 0 "localbypass enabled"
>  
>  	run_cmd "ip netns exec ns1 mausezahn vx0 -a $smac -b $dmac -c 1 -p 100 -q"
> @@ -140,7 +140,7 @@ nolocalbypass()
>  
>  	run_cmd "ip -n ns1 link set dev vx0 type vxlan nolocalbypass"
>  
> -	run_cmd "ip -n ns1 -d link show dev vx0 | grep 'nolocalbypass'"
> +        run_cmd "ip -n ns1 -d -j link show dev vx0 | jq -e '.[][\"linkinfo\"][\"info_data\"][\"localbypass\"] == false'"

Likewise

>  	log_test $? 0 "localbypass disabled"
>  
>  	run_cmd "ip netns exec ns1 mausezahn vx0 -a $smac -b $dmac -c 1 -p 100 -q"
> @@ -150,7 +150,7 @@ nolocalbypass()
>  
>  	run_cmd "ip -n ns1 link set dev vx0 type vxlan localbypass"
>  
> -	run_cmd "ip -n ns1 -d link show dev vx0 | grep ' localbypass'"
> +	run_cmd "ip -n ns1 -d -j link show dev vx0 | jq -e '.[][\"linkinfo\"][\"info_data\"][\"localbypass\"] == true'"

This is OK

>  	log_test $? 0 "localbypass enabled"
>  
>  	run_cmd "ip netns exec ns1 mausezahn vx0 -a $smac -b $dmac -c 1 -p 100 -q"
> -- 
> 2.35.8
> 
> --
> Fastmail.
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ