Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1293713 > unrolled thread

[PATCH v3 0/2] Create specific kconfig for kselftest

Started byBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
First post2015-12-17 11:00 +0100
Last post2016-01-05 01:20 +0100
Articles 8 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/2] Create specific kconfig for kselftest Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-12-17 11:00 +0100
    [PATCH v3 1/2] selftests: create test-specific kconfig fragments Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-12-17 11:00 +0100
    [PATCH v3 0/2] Create specific kconfig for kselftest Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-12-17 11:00 +0100
    Re: [PATCH v3 0/2] Create specific kconfig for kselftest Michael Ellerman <mpe@ellerman.id.au> - 2015-12-18 00:50 +0100
      Re: [PATCH v3 0/2] Create specific kconfig for kselftest Bamvor Zhang Jian <bamvor.zhangjian@linaro.org> - 2015-12-24 11:20 +0100
        Re: [PATCH v3 0/2] Create specific kconfig for kselftest Michael Ellerman <mpe@ellerman.id.au> - 2016-01-04 06:00 +0100
          Re: [PATCH v3 0/2] Create specific kconfig for kselftest Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2016-01-04 11:40 +0100
            Re: [PATCH v3 0/2] Create specific kconfig for kselftest Michael Ellerman <mpe@ellerman.id.au> - 2016-01-05 01:20 +0100

#1293713 — [PATCH v3 0/2] Create specific kconfig for kselftest

FromBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Date2015-12-17 11:00 +0100
Subject[PATCH v3 0/2] Create specific kconfig for kselftest
Message-ID<qGDvP-62G-3@gated-at.bofh.it>
There is a discussion about improving the usability of kselftest by
creating test-specific kconfig in recent kernel Summit.

Patch 1 keep test-specific kconfig fragments inside each selftest so
that merge_configs.sh could build up a kernel that can test the
specific or all feature(s).

Patch 2 add config option(kselftest-mergeconfig) in make file as a
helper to merge all the test config dependecies to .config.

Changes since v2:
1.  Fix the misuse of objtree and srctree in the
    kselftest-mergeconfig target.

Changes since v1:
1.  Add kselftest-mergeconfig in scripts/kconfig/Makefile according
    to the suggestion from Michael.

[1] http://www.spinics.net/lists/linux-api/msg15533.html
[2] http://www.spinics.net/lists/linux-api/msg15593.html

Bamvor Jian Zhang (2):
  selftests: create test-specific kconfig fragments
  scripts/kconfig/Makefile: add kselftest-mergeconfig

 scripts/kconfig/Makefile                      | 9 +++++++++
 tools/testing/selftests/cpu-hotplug/config    | 2 ++
 tools/testing/selftests/firmware/config       | 1 +
 tools/testing/selftests/ftrace/config         | 1 +
 tools/testing/selftests/ipc/config            | 2 ++
 tools/testing/selftests/memory-hotplug/config | 4 ++++
 tools/testing/selftests/mount/config          | 2 ++
 tools/testing/selftests/net/config            | 3 +++
 tools/testing/selftests/pstore/config         | 4 ++++
 tools/testing/selftests/seccomp/config        | 2 ++
 tools/testing/selftests/static_keys/config    | 1 +
 tools/testing/selftests/user/config           | 1 +
 tools/testing/selftests/vm/config             | 1 +
 tools/testing/selftests/zram/config           | 2 ++
 14 files changed, 35 insertions(+)
 create mode 100644 tools/testing/selftests/cpu-hotplug/config
 create mode 100644 tools/testing/selftests/firmware/config
 create mode 100644 tools/testing/selftests/ftrace/config
 create mode 100644 tools/testing/selftests/ipc/config
 create mode 100644 tools/testing/selftests/memory-hotplug/config
 create mode 100644 tools/testing/selftests/mount/config
 create mode 100644 tools/testing/selftests/net/config
 create mode 100644 tools/testing/selftests/pstore/config
 create mode 100644 tools/testing/selftests/seccomp/config
 create mode 100644 tools/testing/selftests/static_keys/config
 create mode 100644 tools/testing/selftests/user/config
 create mode 100644 tools/testing/selftests/vm/config
 create mode 100644 tools/testing/selftests/zram/config

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1293718 — [PATCH v3 1/2] selftests: create test-specific kconfig fragments

FromBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Date2015-12-17 11:00 +0100
Subject[PATCH v3 1/2] selftests: create test-specific kconfig fragments
Message-ID<qGDvQ-62G-25@gated-at.bofh.it>
In reply to#1293713
Create the config file in each directory of testcase which need
more kernel configuration than the default defconfig. User could
use these configs with merge_config.sh script:

Enable config for specific testcases:
(export ARCH=xxx #for cross compiling)
./scripts/kconfig/merge_config.sh .config \
		tools/testing/selftests/xxx/config

Enable configs for all testcases:
(export ARCH=xxx #for cross compiling)
./scripts/kconfig/merge_config.sh .config \
		tools/testing/selftests/*/config

Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/cpu-hotplug/config    | 2 ++
 tools/testing/selftests/firmware/config       | 1 +
 tools/testing/selftests/ftrace/config         | 1 +
 tools/testing/selftests/ipc/config            | 2 ++
 tools/testing/selftests/memory-hotplug/config | 4 ++++
 tools/testing/selftests/mount/config          | 2 ++
 tools/testing/selftests/net/config            | 3 +++
 tools/testing/selftests/pstore/config         | 4 ++++
 tools/testing/selftests/seccomp/config        | 2 ++
 tools/testing/selftests/static_keys/config    | 1 +
 tools/testing/selftests/user/config           | 1 +
 tools/testing/selftests/vm/config             | 1 +
 tools/testing/selftests/zram/config           | 2 ++
 13 files changed, 26 insertions(+)
 create mode 100644 tools/testing/selftests/cpu-hotplug/config
 create mode 100644 tools/testing/selftests/firmware/config
 create mode 100644 tools/testing/selftests/ftrace/config
 create mode 100644 tools/testing/selftests/ipc/config
 create mode 100644 tools/testing/selftests/memory-hotplug/config
 create mode 100644 tools/testing/selftests/mount/config
 create mode 100644 tools/testing/selftests/net/config
 create mode 100644 tools/testing/selftests/pstore/config
 create mode 100644 tools/testing/selftests/seccomp/config
 create mode 100644 tools/testing/selftests/static_keys/config
 create mode 100644 tools/testing/selftests/user/config
 create mode 100644 tools/testing/selftests/vm/config
 create mode 100644 tools/testing/selftests/zram/config

diff --git a/tools/testing/selftests/cpu-hotplug/config b/tools/testing/selftests/cpu-hotplug/config
new file mode 100644
index 0000000..e6ab090
--- /dev/null
+++ b/tools/testing/selftests/cpu-hotplug/config
@@ -0,0 +1,2 @@
+CONFIG_NOTIFIER_ERROR_INJECTION=y
+CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
diff --git a/tools/testing/selftests/firmware/config b/tools/testing/selftests/firmware/config
new file mode 100644
index 0000000..c8137f7
--- /dev/null
+++ b/tools/testing/selftests/firmware/config
@@ -0,0 +1 @@
+CONFIG_TEST_FIRMWARE=y
diff --git a/tools/testing/selftests/ftrace/config b/tools/testing/selftests/ftrace/config
new file mode 100644
index 0000000..ef82146
--- /dev/null
+++ b/tools/testing/selftests/ftrace/config
@@ -0,0 +1 @@
+CONFIG_FTRACE=y
diff --git a/tools/testing/selftests/ipc/config b/tools/testing/selftests/ipc/config
new file mode 100644
index 0000000..0702447
--- /dev/null
+++ b/tools/testing/selftests/ipc/config
@@ -0,0 +1,2 @@
+CONFIG_EXPERT=y
+CONFIG_CHECKPOINT_RESTORE=y
diff --git a/tools/testing/selftests/memory-hotplug/config b/tools/testing/selftests/memory-hotplug/config
new file mode 100644
index 0000000..2fde301
--- /dev/null
+++ b/tools/testing/selftests/memory-hotplug/config
@@ -0,0 +1,4 @@
+CONFIG_MEMORY_HOTPLUG=y
+CONFIG_MEMORY_HOTPLUG_SPARSE=y
+CONFIG_NOTIFIER_ERROR_INJECTION=y
+CONFIG_MEMORY_NOTIFIER_ERROR_INJECT=m
diff --git a/tools/testing/selftests/mount/config b/tools/testing/selftests/mount/config
new file mode 100644
index 0000000..b5d881e
--- /dev/null
+++ b/tools/testing/selftests/mount/config
@@ -0,0 +1,2 @@
+CONFIG_USER_NS=y
+CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
diff --git a/tools/testing/selftests/net/config b/tools/testing/selftests/net/config
new file mode 100644
index 0000000..e57b4ac
--- /dev/null
+++ b/tools/testing/selftests/net/config
@@ -0,0 +1,3 @@
+CONFIG_USER_NS=y
+CONFIG_BPF_SYSCALL=y
+CONFIG_TEST_BPF=m
diff --git a/tools/testing/selftests/pstore/config b/tools/testing/selftests/pstore/config
new file mode 100644
index 0000000..6a8e5a9
--- /dev/null
+++ b/tools/testing/selftests/pstore/config
@@ -0,0 +1,4 @@
+CONFIG_MISC_FILESYSTEMS=y
+CONFIG_PSTORE=y
+CONFIG_PSTORE_PMSG=y
+CONFIG_PSTORE_CONSOLE=y
diff --git a/tools/testing/selftests/seccomp/config b/tools/testing/selftests/seccomp/config
new file mode 100644
index 0000000..db1e11b
--- /dev/null
+++ b/tools/testing/selftests/seccomp/config
@@ -0,0 +1,2 @@
+CONFIG_SECCOMP=y
+CONFIG_SECCOMP_FILTER=y
diff --git a/tools/testing/selftests/static_keys/config b/tools/testing/selftests/static_keys/config
new file mode 100644
index 0000000..d538fb7
--- /dev/null
+++ b/tools/testing/selftests/static_keys/config
@@ -0,0 +1 @@
+CONFIG_TEST_STATIC_KEYS=m
diff --git a/tools/testing/selftests/user/config b/tools/testing/selftests/user/config
new file mode 100644
index 0000000..784ed84
--- /dev/null
+++ b/tools/testing/selftests/user/config
@@ -0,0 +1 @@
+CONFIG_TEST_USER_COPY=m
diff --git a/tools/testing/selftests/vm/config b/tools/testing/selftests/vm/config
new file mode 100644
index 0000000..698c7ed
--- /dev/null
+++ b/tools/testing/selftests/vm/config
@@ -0,0 +1 @@
+CONFIG_USERFAULTFD=y
diff --git a/tools/testing/selftests/zram/config b/tools/testing/selftests/zram/config
new file mode 100644
index 0000000..e0cc47e
--- /dev/null
+++ b/tools/testing/selftests/zram/config
@@ -0,0 +1,2 @@
+CONFIG_ZSMALLOC=y
+CONFIG_ZRAM=m
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1293720

FromBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Date2015-12-17 11:00 +0100
Message-ID<qGDvQ-62G-29@gated-at.bofh.it>
In reply to#1293713
There is a discussion about improving the usability of kselftest by
creating test-specific kconfig in recent kernel Summit.

Patch 1 keep test-specific kconfig fragments inside each selftest so
that merge_configs.sh could build up a kernel that can test the
specific or all feature(s).

Patch 2 add config option(kselftest-mergeconfig) in make file as a
helper to merge all the test config dependecies to .config.

Changes since v2:
1.  Fix the misuse of objtree and srctree in the
    kselftest-mergeconfig target.

Changes since v1:
1.  Add kselftest-mergeconfig in scripts/kconfig/Makefile according
    to the suggestion from Michael.

[1] http://www.spinics.net/lists/linux-api/msg15533.html
[2] http://www.spinics.net/lists/linux-api/msg15593.html

Bamvor Jian Zhang (2):
  selftests: create test-specific kconfig fragments
  scripts/kconfig/Makefile: add kselftest-mergeconfig

 scripts/kconfig/Makefile                      | 9 +++++++++
 tools/testing/selftests/cpu-hotplug/config    | 2 ++
 tools/testing/selftests/firmware/config       | 1 +
 tools/testing/selftests/ftrace/config         | 1 +
 tools/testing/selftests/ipc/config            | 2 ++
 tools/testing/selftests/memory-hotplug/config | 4 ++++
 tools/testing/selftests/mount/config          | 2 ++
 tools/testing/selftests/net/config            | 3 +++
 tools/testing/selftests/pstore/config         | 4 ++++
 tools/testing/selftests/seccomp/config        | 2 ++
 tools/testing/selftests/static_keys/config    | 1 +
 tools/testing/selftests/user/config           | 1 +
 tools/testing/selftests/vm/config             | 1 +
 tools/testing/selftests/zram/config           | 2 ++
 14 files changed, 35 insertions(+)
 create mode 100644 tools/testing/selftests/cpu-hotplug/config
 create mode 100644 tools/testing/selftests/firmware/config
 create mode 100644 tools/testing/selftests/ftrace/config
 create mode 100644 tools/testing/selftests/ipc/config
 create mode 100644 tools/testing/selftests/memory-hotplug/config
 create mode 100644 tools/testing/selftests/mount/config
 create mode 100644 tools/testing/selftests/net/config
 create mode 100644 tools/testing/selftests/pstore/config
 create mode 100644 tools/testing/selftests/seccomp/config
 create mode 100644 tools/testing/selftests/static_keys/config
 create mode 100644 tools/testing/selftests/user/config
 create mode 100644 tools/testing/selftests/vm/config
 create mode 100644 tools/testing/selftests/zram/config

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1294332

FromMichael Ellerman <mpe@ellerman.id.au>
Date2015-12-18 00:50 +0100
Message-ID<qGQt4-6k7-21@gated-at.bofh.it>
In reply to#1293713
On Thu, 2015-12-17 at 17:57 +0800, Bamvor Jian Zhang wrote:

> There is a discussion about improving the usability of kselftest by
> creating test-specific kconfig in recent kernel Summit.
> 
> Patch 1 keep test-specific kconfig fragments inside each selftest so
> that merge_configs.sh could build up a kernel that can test the
> specific or all feature(s).
> 
> Patch 2 add config option(kselftest-mergeconfig) in make file as a
> helper to merge all the test config dependecies to .config.
> 
> Changes since v2:
> 1.  Fix the misuse of objtree and srctree in the
>     kselftest-mergeconfig target.
> 
> Changes since v1:
> 1.  Add kselftest-mergeconfig in scripts/kconfig/Makefile according
>     to the suggestion from Michael.

Sorry I only just noticed you put it in scripts/kconfig/Makefile. I meant for
it to go in Makefile, alongside the other kselftest targets.

cheers

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1297804

FromBamvor Zhang Jian <bamvor.zhangjian@linaro.org>
Date2015-12-24 11:20 +0100
Message-ID<qJba1-5to-1@gated-at.bofh.it>
In reply to#1294332
Hi, Michael

On 12/18/2015 07:44 AM, Michael Ellerman wrote:
> On Thu, 2015-12-17 at 17:57 +0800, Bamvor Jian Zhang wrote:
>
>> There is a discussion about improving the usability of kselftest by
>> creating test-specific kconfig in recent kernel Summit.
>>
>> Patch 1 keep test-specific kconfig fragments inside each selftest so
>> that merge_configs.sh could build up a kernel that can test the
>> specific or all feature(s).
>>
>> Patch 2 add config option(kselftest-mergeconfig) in make file as a
>> helper to merge all the test config dependecies to .config.
>>
>> Changes since v2:
>> 1.  Fix the misuse of objtree and srctree in the
>>     kselftest-mergeconfig target.
>>
>> Changes since v1:
>> 1.  Add kselftest-mergeconfig in scripts/kconfig/Makefile according
>>     to the suggestion from Michael.
>
> Sorry I only just noticed you put it in scripts/kconfig/Makefile. I meant for
> it to go in Makefile, alongside the other kselftest targets.

Do you mean "tools/testing/selftest/Makefile"? I try to do it but I could not
get the objtree and srctree if it is called directly(objtree and srctree is
defined in toplevel Makefile)
> make -C tools/testing/selftests kselftest-mergeconfig
make: Entering directory
'/home/bamvor/works/source/kernel/linux/tools/testing/selftests'
Makefile:112: *** No .config exists, config your kernel first!.  Stop.
make: Leaving directory
'/home/bamvor/works/source/kernel/linux/tools/testing/selftests'

Suggestions?

Regards

Bamvor

> cheers
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1300494

FromMichael Ellerman <mpe@ellerman.id.au>
Date2016-01-04 06:00 +0100
Message-ID<qN5po-6OP-9@gated-at.bofh.it>
In reply to#1297804
On Thu, 2015-12-24 at 18:17 +0800, Bamvor Zhang Jian wrote:
> On 12/18/2015 07:44 AM, Michael Ellerman wrote:
> > On Thu, 2015-12-17 at 17:57 +0800, Bamvor Jian Zhang wrote:
> > > There is a discussion about improving the usability of kselftest by
> > > creating test-specific kconfig in recent kernel Summit.
> > > 
> > > Patch 1 keep test-specific kconfig fragments inside each selftest so
> > > that merge_configs.sh could build up a kernel that can test the
> > > specific or all feature(s).
> > > 
> > > Patch 2 add config option(kselftest-mergeconfig) in make file as a
> > > helper to merge all the test config dependecies to .config.
> > > 
> > > Changes since v2:
> > > 1.  Fix the misuse of objtree and srctree in the
> > >     kselftest-mergeconfig target.
> > > 
> > > Changes since v1:
> > > 1.  Add kselftest-mergeconfig in scripts/kconfig/Makefile according
> > >     to the suggestion from Michael.
> > 
> > Sorry I only just noticed you put it in scripts/kconfig/Makefile. I meant for
> > it to go in Makefile, alongside the other kselftest targets.
> 
> Do you mean "tools/testing/selftest/Makefile"? I try to do it but I could not
> get the objtree and srctree if it is called directly(objtree and srctree is
> defined in toplevel Makefile)

No I meant Makefile, the very top level Makefile.

There is already a kselftest target in there (line 1077), I meant we would add
a kselftest-mergeconfig target in there.

cheers

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1300621

FromBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Date2016-01-04 11:40 +0100
Message-ID<qNaIq-2dC-19@gated-at.bofh.it>
In reply to#1300494
Hi, Michael

On 01/04/2016 12:57 PM, Michael Ellerman wrote:
[...]
>> Do you mean "tools/testing/selftest/Makefile"? I try to do it but I could not
>> get the objtree and srctree if it is called directly(objtree and srctree is
>> defined in toplevel Makefile)
> 
> No I meant Makefile, the very top level Makefile.
> 
> There is already a kselftest target in there (line 1077), I meant we would add
> a kselftest-mergeconfig target in there.
I am trying to add it in top level Makefile, it says:
> make kselftest-mergeconfig
make[1]: *** No rule to make target 'kselftest-mergeconfig'.  Stop.
Makefile:553: recipe for target 'kselftest-mergeconfig' failed
make: *** [kselftest-mergeconfig] Error 2

01234567890123456789012345678901234567890123456789012345678901234567890123456789
It works when I get rid of the config at the end of this target. So, I guess
that this is because the "%config" in this Makefile. How should I overwrite
this wildcard?

Thanks

Bamvor

> 
> cheers
> 

-- 
-----------------------------------------
   arm64, kernel. opensuse
   blog: http://bjzhang.github.io
-----------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1301208

FromMichael Ellerman <mpe@ellerman.id.au>
Date2016-01-05 01:20 +0100
Message-ID<qNnvY-2lN-21@gated-at.bofh.it>
In reply to#1300621
On Mon, 2016-01-04 at 18:34 +0800, Bamvor Jian Zhang wrote:
> On 01/04/2016 12:57 PM, Michael Ellerman wrote:
> [...]
> >
> > No I meant Makefile, the very top level Makefile.
> >
> > There is already a kselftest target in there (line 1077), I meant we would add
> > a kselftest-mergeconfig target in there.
>
> I am trying to add it in top level Makefile, it says:

> $ make kselftest-mergeconfig
> make[1]: *** No rule to make target 'kselftest-mergeconfig'.  Stop.
> Makefile:553: recipe for target 'kselftest-mergeconfig' failed
> make: *** [kselftest-mergeconfig] Error 2
>
> It works when I get rid of the config at the end of this target. So, I guess
> that this is because the "%config" in this Makefile. How should I overwrite
> this wildcard?

Yes you're right that is the problem.

If you call it 'kselftest-merge' it works.

I'm not sure there's an easy way to fix it. For now maybe just call it
'kselftest-merge' or something, to avoid the name clash.

CC'ing Michal in case he has any ideas.

cheers

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web