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

From: Ido Schimmel

Date: Mon Oct 19 2026 - 02:07:27 EST


On Mon, Oct 19, 2026 at 08:41:03AM +0800, Hangbin Liu wrote:
> From: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> The changed four tests 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>