diff mbox

[v4,20/20] kbuild: add a new kselftest_install make target to install selftests

Message ID 2c5a28faaa79d9c2415854a08817ada509fcb943.1420571615.git.shuahkh@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shuah Khan Jan. 6, 2015, 7:43 p.m. UTC
Add a new make target to install to install kernel selftests.
This new target will build and install selftests. kselftest
target now depends on kselftest_install and runs the generated
kselftest script to reduce duplicate work and for common look
and feel when running tests.

make kselftest_target:
-- exports kselftest INSTALL_KSFT_PATH
   default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
-- exports INSTALL_KSFT_PATH
-- runs selftests make install target

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 Makefile | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

Shuah Khan Jan. 14, 2015, 4:32 p.m. UTC | #1
On 01/06/2015 12:43 PM, Shuah Khan wrote:
> Add a new make target to install to install kernel selftests.
> This new target will build and install selftests. kselftest
> target now depends on kselftest_install and runs the generated
> kselftest script to reduce duplicate work and for common look
> and feel when running tests.
> 
> make kselftest_target:
> -- exports kselftest INSTALL_KSFT_PATH
>    default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
> -- exports INSTALL_KSFT_PATH
> -- runs selftests make install target
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  Makefile | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)

Hi Marek,

Could you please Ack this patch, if this version looks good,
so I can take this through ksefltest tree.

thanks,
-- Shuah
Michal Marek Jan. 15, 2015, 11:39 a.m. UTC | #2
On 2015-01-14 17:32, Shuah Khan wrote:
> On 01/06/2015 12:43 PM, Shuah Khan wrote:
>> Add a new make target to install to install kernel selftests.
>> This new target will build and install selftests. kselftest
>> target now depends on kselftest_install and runs the generated
>> kselftest script to reduce duplicate work and for common look
>> and feel when running tests.
>>
>> make kselftest_target:
>> -- exports kselftest INSTALL_KSFT_PATH
>>    default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
>> -- exports INSTALL_KSFT_PATH
>> -- runs selftests make install target
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  Makefile | 14 +++++++++++++-
>>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> Hi Marek,
> 
> Could you please Ack this patch, if this version looks good,
> so I can take this through ksefltest tree.

Sorry, I thought I had acked v3.

Acked-by: Michal Marek <mmarek@suse.cz>

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michael Ellerman Jan. 15, 2015, 10:58 p.m. UTC | #3
On Wed, 2015-01-14 at 09:32 -0700, Shuah Khan wrote:
> On 01/06/2015 12:43 PM, Shuah Khan wrote:
> > Add a new make target to install to install kernel selftests.
> > This new target will build and install selftests. kselftest
> > target now depends on kselftest_install and runs the generated
> > kselftest script to reduce duplicate work and for common look
> > and feel when running tests.
> > 
> > make kselftest_target:
> > -- exports kselftest INSTALL_KSFT_PATH
> >    default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
> > -- exports INSTALL_KSFT_PATH
> > -- runs selftests make install target
> > 
> > Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> 
> Hi Marek,
> 
> Could you please Ack this patch, if this version looks good,
> so I can take this through ksefltest tree.

Hi Shuah,

I posted what I think is a better approach last week. It's less code and less
repetition, and installs the majority of tests this series missed - ie. the
powerpc ones.

Please at least respond to it before you put this series into next.

https://lkml.org/lkml/2015/1/9/45

cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shuah Khan Jan. 15, 2015, 11:41 p.m. UTC | #4
On 01/15/2015 03:58 PM, Michael Ellerman wrote:
> On Wed, 2015-01-14 at 09:32 -0700, Shuah Khan wrote:
>> On 01/06/2015 12:43 PM, Shuah Khan wrote:
>>> Add a new make target to install to install kernel selftests.
>>> This new target will build and install selftests. kselftest
>>> target now depends on kselftest_install and runs the generated
>>> kselftest script to reduce duplicate work and for common look
>>> and feel when running tests.
>>>
>>> make kselftest_target:
>>> -- exports kselftest INSTALL_KSFT_PATH
>>>    default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
>>> -- exports INSTALL_KSFT_PATH
>>> -- runs selftests make install target
>>>
>>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>>
>> Hi Marek,
>>
>> Could you please Ack this patch, if this version looks good,
>> so I can take this through ksefltest tree.
> 
> Hi Shuah,
> 
> I posted what I think is a better approach last week. It's less code and less
> repetition, and installs the majority of tests this series missed - ie. the
> powerpc ones.
> 
> Please at least respond to it before you put this series into next.
> 
> https://lkml.org/lkml/2015/1/9/45
> 

Michael,

I didn't get a chance to review your patches yet. I plan to
review and give you feedback by end of this week. This patch
is needed in any case for either approach.

thanks,
-- Shuah
Michael Ellerman Jan. 16, 2015, 2:59 a.m. UTC | #5
On Thu, 2015-01-15 at 16:41 -0700, Shuah Khan wrote:
> On 01/15/2015 03:58 PM, Michael Ellerman wrote:
> > On Wed, 2015-01-14 at 09:32 -0700, Shuah Khan wrote:
> >> On 01/06/2015 12:43 PM, Shuah Khan wrote:
> >>> Add a new make target to install to install kernel selftests.
> >>> This new target will build and install selftests. kselftest
> >>> target now depends on kselftest_install and runs the generated
> >>> kselftest script to reduce duplicate work and for common look
> >>> and feel when running tests.
> >>>
> >>> make kselftest_target:
> >>> -- exports kselftest INSTALL_KSFT_PATH
> >>>    default $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
> >>> -- exports INSTALL_KSFT_PATH
> >>> -- runs selftests make install target
> >>>
> >>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> >>
> >> Hi Marek,
> >>
> >> Could you please Ack this patch, if this version looks good,
> >> so I can take this through ksefltest tree.
> > 
> > Hi Shuah,
> > 
> > I posted what I think is a better approach last week. It's less code and less
> > repetition, and installs the majority of tests this series missed - ie. the
> > powerpc ones.
> > 
> > Please at least respond to it before you put this series into next.
> > 
> > https://lkml.org/lkml/2015/1/9/45
> 
> Michael,
> 
> I didn't get a chance to review your patches yet. I plan to
> review and give you feedback by end of this week. 

Thanks. My week ends quite soon (.au time zone), so early next week is fine.

> This patch is needed in any case for either approach.

The version in my series is slightly different, but probably similar enough. I
CC'ed Michal on my series also.

cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Makefile b/Makefile
index b1c3254..99fac47 100644
--- a/Makefile
+++ b/Makefile
@@ -1072,12 +1072,21 @@  headers_check: headers_install
 	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
 
 # ---------------------------------------------------------------------------
-# Kernel selftest
+# Kernel selftest targets
+
+# Default base path for kselftest install
+INSTALL_KSFT_PATH = $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)
+export INSTALL_KSFT_PATH
 
 PHONY += kselftest
 kselftest:
 	$(Q)$(MAKE) -C tools/testing/selftests run_tests
 
+# Kernel selftest install
+PHONY += kselftest_install
+kselftest_install:
+	$(Q)$(MAKE) -C tools/testing/selftests install
+
 # ---------------------------------------------------------------------------
 # Modules
 
@@ -1286,6 +1295,9 @@  help:
 	@echo  '                    Build, install, and boot kernel before'
 	@echo  '                    running kselftest on it'
 	@echo  ''
+	@echo  '  kselftest_install - Install Kselftests to INSTALL_KSFT_PATH'
+	@echo  '                      default: $(INSTALL_MOD_PATH)/lib/kselftest/$(KERNELRELEASE)'
+	@echo  ''
 	@echo  'Kernel packaging:'
 	@$(MAKE) $(build)=$(package-dir) help
 	@echo  ''