mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: "Jori Koolstra (CIQ)" <jkoolstra@xs4all.nl>
Cc: "Shuah Khan" <shuah@kernel.org>,
	"David Ahern" <dsahern@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Ricardo B. Marlière" <ricardo@marliere.net>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] selftests: pass the timeout override to tests run in a netns
Date: Mon, 23 Nov 2026 14:25:41 +0800	[thread overview]
Message-ID: <20261123062541.GK10218@Liu-laptop> (raw)
In-Reply-To: <20261120-kselftest-run-timer-v2-1-9802690a370b@xs4all.nl>

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@xs4all.nl>
> ---
>  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@kylinos.cn>

  reply	other threads:[~2026-11-23  6:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 11:25 [PATCH v2 0/2] selftests: add option to print the time spent per test Jori Koolstra (CIQ)
2026-11-20 11:25 ` [PATCH v2 1/2] selftests: pass the timeout override to tests run in a netns Jori Koolstra (CIQ)
2026-11-23  6:25   ` Hangbin Liu [this message]
2026-11-20 11:25 ` [PATCH v2 2/2] selftests: add option to print the time spent per test Jori Koolstra (CIQ)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261123062541.GK10218@Liu-laptop \
    --to=hangbin.liu@linux.dev \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=jkoolstra@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=ricardo@marliere.net \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®