* [PATCH] kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
@ 2019-10-20 12:24 Prabhakar Kushwaha
2019-10-21 10:45 ` Cristian Marussi
0 siblings, 1 reply; 4+ messages in thread
From: Prabhakar Kushwaha @ 2019-10-20 12:24 UTC (permalink / raw)
To: linux-kselftest
Cc: skhan, Prabhakar Kushwaha, Prabhakar Kushwaha, Cristian Marussi
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.
Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.pkin@gmail.com>
CC: Cristian Marussi <cristian.marussi@arm.com>
---
tools/testing/selftests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 4cdbae6f4e61..612f6757015d 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -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); \
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
2019-10-20 12:24 [PATCH] kselftest: Fix NULL INSTALL_PATH for TARGETS runlist Prabhakar Kushwaha
@ 2019-10-21 10:45 ` Cristian Marussi
2019-10-22 3:52 ` Prabhakar Kushwaha
0 siblings, 1 reply; 4+ messages in thread
From: Cristian Marussi @ 2019-10-21 10:45 UTC (permalink / raw)
To: Prabhakar Kushwaha, linux-kselftest; +Cc: skhan, Prabhakar Kushwaha
Hi
On 20/10/2019 13:24, Prabhakar Kushwaha wrote:
> 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.
>
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.
Reviewed-by: cristian.marussi@arm.com
Cristian
> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar.pkin@gmail.com>
> CC: Cristian Marussi <cristian.marussi@arm.com>
> ---
> tools/testing/selftests/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index 4cdbae6f4e61..612f6757015d 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -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); \
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
2019-10-21 10:45 ` Cristian Marussi
@ 2019-10-22 3:52 ` Prabhakar Kushwaha
2019-10-22 9:49 ` Cristian Marussi
0 siblings, 1 reply; 4+ messages in thread
From: Prabhakar Kushwaha @ 2019-10-22 3:52 UTC (permalink / raw)
To: Cristian Marussi; +Cc: linux-kselftest, Shuah Khan, Prabhakar Kushwaha
Dear Cristian,
On Mon, Oct 21, 2019 at 4:15 PM Cristian Marussi
<cristian.marussi@arm.com> wrote:
>
> Hi
>
> On 20/10/2019 13:24, Prabhakar Kushwaha wrote:
> > 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.
> >
>
> 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.
>
> Reviewed-by: cristian.marussi@arm.com
>
Thanks for Reviewing.
I have to send v2 patch with author mail id fix. I will keep your Reviewed-by.
--prabhakar (pk)
>
> > Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
> > Signed-off-by: Prabhakar Kushwaha <prabhakar.pkin@gmail.com>
> > CC: Cristian Marussi <cristian.marussi@arm.com>
> > ---
> > tools/testing/selftests/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> > index 4cdbae6f4e61..612f6757015d 100644
> > --- a/tools/testing/selftests/Makefile
> > +++ b/tools/testing/selftests/Makefile
> > @@ -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); \
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
2019-10-22 3:52 ` Prabhakar Kushwaha
@ 2019-10-22 9:49 ` Cristian Marussi
0 siblings, 0 replies; 4+ messages in thread
From: Cristian Marussi @ 2019-10-22 9:49 UTC (permalink / raw)
To: Prabhakar Kushwaha; +Cc: linux-kselftest, Shuah Khan, Prabhakar Kushwaha
Hi
On 22/10/2019 04:52, Prabhakar Kushwaha wrote:
> Dear Cristian,
>
> On Mon, Oct 21, 2019 at 4:15 PM Cristian Marussi
> <cristian.marussi@arm.com> wrote:
>>
>> Hi
>>
>> On 20/10/2019 13:24, Prabhakar Kushwaha wrote:
>>> 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.
>>>
>>
>> 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.
>>
>> Reviewed-by: cristian.marussi@arm.com
>>
>
> 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:
Fixes: 131b30c94fbc ("kselftest: exclude failed TARGETS from runlist")
given that I've spotted the original patch being already picked up for
some stable queues like in:
https://lore.kernel.org/lkml/20191018220324.8165-22-sashal@kernel.org/
Thanks
Cristian
>
> --prabhakar (pk)
>
>
>>
>>> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
>>> Signed-off-by: Prabhakar Kushwaha <prabhakar.pkin@gmail.com>
>>> CC: Cristian Marussi <cristian.marussi@arm.com>
>>> ---
>>> tools/testing/selftests/Makefile | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
>>> index 4cdbae6f4e61..612f6757015d 100644
>>> --- a/tools/testing/selftests/Makefile
>>> +++ b/tools/testing/selftests/Makefile
>>> @@ -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); \
>>>
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-22 9:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20 12:24 [PATCH] kselftest: Fix NULL INSTALL_PATH for TARGETS runlist Prabhakar Kushwaha
2019-10-21 10:45 ` Cristian Marussi
2019-10-22 3:52 ` Prabhakar Kushwaha
2019-10-22 9:49 ` Cristian Marussi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.