kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
PATCH 1/1 kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
As per commit 131b30c94fbc ("kselftest: exclude failed TARGETS from runlist") failed targets were excluded from the runlist. But value $$INSTALL_PATH is always NULL. It should be $INSTALL_PATH instead $$INSTALL_PATH.
So, fix Makefile to use $INSTALL_PATH.
--- tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/Makefile +1 -1
@@ -213,7 +213,7 @@ ifdef INSTALL_PATH @# included in the generated runlist. for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ + [ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ echo -n "run_many" >> $(ALL_SCRIPT); \
Signature · 1 line
2.17.0
Hi
Quoted 7 lines · Prabhakar Kushwaha
As per commit
131b30c94fbc("kselftest: exclude failed TARGETS from runlist") failed targets were excluded from the runlist. But value $$INSTALL_PATH is always NULL. It should be $INSTALL_PATH instead $$INSTALL_PATH.So, fix
Makefileto use $INSTALL_PATH.
I was a bit puzzled at first since I never saw the NULLified value while testing the original patch. Looking at it closely today, I realized that I used to test it like:
$ rm -rf $HOME/KSFT_TEST && make -C tools/testing/selftests/ INSTALL_PATH=$HOME/KSFT_TEST install
which in fact causes INSTALL_PATH to be exported down to the subshell in the recipe, so that even referring it as $$INSTALL_PATH from the recipe line make it work fine.
Instead, using the default Makefile provided value (unexported) by invoking like:
$ rm -rf $HOME/KSFT_TEST && make -C tools/testing/selftests/ install
exposes the error you mentioned, being INSTALL_PATH not accessible form the subshell and so NULL. Moreover it's anyway certainly better to refer with $(INSTALL_PATH) being it a strict Makefile var. So it's fine for me, thanks to have spotted this.
Cristian
Quoted 21 lines
Signed-off-by Prabhakar Kushwaha <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>CC Cristian Marussi <[email protected]>--- tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/Makefile +1
-1@@ -213,7 +213,7 @@ ifdef INSTALL_PATH @# included in the generated runlist. for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ + [ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ echo -n "run_many" >> $(ALL_SCRIPT); \
Dear Cristian,
Quoted 23 lines · Cristian Marussi
Hi
Quoted 7 lines · Prabhakar Kushwaha
As per commit
131b30c94fbc("kselftest: exclude failed TARGETS from runlist") failed targets were excluded from the runlist. But value $$INSTALL_PATH is always NULL. It should be $INSTALL_PATH instead $$INSTALL_PATH.So, fix
Makefileto use $INSTALL_PATH.I was a bit puzzled at first since I never saw the NULLified value while testing the original patch. Looking at it closely today, I realized that I used to test it like:
$ rm -rf $HOME/KSFT_TEST && make -C tools/testing/selftests/ INSTALL_PATH=$HOME/KSFT_TEST installwhich in fact causes
INSTALL_PATHto be exported down to the subshell in the recipe, so that even referring it as $$INSTALL_PATH from the recipe line make it work fine.Instead, using the default
Makefileprovided value (unexported) by invoking like:
Quoted 8 lines
$ rm -rf $HOME/KSFT_TEST && make -C tools/testing/selftests/ installexposes the error you mentioned, being
INSTALL_PATHnot accessible form the subshell and so NULL. Moreover it's anyway certainly better to refer with $(INSTALL_PATH) being it a strictMakefilevar. So it's fine for me, thanks to have spotted this.Reviewed-by [email protected]
Thanks for Reviewing.
I have to send v2 patch with author mail id fix. I will keep your Reviewed-by.
--prabhakar (pk)
Quoted 23 lines
Quoted 22 lines
Signed-off-by Prabhakar Kushwaha <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>CC Cristian Marussi <[email protected]>--- tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/Makefile +1
-1@@ -213,7 +213,7 @@ ifdef INSTALL_PATH @# included in the generated runlist. for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ + [ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ echo -n "run_many" >> $(ALL_SCRIPT); \
Hi
Quoted 33 lines · Prabhakar Kushwaha
Dear Cristian,
Quoted 29 lines · Cristian Marussi
Hi
Quoted 7 lines · Prabhakar Kushwaha
As per commit
131b30c94fbc("kselftest: exclude failed TARGETS from runlist") failed targets were excluded from the runlist. But value $$INSTALL_PATH is always NULL. It should be $INSTALL_PATH instead $$INSTALL_PATH.So, fix
Makefileto use $INSTALL_PATH.I was a bit puzzled at first since I never saw the NULLified value while testing the original patch. Looking at it closely today, I realized that I used to test it like:
$ rm -rf $HOME/KSFT_TEST && make -C tools/testing/selftests/ INSTALL_PATH=$HOME/KSFT_TEST installwhich in fact causes
INSTALL_PATHto be exported down to the subshell in the recipe, so that even referring it as $$INSTALL_PATH from the recipe line make it work fine.Instead, using the default
Makefileprovided value (unexported) by invoking like:$ rm -rf $HOME/KSFT_TEST && make -C tools/testing/selftests/ installexposes the error you mentioned, being
INSTALL_PATHnot accessible form the subshell and so NULL. Moreover it's anyway certainly better to refer with $(INSTALL_PATH) being it a strictMakefilevar. So it's fine for me, thanks to have spotted this.
Quoted 6 lines
Quoted 2 lines
Reviewed-by [email protected]Thanks for Reviewing.
I have to send v2 patch with author mail id fix. I will keep your Reviewed-by.
Thanks to you.
I forgot to say that maybe it's worth also adding a Fixes: tag too like:
given that I've spotted the original patch being already picked up for some stable queues like in:
https://lore.kernel.org/lkml/[email protected]/
Thanks
Cristian
Quoted 27 lines
--prabhakar (pk)
Quoted 23 lines
Quoted 22 lines
Signed-off-by Prabhakar Kushwaha <[email protected]>Signed-off-by Prabhakar Kushwaha <[email protected]>CC Cristian Marussi <[email protected]>--- tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/Makefile +1
-1@@ -213,7 +213,7 @@ ifdef INSTALL_PATH @# included in the generated runlist. for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ + [ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ echo -n "run_many" >> $(ALL_SCRIPT); \