diff mbox series

[net,1/2] selftests: icmp_redirect: remove from checking for IPv6 route get

Message ID 20210707081530.1107289-2-liuhangbin@gmail.com (mailing list archive)
State Accepted
Commit 24b671aad4eae423e1abf5b7f08d9a5235458b8d
Delegated to: Netdev Maintainers
Headers show
Series Fix selftests icmp_redirect.sh failures | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers fail 2 blamed authors not CCed: davem@davemloft.net dsahern@gmail.com; 5 maintainers not CCed: linux-kselftest@vger.kernel.org dsahern@gmail.com davem@davemloft.net shuah@kernel.org kuba@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Hangbin Liu July 7, 2021, 8:15 a.m. UTC
If the kernel doesn't enable option CONFIG_IPV6_SUBTREES, the RTA_SRC
info will not be exported to userspace in rt6_fill_node(). And ip cmd will
not print "from ::" to the route output. So remove this check.

Fixes: ec8105352869 ("selftests: Add redirect tests")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tools/testing/selftests/net/icmp_redirect.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Ahern July 7, 2021, 2:49 p.m. UTC | #1
On 7/7/21 2:15 AM, Hangbin Liu wrote:
> If the kernel doesn't enable option CONFIG_IPV6_SUBTREES, the RTA_SRC
> info will not be exported to userspace in rt6_fill_node(). And ip cmd will
> not print "from ::" to the route output. So remove this check.
> 
> Fixes: ec8105352869 ("selftests: Add redirect tests")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
>  tools/testing/selftests/net/icmp_redirect.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh
> index c19ecc6a8614..3a111ac1edc3 100755
> --- a/tools/testing/selftests/net/icmp_redirect.sh
> +++ b/tools/testing/selftests/net/icmp_redirect.sh
> @@ -315,7 +315,7 @@ check_exception()
>  
>  	if [ "$with_redirect" = "yes" ]; then
>  		ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
> -		grep -q "${H2_N2_IP6} from :: via ${R2_LLADDR} dev br0.*${mtu}"
> +		grep -q "${H2_N2_IP6} .*via ${R2_LLADDR} dev br0.*${mtu}"
>  	elif [ -n "${mtu}" ]; then
>  		ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
>  		grep -q "${mtu}"
> 

Reviewed-by: David Ahern <dsahern@kernel.org>
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh
index c19ecc6a8614..3a111ac1edc3 100755
--- a/tools/testing/selftests/net/icmp_redirect.sh
+++ b/tools/testing/selftests/net/icmp_redirect.sh
@@ -315,7 +315,7 @@  check_exception()
 
 	if [ "$with_redirect" = "yes" ]; then
 		ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
-		grep -q "${H2_N2_IP6} from :: via ${R2_LLADDR} dev br0.*${mtu}"
+		grep -q "${H2_N2_IP6} .*via ${R2_LLADDR} dev br0.*${mtu}"
 	elif [ -n "${mtu}" ]; then
 		ip -netns h1 -6 ro get ${H1_VRF_ARG} ${H2_N2_IP6} | \
 		grep -q "${mtu}"