2014-07-18 20:44:40

by Shuah Khan

[permalink] [raw]
Subject: [PATCH] kbuild: devtest - new make target for build all and run tests

Add a new devtest make target to enable developer testing. This
new target does full build (make all) and then runs selftests.

Signed-off-by: Shuah Khan <[email protected]>
---
Makefile | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/Makefile b/Makefile
index f3c543d..1ef3128 100644
--- a/Makefile
+++ b/Makefile
@@ -1034,6 +1034,14 @@ headers_check: headers_install
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1

# ---------------------------------------------------------------------------
+# Kernel devtest
+
+PHONY += devtest
+devtest:
+ make all
+ make -C tools/testing/selftests run_tests
+
+# ---------------------------------------------------------------------------
# Modules

ifdef CONFIG_MODULES
@@ -1236,6 +1244,9 @@ help:
@echo ' headerdep - Detect inclusion cycles in headers'
@$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help
@echo ''
+ @echo 'Developer test'
+ @echo ' devtest - Build all and run tests'
+ @echo ''
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
--
1.9.1


2014-07-18 21:06:45

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] kbuild: devtest - new make target for build all and run tests

On Fri, Jul 18, 2014 at 02:44:34PM -0600, Shuah Khan wrote:
> Add a new devtest make target to enable developer testing. This
> new target does full build (make all) and then runs selftests.
>
> Signed-off-by: Shuah Khan <[email protected]>

Nice to see this.

Acked-by: Greg Kroah-Hartman <[email protected]>

2014-07-18 23:30:23

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] kbuild: devtest - new make target for build all and run tests

On Fri, Jul 18, 2014 at 02:44:34PM -0600, Shuah Khan wrote:
> Add a new devtest make target to enable developer testing. This
> new target does full build (make all) and then runs selftests.
>
> Signed-off-by: Shuah Khan <[email protected]>
> ---
> Makefile | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index f3c543d..1ef3128 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1034,6 +1034,14 @@ headers_check: headers_install
> $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
>
> # ---------------------------------------------------------------------------
> +# Kernel devtest
> +
> +PHONY += devtest
> +devtest:
> + make all
> + make -C tools/testing/selftests run_tests

The name "devtest" does not give any hints that we are actually
running the suite of selftest programs.

Is it so because the plan is to extend devtest to cover more than just selftest?
If not please fix it so it is logical for the user what happens - in other
words name is selftest or something like that.

Sam

2014-07-19 00:13:14

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH] kbuild: devtest - new make target for build all and run tests

On 07/18/2014 05:29 PM, Sam Ravnborg wrote:
> On Fri, Jul 18, 2014 at 02:44:34PM -0600, Shuah Khan wrote:
>> Add a new devtest make target to enable developer testing. This
>> new target does full build (make all) and then runs selftests.
>>
>> Signed-off-by: Shuah Khan <[email protected]>
>> ---
>> Makefile | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/Makefile b/Makefile
>> index f3c543d..1ef3128 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1034,6 +1034,14 @@ headers_check: headers_install
>> $(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
>>
>> # ---------------------------------------------------------------------------
>> +# Kernel devtest
>> +
>> +PHONY += devtest
>> +devtest:
>> + make all
>> + make -C tools/testing/selftests run_tests
>
> The name "devtest" does not give any hints that we are actually
> running the suite of selftest programs.
>
> Is it so because the plan is to extend devtest to cover more than just selftest?
> If not please fix it so it is logical for the user what happens - in other
> words name is selftest or something like that.
>

Yes the intent is to cover more than just selftests in the future.
That is why the target is called devtest.

-- Shuah


--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
[email protected] | (970) 672-0658