From: Hangbin Liu <hangbin.liu@linux.dev>
To: Qianheng Peng <pengqh1@chinatelecom.cn>
Cc: broonie@kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, liuhangbin@gmail.com,
rbm@suse.com, shuah@kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] selftests: runner.sh: avoid overriding kselftest_cmd_args with empty variable
Date: Wed, 2 Sep 2026 09:32:10 +0800 [thread overview]
Message-ID: <apd8mqEoyk8_O8ar@fedora> (raw)
In-Reply-To: <20260901120722.1875597-1-pengqh1@chinatelecom.cn>
On Tue, Sep 01, 2026 at 08:07:22PM +0800, Qianheng Peng wrote:
> Hi Hangbin,
> On Tue, 1 Sep 2026 17:46:14, Hangbin Liu wrote:
> >Hi Qianheng
> >On Tue, Sep 01, 2026 at 10:44:52AM +0800, Qianheng Peng wrote:
> >> On Tue, 14 Jul 2026 14:34:43, Qianheng Peng wrote:
> >> >Normally the value of kselftest_cmd_args can be read from settings file,
> >> >but it will be overridden by KSELFTEST_TEST_KMOD_SH_ARGS which can be
> >> >empty if user did not give it a real value.So it should be better to
> >> >check if KSELFTEST_TEST_KMOD_SH_ARGS is emty before referring its
> >> >value to kselftest_cmd_args.
> >
> >Where does KSELFTEST_TEST_KMOD_SH_ARGS from? kmod testing? If yes,
> >can we fix it there?
>
> Sorry for my confusing commit message and poor English.
> In fact the problem is not KSELFTEST_TEST_KMOD_SH_ARGS but empty
> kselftest_cmd_args_ref.
> If user does not export "KSELFTEST_${BASENAME_SANITIZED}_ARGS" (the
> ${BASENAME_SANITIZED} here can be anything like KMOD or RTCTEST) explicitly,
> kselftest_cmd_args_ref will be empty by default and override kselftest_cmd_args.
> So this patch will check whether kselftest_cmd_args_ref is empty before
> starting one test.
Oh, I see what you mean now.
kselftest_cmd_args_ref="KSELFTEST_${BASENAME_SANITIZED}_ARGS"
This is used to retrieve parameters for a *specific* test. When a test does not
require extra parameters, `KSELFTEST_${BASENAME_SANITIZED}_ARGS` is not set.
This has the same effect as when a user exports it but does not assign a value.
Therefore, I do not think we need to add a check for this case. Users should
understand the semantics when exporting the `KSELFTEST_${BASENAME_SANITIZED}_ARGS`
variable.
Thanks
Hangbin
next prev parent reply other threads:[~2026-09-02 1:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 6:34 QianhengPeng
2026-09-01 2:44 ` Qianheng Peng
2026-09-01 9:46 ` Hangbin Liu
2026-09-01 12:07 ` Qianheng Peng
2026-09-02 1:32 ` Hangbin Liu [this message]
2026-09-02 3:05 ` Qianheng Peng
2026-09-02 6:22 ` Hangbin Liu
2026-09-02 9:24 ` Qianheng Peng
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=apd8mqEoyk8_O8ar@fedora \
--to=hangbin.liu@linux.dev \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=pengqh1@chinatelecom.cn \
--cc=rbm@suse.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.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®