Re: [PATCH] selftests: runner: Avoid spurious warning about missing failures file

From: Brendan Jackman

Date: Wed Jan 28 2026 - 06:19:04 EST


On Wed Jan 28, 2026 at 9:05 AM UTC, Thomas Weißschuh wrote:
> When runner.sh is *not* executed via run_kselftest.sh,

Hm, what's the usecase for that? runner.sh is a "library", right? So in
my mind there's basically an undocumented contract that you need to set
this variable before you call the relevant functions.

The fix below opens the door to bugs where we fail to report test
failures which would be... a shame!

> the variable
> $kselftest_failures_file does not exist. This triggers a harmless but
> annyoing warning from runner.sh if a test fails:
>
> tools/testing/selftests/kselftest/runner.sh: line 50: : No such file or directory
>
> Silence the spurious warning.
>
> Fixes: d9e6269e3303 ("selftests/run_kselftest.sh: exit with error if tests fail")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

Having said that, it's not a big deal, the risk of those bugs is not
that high and we'd probably notice them before too long. Assuming you
have a usecase where just setting the variable to /dev/null yourself is
a pain, this LGTM.

Reviewed-By: Brendan Jackman <jackmanb@xxxxxxxxxx>