* [PATCH 1/6] selftests/run_kselftest.sh: Remove unused $ROOT
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
@ 2026-03-20 18:29 ` Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 2/6] selftests/run_kselftest.sh: Add missing quotes Ricardo B. Marlière
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-03-20 18:29 UTC (permalink / raw)
To: Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild,
Ricardo B. Marlière
Fix the following shellcheck warning:
ROOT appears unused. Verify use (or export if used externally). [SC2034]
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/selftests/run_kselftest.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index 84d45254675c..9abea79018d7 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -21,7 +21,6 @@ else
fi
. ./kselftest/runner.sh
-ROOT=$PWD
usage()
{
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 2/6] selftests/run_kselftest.sh: Add missing quotes
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 1/6] selftests/run_kselftest.sh: Remove unused $ROOT Ricardo B. Marlière
@ 2026-03-20 18:29 ` Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 3/6] selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P Ricardo B. Marlière
` (4 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-03-20 18:29 UTC (permalink / raw)
To: Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild,
Ricardo B. Marlière
Fix the following shellcheck warning:
Double quote to prevent globbing and word splitting. [SC2086]
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/selftests/run_kselftest.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index 9abea79018d7..b782b025d002 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -11,7 +11,7 @@ else
BASE_DIR=$(readlink -f $(dirname $0))
fi
-cd $BASE_DIR
+cd "$BASE_DIR"
TESTS="$BASE_DIR"/kselftest-list.txt
if [ ! -r "$TESTS" ] ; then
echo "$0: Could not find list of tests to run ($TESTS)" >&2
@@ -38,7 +38,7 @@ Usage: $0 [OPTIONS]
-h | --help Show this usage info
-o | --override-timeout Number of seconds after which we timeout
EOF
- exit $1
+ exit "$1"
}
COLLECTIONS=""
@@ -51,7 +51,7 @@ while true; do
case "$1" in
-s | --summary)
logfile="$BASE_DIR"/output.log
- cat /dev/null > $logfile
+ cat /dev/null > "$logfile"
shift ;;
-p | --per-test-log)
per_test_logging=1
@@ -127,7 +127,7 @@ collections=$(echo "$available" | cut -d: -f1 | sort | uniq)
for collection in $collections ; do
[ -w /dev/kmsg ] && echo "kselftest: Running tests in $collection" >> /dev/kmsg
tests=$(echo "$available" | grep "^$collection:" | cut -d: -f2)
- ($dryrun cd "$collection" && $dryrun run_many $tests)
+ ($dryrun cd "$collection" && $dryrun run_many "$tests")
done
failures="$(cat "$kselftest_failures_file")"
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 3/6] selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 1/6] selftests/run_kselftest.sh: Remove unused $ROOT Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 2/6] selftests/run_kselftest.sh: Add missing quotes Ricardo B. Marlière
@ 2026-03-20 18:29 ` Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 4/6] selftests/run_kselftest.sh: Allow choosing per-test log directory Ricardo B. Marlière
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-03-20 18:29 UTC (permalink / raw)
To: Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild,
Ricardo B. Marlière
run_kselftest.sh only needs to canonicalize the directory containing the
script itself. Use shell-native path resolution for that by changing into
the directory and calling pwd -P.
This avoids depending on either realpath or readlink -f while still
producing a physical absolute path for BASE_DIR.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/selftests/run_kselftest.sh | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index b782b025d002..5f7bce9a640b 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -4,12 +4,7 @@
# Run installed kselftest tests.
#
-# Fallback to readlink if realpath is not available
-if which realpath > /dev/null; then
- BASE_DIR=$(realpath $(dirname $0))
-else
- BASE_DIR=$(readlink -f $(dirname $0))
-fi
+BASE_DIR=$(cd "$(dirname "$0")" && pwd -P)
cd "$BASE_DIR"
TESTS="$BASE_DIR"/kselftest-list.txt
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 4/6] selftests/run_kselftest.sh: Allow choosing per-test log directory
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
` (2 preceding siblings ...)
2026-03-20 18:29 ` [PATCH 3/6] selftests/run_kselftest.sh: Resolve BASE_DIR with pwd -P Ricardo B. Marlière
@ 2026-03-20 18:29 ` Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 5/6] selftests: Preserve subtarget failures in all/install Ricardo B. Marlière
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-03-20 18:29 UTC (permalink / raw)
To: Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild,
Ricardo B. Marlière
The --per-test-log option currently hard-codes /tmp. However, the system
under test will most likely have tmpfs mounted there. Since it's not clear
which filenames the log files will have, the user should be able to specify
a persistent directory to store the logs. Keeping those logs are important
because the run_kselftest.sh runner will only yield KTAP output, trimming
information that is otherwise available through running individual tests
directly.
Allow --per-test-log to take an optional directory argument. Keep the
existing behaviour when the option is passed without an argument, but if
a directory is provided, create it if needed, reject non-directory paths
and non-writable directories, canonicalize it, and have runner.sh write
per-test logs there instead of /tmp.
This also makes relative paths safe by resolving them before the runner
changes into a collection directory.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/selftests/kselftest/runner.sh | 3 ++-
tools/testing/selftests/run_kselftest.sh | 30 +++++++++++++++++++++++++++--
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index 3a62039fa621..6e13818fe433 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -6,6 +6,7 @@ export skip_rc=4
export timeout_rc=124
export logfile=/dev/stdout
export per_test_logging=
+export per_test_log_dir=/tmp
export RUN_IN_NETNS=
# Defaults for "settings" file fields:
@@ -189,7 +190,7 @@ run_many()
BASENAME_TEST=$(basename $TEST)
test_num=$(( test_num + 1 ))
if [ -n "$per_test_logging" ]; then
- logfile="/tmp/$BASENAME_TEST"
+ logfile="$per_test_log_dir/$BASENAME_TEST"
cat /dev/null > "$logfile"
fi
if [ -n "$RUN_IN_NETNS" ]; then
diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh
index 5f7bce9a640b..fdbbe5b8b079 100755
--- a/tools/testing/selftests/run_kselftest.sh
+++ b/tools/testing/selftests/run_kselftest.sh
@@ -22,7 +22,7 @@ usage()
cat <<EOF
Usage: $0 [OPTIONS]
-s | --summary Print summary with detailed log in output.log (conflict with -p)
- -p | --per-test-log Print test log in /tmp with each test name (conflict with -s)
+ -p | --per-test-log [DIR] Print test log in /tmp or DIR with each test name (conflict with -s)
-t | --test COLLECTION:TEST Run TEST from COLLECTION
-S | --skip COLLECTION:TEST Skip TEST from COLLECTION
-c | --collection COLLECTION Run all tests from COLLECTION
@@ -50,7 +50,33 @@ while true; do
shift ;;
-p | --per-test-log)
per_test_logging=1
- shift ;;
+ if [ -n "$2" ] && [ "${2#-}" = "$2" ]; then
+ per_test_log_dir="$2"
+ if [ -e "$per_test_log_dir" ] && [ ! -d "$per_test_log_dir" ]; then
+ echo "Per-test log path is not a dir:" \
+ "$per_test_log_dir" >&2
+ exit 1
+ fi
+ if [ ! -d "$per_test_log_dir" ] && \
+ ! mkdir -p "$per_test_log_dir"; then
+ echo "Could not create log dir:" \
+ "$per_test_log_dir" >&2
+ exit 1
+ fi
+ per_test_log_dir=$(cd "$per_test_log_dir" && pwd -P)
+ if [ -z "$per_test_log_dir" ]; then
+ echo "Could not resolve per-test log directory" >&2
+ exit 1
+ fi
+ if [ ! -w "$per_test_log_dir" ]; then
+ echo "Per-test log dir is not writable:" \
+ "$per_test_log_dir" >&2
+ exit 1
+ fi
+ shift 2
+ else
+ shift
+ fi ;;
-t | --test)
TESTS="$TESTS $2"
shift 2 ;;
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 5/6] selftests: Preserve subtarget failures in all/install
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
` (3 preceding siblings ...)
2026-03-20 18:29 ` [PATCH 4/6] selftests/run_kselftest.sh: Allow choosing per-test log directory Ricardo B. Marlière
@ 2026-03-20 18:29 ` Ricardo B. Marlière
2026-03-20 18:29 ` [PATCH 6/6] kbuild: remove kselftest output in mrproper Ricardo B. Marlière
2026-03-31 22:43 ` [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Shuah Khan
6 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-03-20 18:29 UTC (permalink / raw)
To: Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild,
Ricardo B. Marlière
Track failures explicitly in the top-level selftests all/install loops.
The current code multiplies `ret` by each sub-make exit status. For
example, with `TARGETS=net`, the implicit `net/lib` dependency runs after
`net`, so a failed `net` build can be followed by a successful `net/lib`
build and reset the final result to success.
Set `ret` to 1 on any non-zero sub-make exit code and keep it sticky, so
the top-level make returns failure when any selected selftest target
fails.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
tools/testing/selftests/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 450f13ba4cca..0949f370ad78 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -209,14 +209,14 @@ export KHDR_INCLUDES
.DEFAULT_GOAL := all
all:
- @ret=1; \
+ @ret=0; \
for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
mkdir $$BUILD_TARGET -p; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \
O=$(abs_objtree) \
$(if $(FORCE_TARGETS),|| exit); \
- ret=$$((ret * $$?)); \
+ [ $$? -eq 0 ] || ret=1; \
done; exit $$ret;
run_tests: all
@@ -274,7 +274,7 @@ ifdef INSTALL_PATH
install -m 744 kselftest/ksft.py $(INSTALL_PATH)/kselftest/
install -m 744 run_kselftest.sh $(INSTALL_PATH)/
rm -f $(TEST_LIST)
- @ret=1; \
+ @ret=0; \
for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install \
@@ -283,7 +283,7 @@ ifdef INSTALL_PATH
OBJ_PATH=$(INSTALL_PATH) \
O=$(abs_objtree) \
$(if $(FORCE_TARGETS),|| exit); \
- ret=$$((ret * $$?)); \
+ [ $$? -eq 0 ] || ret=1; \
done; exit $$ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 6/6] kbuild: remove kselftest output in mrproper
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
` (4 preceding siblings ...)
2026-03-20 18:29 ` [PATCH 5/6] selftests: Preserve subtarget failures in all/install Ricardo B. Marlière
@ 2026-03-20 18:29 ` Ricardo B. Marlière
2026-04-10 19:19 ` Shuah Khan
2026-03-31 22:43 ` [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Shuah Khan
6 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-03-20 18:29 UTC (permalink / raw)
To: Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild,
Ricardo B. Marlière
Selftests built with O= store generated files by default under
$(objtree)/kselftest. Those files are not removed by mrproper today, so
stale generated artifacts can survive across builds and be reused
unexpectedly.
Add kselftest to MRPROPER_FILES, so that the default kselftest output
directory as part of mrproper target.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index c9b7bee102e8..91e6ec790a0f 100644
--- a/Makefile
+++ b/Makefile
@@ -1662,6 +1662,7 @@ MRPROPER_FILES += include/config include/generated \
debian snap tar-install PKGBUILD pacman \
.config .config.old .version \
Module.symvers \
+ kselftest \
certs/signing_key.pem \
certs/x509.genkey \
vmlinux-gdb.py \
--
2.53.0
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 6/6] kbuild: remove kselftest output in mrproper
2026-03-20 18:29 ` [PATCH 6/6] kbuild: remove kselftest output in mrproper Ricardo B. Marlière
@ 2026-04-10 19:19 ` Shuah Khan
2026-04-11 12:49 ` Ricardo B. Marlière
0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2026-04-10 19:19 UTC (permalink / raw)
To: Ricardo B. Marlière, Shuah Khan, Nathan Chancellor,
Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild, Shuah Khan
On 3/20/26 12:29, Ricardo B. Marlière wrote:
> Selftests built with O= store generated files by default under
> $(objtree)/kselftest. Those files are not removed by mrproper today, so
> stale generated artifacts can survive across builds and be reused
> unexpectedly.
>
> Add kselftest to MRPROPER_FILES, so that the default kselftest output
> directory as part of mrproper target.
Does this change remove kselftest build objects in-tree builds?
It didn't for me - also there is kselftest directory under
tools/selftests that has several scripts.
Can you test this for in-tree builds - I would like this work
for both.
I dropped this from my next for now. This can go through kbuild
tree.
>
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index c9b7bee102e8..91e6ec790a0f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1662,6 +1662,7 @@ MRPROPER_FILES += include/config include/generated \
> debian snap tar-install PKGBUILD pacman \
> .config .config.old .version \
> Module.symvers \
> + kselftest \
> certs/signing_key.pem \
> certs/x509.genkey \
> vmlinux-gdb.py \
>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] kbuild: remove kselftest output in mrproper
2026-04-10 19:19 ` Shuah Khan
@ 2026-04-11 12:49 ` Ricardo B. Marlière
2026-04-13 15:58 ` Shuah Khan
0 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-04-11 12:49 UTC (permalink / raw)
To: Shuah Khan, Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild
On 4/10/26 4:19 PM, Shuah Khan wrote:
> On 3/20/26 12:29, Ricardo B. Marlière wrote:
>> Selftests built with O= store generated files by default under
>> $(objtree)/kselftest. Those files are not removed by mrproper today, so
>> stale generated artifacts can survive across builds and be reused
>> unexpectedly.
>>
>> Add kselftest to MRPROPER_FILES, so that the default kselftest output
>> directory as part of mrproper target.
>
> Does this change remove kselftest build objects in-tree builds?
> It didn't for me - also there is kselftest directory under
> tools/selftests that has several scripts.
>
> Can you test this for in-tree builds - I would like this work
> for both.
>
> I dropped this from my next for now. This can go through kbuild
> tree.
OK! But please also drop
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=33880424308df3c2e39fa88ea74f051205ebb7b4
Thanks!
>
>>
>> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
>> ---
>> Makefile | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/Makefile b/Makefile
>> index c9b7bee102e8..91e6ec790a0f 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1662,6 +1662,7 @@ MRPROPER_FILES += include/config
>> include/generated \
>> debian snap tar-install PKGBUILD pacman \
>> .config .config.old .version \
>> Module.symvers \
>> + kselftest \
>> certs/signing_key.pem \
>> certs/x509.genkey \
>> vmlinux-gdb.py \
>>
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] kbuild: remove kselftest output in mrproper
2026-04-11 12:49 ` Ricardo B. Marlière
@ 2026-04-13 15:58 ` Shuah Khan
2026-04-13 16:22 ` Ricardo B. Marlière
0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2026-04-13 15:58 UTC (permalink / raw)
To: Ricardo B. Marlière, Shuah Khan, Nathan Chancellor,
Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild, Shuah Khan
On 4/11/26 06:49, Ricardo B. Marlière wrote:
> On 4/10/26 4:19 PM, Shuah Khan wrote:
>> On 3/20/26 12:29, Ricardo B. Marlière wrote:
>>> Selftests built with O= store generated files by default under
>>> $(objtree)/kselftest. Those files are not removed by mrproper today, so
>>> stale generated artifacts can survive across builds and be reused
>>> unexpectedly.
>>>
>>> Add kselftest to MRPROPER_FILES, so that the default kselftest output
>>> directory as part of mrproper target.
>>
>> Does this change remove kselftest build objects in-tree builds?
>> It didn't for me - also there is kselftest directory under
>> tools/selftests that has several scripts.
>>
>> Can you test this for in-tree builds - I would like this work
>> for both.
>>
>> I dropped this from my next for now. This can go through kbuild
>> tree.
>
> OK! But please also drop https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=33880424308df3c2e39fa88ea74f051205ebb7b4
>
I can do that - you didn't mention the reasons why you want me to drop
this one. Do other patches in this series depend on this one?
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] kbuild: remove kselftest output in mrproper
2026-04-13 15:58 ` Shuah Khan
@ 2026-04-13 16:22 ` Ricardo B. Marlière
0 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-04-13 16:22 UTC (permalink / raw)
To: Shuah Khan, Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild
On 4/13/26 12:58 PM, Shuah Khan wrote:
> On 4/11/26 06:49, Ricardo B. Marlière wrote:
>> On 4/10/26 4:19 PM, Shuah Khan wrote:
>>> On 3/20/26 12:29, Ricardo B. Marlière wrote:
>>>> Selftests built with O= store generated files by default under
>>>> $(objtree)/kselftest. Those files are not removed by mrproper
>>>> today, so
>>>> stale generated artifacts can survive across builds and be reused
>>>> unexpectedly.
>>>>
>>>> Add kselftest to MRPROPER_FILES, so that the default kselftest output
>>>> directory as part of mrproper target.
>>>
>>> Does this change remove kselftest build objects in-tree builds?
>>> It didn't for me - also there is kselftest directory under
>>> tools/selftests that has several scripts.
>>>
>>> Can you test this for in-tree builds - I would like this work
>>> for both.
>>>
>>> I dropped this from my next for now. This can go through kbuild
>>> tree.
>>
>> OK! But please also drop
>> https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=33880424308df3c2e39fa88ea74f051205ebb7b4
>>
>
> I can do that - you didn't mention the reasons why you want me to drop
> this one. Do other patches in this series depend on this one?
Others are fine. The problem with this one is this:
- ($dryrun cd "$collection" && $dryrun run_many $tests)
+ ($dryrun cd "$collection" && $dryrun run_many "$tests")
but run_many expects word splitting.
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes
2026-03-20 18:29 [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Ricardo B. Marlière
` (5 preceding siblings ...)
2026-03-20 18:29 ` [PATCH 6/6] kbuild: remove kselftest output in mrproper Ricardo B. Marlière
@ 2026-03-31 22:43 ` Shuah Khan
2026-04-01 11:45 ` Ricardo B. Marlière
6 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2026-03-31 22:43 UTC (permalink / raw)
To: Ricardo B. Marlière, Shuah Khan, Nathan Chancellor,
Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild, Shuah Khan
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
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes
2026-03-31 22:43 ` [PATCH 0/6] selftests: run_kselftest.sh cleanup and fixes Shuah Khan
@ 2026-04-01 11:45 ` Ricardo B. Marlière
0 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marlière @ 2026-04-01 11:45 UTC (permalink / raw)
To: Shuah Khan, Shuah Khan, Nathan Chancellor, Nicolas Schier
Cc: linux-kselftest, linux-kernel, linux-kbuild
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
^ permalink raw reply [flat|nested] 13+ messages in thread