Hi Linus,
Please pull the following Kunit fixes update for Linux 5.10-rc1
This Kunit fixes update consists of several kunit tool bug fixes in
flag handling, run outside kernel tree, make errors, and generating
results.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:
Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-kunit-fixes-5.10-rc1
for you to fetch changes up to 1abdd39f14b25dd2d69096b624a4f86f158a9feb:
kunit: tool: fix display of make errors (2020-10-09 14:04:09 -0600)
----------------------------------------------------------------
linux-kselftest-kunit-fixes-5.10-rc1
This Kunit fixes update consists of several kunit tool bug fixes in
flag handling, run outside kernel tree, make errors, and generating
results.
----------------------------------------------------------------
Brendan Higgins (3):
kunit: tool: fix running kunit_tool from outside kernel tree
kunit: tool: fix --alltests flag
kunit: tool: handle when .kunit exists but .kunitconfig does not
Daniel Latypov (1):
kunit: tool: fix display of make errors
Heidi Fahim (1):
kunit: tool: allow generating test results in JSON
tools/testing/kunit/configs/broken_on_uml.config | 1 +
tools/testing/kunit/kunit.py | 58
+++++++++++++++-------
tools/testing/kunit/kunit_json.py | 63
++++++++++++++++++++++++
tools/testing/kunit/kunit_kernel.py | 27 +++++-----
tools/testing/kunit/kunit_tool_test.py | 33 +++++++++++++
5 files changed, 154 insertions(+), 28 deletions(-)
create mode 100644 tools/testing/kunit/kunit_json.py
----------------------------------------------------------------
Hi Linus,
Please pull the following Kselftest next update for Linux 5.10-rc1
This kselftest update for Linux 5.10-rc1 consists of enhancements to
-- speed up headers_install done during selftest build
-- add generic make nesting support
-- add support to select individual tests:
- Selftests build/install generates run_kselftest.sh script to run
selftests on a target system. Currently the script doesn't have
support for selecting individual tests. Add support for it.
With this enhancement, user can select test collections (or tests)
individually. e.g:
run_kselftest.sh -c seccomp -t timers:posix_timers -t timers:nanosleep
Additionally adds a way to list all known tests with "-l", usage
with "-h", and perform a dry run without running tests with "-n".
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:
Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-next-5.10-rc1
for you to fetch changes up to 4c8511317b4ec75cc3868f80a7b9fddb8322e512:
doc: dev-tools: kselftest.rst: Update examples and paths (2020-10-07
07:59:24 -0600)
----------------------------------------------------------------
linux-kselftest-next-5.10-rc1
This kselftest update for Linux 5.10-rc1 consists of enhancements to
-- speed up headers_install done during selftest build
-- add generic make nesting support
-- add support to select individual tests:
- Selftests build/install generates run_kselftest.sh script to run
selftests on a target system. Currently the script doesn't have
support for selecting individual tests. Add support for it.
With this enhancement, user can select test collections (or tests)
individually. e.g:
run_kselftest.sh -c seccomp -t timers:posix_timers -t timers:nanosleep
Additionally adds a way to list all known tests with "-l", usage
with "-h", and perform a dry run without running tests with "-n".
----------------------------------------------------------------
Denys Vlasenko (1):
selftests: use "$(MAKE)" instead of "make" for headers_install
Gabriel Krisman Bertazi (1):
selftests: Add missing gitignore entries
Greg Thelen (1):
selftests: more general make nesting support
Kees Cook (3):
selftests: Extract run_kselftest.sh and generate stand-alone test
list
selftests/run_kselftest.sh: Make each test individually selectable
doc: dev-tools: kselftest.rst: Update examples and paths
Documentation/dev-tools/kselftest.rst | 35 +++++++----
tools/testing/selftests/Makefile | 34 ++++------
tools/testing/selftests/firmware/.gitignore | 2 +
tools/testing/selftests/lib.mk | 9 ++-
tools/testing/selftests/netfilter/.gitignore | 2 +
tools/testing/selftests/ptrace/.gitignore | 1 +
tools/testing/selftests/run_kselftest.sh | 93
++++++++++++++++++++++++++++
7 files changed, 135 insertions(+), 41 deletions(-)
create mode 100644 tools/testing/selftests/firmware/.gitignore
create mode 100644 tools/testing/selftests/netfilter/.gitignore
create mode 100755 tools/testing/selftests/run_kselftest.sh
----------------------------------------------------------------
v2:
- update documentation
- include SPDX line in extracted script
v1: https://lore.kernel.org/linux-kselftest/20200925234527.1885234-1-keescook@c…
Hi!
I really like Hangbin Liu's intent[1] but I think we need to be a little
more clean about the implementation. This extracts run_kselftest.sh from
the Makefile so it can actually be changed without embeds, etc. Instead,
generate the test list into a text file. Everything gets much simpler.
:)
And in patch 2, I add back Hangbin Liu's new options (with some extra
added) with knowledge of "collections" (i.e. Makefile TARGETS) and
subtests. This should work really well with LAVA too, which needs to
manipulate the lists of tests being run.
Thoughts?
-Kees
[1] https://lore.kernel.org/lkml/20200914022227.437143-1-liuhangbin@gmail.com/
Kees Cook (3):
selftests: Extract run_kselftest.sh and generate stand-alone test list
selftests/run_kselftest.sh: Make each test individually selectable
doc: dev-tools: kselftest.rst: Update examples and paths
Documentation/dev-tools/kselftest.rst | 35 +++++----
tools/testing/selftests/Makefile | 26 ++-----
tools/testing/selftests/lib.mk | 5 +-
tools/testing/selftests/run_kselftest.sh | 93 ++++++++++++++++++++++++
4 files changed, 124 insertions(+), 35 deletions(-)
create mode 100755 tools/testing/selftests/run_kselftest.sh
--
2.25.1
Test in lib/ either KUnit or not are named in the same pattern,
i.e. test_*.c, except few ones. Rename list-test.c to test_list.c
to follow this pattern.
Note, current documentation doesn't specify any file name conventions,
and we glad to stick with a current one in the subsystem.
Signed-off-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
---
lib/Makefile | 4 ++--
lib/{list-test.c => test_list.c} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename lib/{list-test.c => test_list.c} (100%)
diff --git a/lib/Makefile b/lib/Makefile
index 5ca03ba6ee45..e71abeea4a3e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -350,6 +350,6 @@ obj-$(CONFIG_PLDMFW) += pldmfw/
# KUnit tests
obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o
-obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o
-obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
obj-$(CONFIG_BITS_TEST) += test_bits.o
+obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
+obj-$(CONFIG_LIST_KUNIT_TEST) += test_list.o
diff --git a/lib/list-test.c b/lib/test_list.c
similarity index 100%
rename from lib/list-test.c
rename to lib/test_list.c
--
2.28.0