Re: [PATCH v2 1/2] selftests: pass the timeout override to tests run in a netns
From: Hangbin Liu
Date: Mon Nov 23 2026 - 01:26:13 EST
On Fri, Nov 20, 2026 at 06:25:28AM -0500, Jori Koolstra (CIQ) wrote:
> When run_kselftest.sh is invoked with -n, each test is run by in_netns()
> in a new bash process, which sources runner.sh again and then calls
> run_one(). Sourcing runner.sh resets its global settings, which is why
> in_netns() explicitly passes on logfile. kselftest_override_timeout is
> not passed on, so -o/--override-timeout is silently ignored for tests
> that are run in a network namespace and they use the timeout from their
> settings file or the default instead.
>
> Pass kselftest_override_timeout to the netns shell as well.
>
> Fixes: 9d0b4ad82d61 ("kselftest/runner.sh: add netns support")
> Signed-off-by: Jori Koolstra (CIQ) <jkoolstra@xxxxxxxxx>
> ---
> tools/testing/selftests/kselftest/runner.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
> index 45fb8ec38493..bbb2e61f323c 100644
> --- a/tools/testing/selftests/kselftest/runner.sh
> +++ b/tools/testing/selftests/kselftest/runner.sh
> @@ -169,6 +169,7 @@ in_netns()
> BASE_DIR=$BASE_DIR
> source $BASE_DIR/kselftest/runner.sh
> logfile=$logfile
> + kselftest_override_timeout=$kselftest_override_timeout
> run_one $DIR $TEST
> EOF
> }
Thanks for the fix.
Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>