Re: [BUG] selftests/net: icmp_redirect.sh: 12 out of 40 test result with [FAIL]

From: Hangbin Liu
Date: Sun Mar 17 2024 - 22:38:56 EST


Hi Mirsad,

On Sat, Mar 16, 2024 at 11:59:54PM +0100, Mirsad Todorovac wrote:
> Hi,
>
> With the commit v6.8-11167-g4438a810f396 in vanilla torvalds tree, there seem to be problems with
> the icmp_redirect.sh tests.
>
> The iproute2-next tools were used, commit 7a6d30c95da9.
>
> # timeout set to 3600
> # selftests: net: icmp_redirect.sh
> #
> # ###########################################################################
> # Legacy routing
> # ###########################################################################
> #
> # TEST: IPv4: redirect exception [FAIL]
> # TEST: IPv6: redirect exception [ OK ]
> # TEST: IPv4: redirect exception plus mtu [FAIL]
> # TEST: IPv6: redirect exception plus mtu [ OK ]
> # TEST: IPv4: routing reset [ OK ]
> # TEST: IPv6: routing reset [ OK ]
> # TEST: IPv4: mtu exception [ OK ]
> # TEST: IPv6: mtu exception [ OK ]
> # TEST: IPv4: mtu exception plus redirect [FAIL]
> # TEST: IPv6: mtu exception plus redirect [ OK ]
> #
..
> #
> # TEST: IPv4: redirect exception [FAIL]
> # TEST: IPv6: redirect exception [ OK ]
> # TEST: IPv4: redirect exception plus mtu [FAIL]
> # TEST: IPv6: redirect exception plus mtu [ OK ]
> # TEST: IPv4: routing reset [ OK ]
> # TEST: IPv6: routing reset [ OK ]
> # TEST: IPv4: mtu exception [ OK ]
> # TEST: IPv6: mtu exception [ OK ]
> # TEST: IPv4: mtu exception plus redirect [FAIL]
> # TEST: IPv6: mtu exception plus redirect [ OK ]
> #
> # Tests passed: 28
> # Tests failed: 12
> # Tests xfailed: 0
> not ok 45 selftests: net: icmp_redirect.sh # exit=1
>
> These errors are not introduced with this commit, but were already present at least in 6.8-rc7.

I tried kernel 6.8 with net tree. All passed.

# ./icmp_redirect.sh

###########################################################################
Legacy routing
###########################################################################

TEST: IPv4: redirect exception [ OK ]
TEST: IPv6: redirect exception [ OK ]
TEST: IPv4: redirect exception plus mtu [ OK ]
TEST: IPv6: redirect exception plus mtu [ OK ]
TEST: IPv4: routing reset [ OK ]
TEST: IPv6: routing reset [ OK ]
TEST: IPv4: mtu exception [ OK ]
TEST: IPv6: mtu exception [ OK ]
TEST: IPv4: mtu exception plus redirect [ OK ]
TEST: IPv6: mtu exception plus redirect [ OK ]
..
TEST: IPv4: redirect exception [ OK ]
TEST: IPv6: redirect exception [ OK ]
TEST: IPv4: redirect exception plus mtu [ OK ]
TEST: IPv6: redirect exception plus mtu [ OK ]
TEST: IPv4: routing reset [ OK ]
TEST: IPv6: routing reset [ OK ]
TEST: IPv4: mtu exception [ OK ]
TEST: IPv6: mtu exception [ OK ]
TEST: IPv4: mtu exception plus redirect [ OK ]
TEST: IPv6: mtu exception plus redirect [ OK ]

Tests passed: 40
Tests failed: 0
Tests xfailed: 0

# uname -r
6.8.0-virtme

You can try enable verbose output and see where the failure occurred.

Wild guess, the last change of icmp_redirect is my netns update. Maybe there
are something default sysctl settings in netns cause the error?

Thanks
Hangbin