Re: [PATCH net-next] selftests: net: exit with test failure status

From: Ido Schimmel

Date: Sun Oct 18 2026 - 07:48:52 EST


On Wed, Oct 14, 2026 at 01:32:24PM +0800, Hangbin Liu wrote:
> From: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> fdb_flush.sh, fib-onlink-tests.sh and l2tp.sh can print [FAIL]
> subtests while still exiting with status 0. Their log_test(), aka
> log_test_expected() in lib.sh, helpers record a failure in ret, but
> the scripts never propagate ret to the exit code, so a kselftest runner
> treats the run as a pass.
>
> Initialize ret and exit with it at the end of each script so failed
> subtests are reflected in the exit status.
>
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>

Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>

fib_nexthop_multiprefix.sh seems to suffer from the same problem