[PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes

Ricardo B. Marlière posted 6 patches 2 weeks ago
Makefile                                    |  1 +
tools/testing/selftests/Makefile            |  8 ++---
tools/testing/selftests/kselftest/runner.sh |  3 +-
tools/testing/selftests/run_kselftest.sh    | 46 +++++++++++++++++++++--------
4 files changed, 40 insertions(+), 18 deletions(-)
[PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes
Posted by Ricardo B. Marlière 2 weeks ago
Hi Shuah,

Please consider merging the following patches. They are mostly small fixes
to run_kselftest.sh, plus one feature: adding the option of passing a
directory to the "-p --per-test-log" argument.

There is a small corner case spotted in tools/testing/selftests/Makefile
regarding failing sub-targets, and also the removal of the default install
directory for out of tree builds in the top-level Makefile.

Thank you!

Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Ricardo B. Marlière (6):
      selftests/run_kselftest.sh: Remove unused $ROOT
      selftests/run_kselftest.sh: Add missing quotes
      selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P
      selftests/run_kselftest.sh: Allow choosing per-test log directory
      selftests: Preserve subtarget failures in all/install
      kbuild: remove kselftest output in mrproper

 Makefile                                    |  1 +
 tools/testing/selftests/Makefile            |  8 ++---
 tools/testing/selftests/kselftest/runner.sh |  3 +-
 tools/testing/selftests/run_kselftest.sh    | 46 +++++++++++++++++++++--------
 4 files changed, 40 insertions(+), 18 deletions(-)
---
base-commit: c612261bedd6bbab7109f798715e449c9d20ff2f
change-id: 20260320-selftests-fixes-dad2b1df50d9

Best regards,
-- 
Ricardo B. Marlière <rbm@suse.com>

Re: [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes
Posted by Shuah Khan 3 days, 4 hours ago
On 3/20/26 12:29, Ricardo B. Marlière wrote:
> Hi Shuah,
> 
> Please consider merging the following patches. They are mostly small fixes
> to run_kselftest.sh, plus one feature: adding the option of passing a
> directory to the "-p --per-test-log" argument.
> 
> There is a small corner case spotted in tools/testing/selftests/Makefile
> regarding failing sub-targets, and also the removal of the default install
> directory for out of tree builds in the top-level Makefile.
> 
> Thank you!
> 
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> Ricardo B. Marlière (6):
>        selftests/run_kselftest.sh: Remove unused $ROOT
>        selftests/run_kselftest.sh: Add missing quotes
>        selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P
>        selftests/run_kselftest.sh: Allow choosing per-test log directory
>        selftests: Preserve subtarget failures in all/install
>        kbuild: remove kselftest output in mrproper
> 
>   Makefile                                    |  1 +
>   tools/testing/selftests/Makefile            |  8 ++---
>   tools/testing/selftests/kselftest/runner.sh |  3 +-
>   tools/testing/selftests/run_kselftest.sh    | 46 +++++++++++++++++++++--------
>   4 files changed, 40 insertions(+), 18 deletions(-)

Thank you Ricardo. I applied the series to linux_kselftest next

I had to fix a minor merge conflict when I applied patch v2.
Please check to see if everything looks sane.

thanks,
-- Shuah
Re: [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes
Posted by Ricardo B. Marlière 2 days, 15 hours ago
On Tue Mar 31, 2026 at 7:43 PM -03, Shuah Khan wrote:
> On 3/20/26 12:29, Ricardo B. Marlière wrote:
>> Hi Shuah,
>> 
>> Please consider merging the following patches. They are mostly small fixes
>> to run_kselftest.sh, plus one feature: adding the option of passing a
>> directory to the "-p --per-test-log" argument.
>> 
>> There is a small corner case spotted in tools/testing/selftests/Makefile
>> regarding failing sub-targets, and also the removal of the default install
>> directory for out of tree builds in the top-level Makefile.
>> 
>> Thank you!
>> 
>> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
>> ---
>> Ricardo B. Marlière (6):
>>        selftests/run_kselftest.sh: Remove unused $ROOT
>>        selftests/run_kselftest.sh: Add missing quotes
>>        selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P
>>        selftests/run_kselftest.sh: Allow choosing per-test log directory
>>        selftests: Preserve subtarget failures in all/install
>>        kbuild: remove kselftest output in mrproper
>> 
>>   Makefile                                    |  1 +
>>   tools/testing/selftests/Makefile            |  8 ++---
>>   tools/testing/selftests/kselftest/runner.sh |  3 +-
>>   tools/testing/selftests/run_kselftest.sh    | 46 +++++++++++++++++++++--------
>>   4 files changed, 40 insertions(+), 18 deletions(-)
>
> Thank you Ricardo. I applied the series to linux_kselftest next
>
> I had to fix a minor merge conflict when I applied patch v2.
> Please check to see if everything looks sane.

Can you please drop commit 33880424308d
("selftests/run_kselftest.sh: Add missing quotes") ? This actually
introduced a regression. I'm sorry about that.

>
> thanks,
> -- Shuah