[PATCH v6 2/5] kunit: test: create a single centralized executor for all tests

2020-08-04 Thread Brendan Higgins
Signed-off-by: Iurii Zaikin Co-developed-by: Brendan Higgins Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Reviewed-by: Kees Cook --- include/kunit/test.h | 67 +--- lib/kunit/Makefile | 3 +- lib/kunit/executor.c | 28 ++ lib

[PATCH v6 3/5] init: main: add KUnit to kernel init

2020-08-04 Thread Brendan Higgins
() so that KUnit runs after late init. Co-developed-by: Alan Maguire Signed-off-by: Alan Maguire Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Reviewed-by: Kees Cook Reviewed-by: Luis Chamberlain --- include/kunit/test.h | 9 + init/main.c | 4 lib/kunit

[PATCH v6 5/5] Documentation: kunit: add a brief blurb about kunit_test_suite

2020-08-04 Thread Brendan Higgins
Add a brief blurb saying how and when the kunit_test_suite() macro works to the usage documentation. Signed-off-by: Brendan Higgins --- Documentation/dev-tools/kunit/usage.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev

[PATCH v6 0/5] kunit: create a centralized executor to dispatch all KUnit tests

2020-08-04 Thread Brendan Higgins
a single centralized executor for all tests Brendan Higgins (4): vmlinux.lds.h: add linker section for KUnit test suites init: main: add KUnit to kernel init kunit: test: add test plan to KUnit TAP format Documentation: kunit: add a brief blurb about kunit_test_suite Documentation/dev-tools

Re: [PATCH v5 10/12] kunit: Add 'kunit_shutdown' option

2020-08-04 Thread Brendan Higgins
On Fri, Jun 26, 2020 at 2:40 PM Kees Cook wrote: > > On Fri, Jun 26, 2020 at 02:09:15PM -0700, Brendan Higgins wrote: > > From: David Gow > > > > Add a new kernel command-line option, 'kunit_shutdown', which allows the > > user to specify that the kernel p

Re: [PATCH v5 09/12] kunit: test: add test plan to KUnit TAP format

2020-08-04 Thread Brendan Higgins
On Fri, Jun 26, 2020 at 2:35 PM Kees Cook wrote: > > On Fri, Jun 26, 2020 at 02:09:14PM -0700, Brendan Higgins wrote: > > TAP 14 allows an optional test plan to be emitted before the start of > > the start of testing[1]; this is valuable because it makes it possible >

Re: [PATCH v5 07/12] kunit: test: create a single centralized executor for all tests

2020-08-04 Thread Brendan Higgins
On Fri, Jun 26, 2020 at 2:29 PM Kees Cook wrote: > > On Fri, Jun 26, 2020 at 02:09:12PM -0700, Brendan Higgins wrote: > > From: Alan Maguire > > > > Add a centralized executor to dispatch tests rather than relying on > > late_initcall to schedule each test

Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites

2020-08-04 Thread Brendan Higgins
On Tue, Jul 7, 2020 at 9:31 PM Luis Chamberlain wrote: > > On Fri, Jun 26, 2020 at 02:22:11PM -0700, Brendan Higgins wrote: > > On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > > > > > On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > >

Re: [PATCH v5 00/12] kunit: create a centralized executor to dispatch all KUnit tests

2020-08-04 Thread Brendan Higgins
On Fri, Jun 26, 2020 at 2:52 PM Kees Cook wrote: > > On Fri, Jun 26, 2020 at 02:09:05PM -0700, Brendan Higgins wrote: > > This patchset adds a centralized executor to dispatch tests rather than > > relying on late_initcall to schedule each test suite separately along > &

Re: [PATCH v2] lib: Convert test_uuid.c to KUnit

2020-08-03 Thread Brendan Higgins
nit provides a common framework for > unit tests in the kernel. KUnit is fast as well. > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Reviewed-by: Brendan Higgins Thanks!

Re: [PATCH] Documentation: kunit: Add naming guidelines

2020-07-31 Thread Brendan Higgins
Kconfig entries and filenames. > > [1]: > https://lore.kernel.org/linux-kselftest/202006141005.BA19A9D3@keescook/t/#u > > Signed-off-by: David Gow > Reviewed-by: Kees Cook Sorry for taking so long on this; nevertheless, looks great! Reviewed-by: Brendan Higgins

Re: [PATCH] lib: Convert test_uuid.c to KUnit

2020-07-31 Thread Brendan Higgins
On Fri, Jul 31, 2020 at 3:02 AM Arpitha Raghunandan <98.a...@gmail.com> wrote: > > On 31/07/20 11:20 am, Brendan Higgins wrote: > > On Thu, Jul 30, 2020 at 5:18 AM Arpitha Raghunandan <98.a...@gmail.com> > > wrote: > >> > >> Converts test lib/te

Re: [PATCH] lib: Convert test_uuid.c to KUnit

2020-07-30 Thread Brendan Higgins
On Thu, Jul 30, 2020 at 5:18 AM Arpitha Raghunandan <98.a...@gmail.com> wrote: > > Converts test lib/test_uuid.c to KUnit Can you add some more detail to the commit message? Maybe link to KUnit and say something about why this change is beneficial. > Signed-off-by: Arpitha Raghunandan

Re: [RFC v1] xarray: start converting test_xarray to KUnit

2020-07-30 Thread Brendan Higgins
On Wed, Feb 12, 2020 at 12:29 AM Alan Maguire wrote: This kind of fell off my todo list - sorry about that. But Vitor has been doing a bunch of related work, so I thought it might be good to resurrect this thread and add him to it. > On Thu, 6 Feb 2020, Brendan Higgins wrote: > >

Re: [PATCH v2] lib: kunit: Convert test_sort to KUnit test

2020-07-29 Thread Brendan Higgins
On Wed, Jul 29, 2020 at 12:19 PM Andy Shevchenko wrote: > > On Wed, Jul 29, 2020 at 04:11:51PM -0300, Vitor Massaru Iha wrote: > > This adds the conversion of the test_sort.c to KUnit test. > > > > Please apply this commit first (linux-kselftest/kunit-fixes): > >

Re: kunit compile failed on um

2020-07-27 Thread Brendan Higgins
On Mon, Jul 27, 2020 at 3:01 AM Cixi Geng wrote: > > Hi Brendan: > When I run kunit test in um , it failed on kernel 5.8-rc* while > succeeded in v5.7 with same configuration. is this a bug? > > Here is my operation: > gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) > > the kunitconfig: >

Re: [RFC PATCH] platform: ioremap: Build iomap functions even without HAS_IOMEM

2020-07-21 Thread Brendan Higgins
M entirely. > > [1]: https://lkml.org/lkml/2020/6/30/176 > [2]: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1e7468bd9d30a21e059af477106dc5588ae52dff > [3]: > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1405627.html > > Signed-off-by: David Gow Reviewed-by: Brendan Higgins

Re: [PATCH v3] lib: kunit: Provides a userspace memory context when tests are compiled as module

2020-07-21 Thread Brendan Higgins
On Tue, Jul 21, 2020 at 10:40 AM Vitor Massaru Iha wrote: > > KUnit test cases run on kthreads, and kthreads don't have an > adddress space (current->mm is NULL), but processes have mm. > > The purpose of this patch is to allow to borrow mm to KUnit kthread > after userspace is brought up,

Re: [PATCH v3] lib: overflow_kunit: add KUnit test conversion of check_*_overflow

2020-07-21 Thread Brendan Higgins
On Tue, Jul 21, 2020 at 12:38 PM Vitor Massaru Iha wrote: > > On Tue, Jul 21, 2020 at 3:55 PM Kees Cook wrote: > > > > On Mon, Jul 20, 2020 at 07:44:18PM -0300, Vitor Massaru Iha wrote: > > > This adds the conversion of the runtime tests of check_*_overflow > > > functions, > > > from

Re: [PATCH][next] i2c: aspeed: Use fallthrough pseudo-keyword

2020-07-16 Thread Brendan Higgins
plicit-switch-case-fall-through > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Brendan Higgins

Re: [RFC 3/3] lib: Convert test_user_copy to KUnit test

2020-07-15 Thread Brendan Higgins
On Tue, Jul 14, 2020 at 8:11 PM Vitor Massaru Iha wrote: > > This adds the conversion of the runtime tests of test_user_copy fuctions, > from `lib/test_user_copy.c`to KUnit tests. > > Signed-off-by: Vitor Massaru Iha > --- > lib/Kconfig.debug | 17 ++ > lib/Makefile

Re: [RFC 2/3] lib: Allows to borrow mm in userspace on KUnit

2020-07-15 Thread Brendan Higgins
On Tue, Jul 14, 2020 at 8:11 PM Vitor Massaru Iha wrote: Probably want to add more of a description here as what you are doing is not entirely trivial to someone not familiar with mm contexts. > > Signed-off-by: Vitor Massaru Iha > --- > include/kunit/test.h | 1 + > lib/kunit/try-catch.c |

Re: [RFC 1/3] kunit: tool: Add support root filesystem in kunit-tool

2020-07-15 Thread Brendan Higgins
Signed-off-by: Vitor Massaru Iha Overall this looks really good! I am really excited to see this! Reviewed-by: Brendan Higgins > --- > tools/testing/kunit/kunit.py| 37 -- > tools/testing/kunit/kunit_kernel.py | 105 > 2 files chan

Re: [PATCH v2 2/3] um: some fixes to build UML with musl

2020-07-15 Thread Brendan Higgins
On Tue, Jul 14, 2020 at 9:02 AM Johannes Berg wrote: > > On Tue, 2020-07-14 at 11:43 +0100, Anton Ivanov wrote: > > > Patch is OK with me, should not read patches before the 3rd double espresso > > next time. > > > > I will +1 it, Richard, Johannes, what do you think? > > I got dropped off the

Re: [PATCH v2 3/3] um: allow static linking for non-glibc implementations

2020-07-15 Thread Brendan Higgins
low static linking in this case. > > Signed-off-by: Ignat Korchagin One minor issue below. Other than that: Reviewed-by: Brendan Higgins > --- > arch/um/Kconfig | 2 +- > arch/um/drivers/Kconfig | 3 --- > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a

Re: [PATCH v2 1/3] um/kconfig: introduce CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS

2020-07-15 Thread Brendan Higgins
ct such C-library implementation build time and > possibly disable static linking for UML to avoid producing a binary with > unexpected behaviour and dependencies. > > Signed-off-by: Ignat Korchagin Nice. Reviewed-by: Brendan Higgins

Re: [PATCH v2 0/3] um: allow static linking for non-glibc libc implementations

2020-07-15 Thread Brendan Higgins
-) Sorry for taking so long to get to this. I saw this last week or whenever and then forgot, saw the comments yesterday and remembered. Looks pretty good overall. I will put my reviewed-by on each individual patch. Nevertheless, I tested them all together, so being lazy: Tested-by: Brendan Higgins

[PATCH v1 0/2] kunit: tool: fix kunit_tool unit tests

2020-07-14 Thread Brendan Higgins
Apparently we haven't run the unit tests for kunit_tool in a while and consequently some things have broken. This patchset fixes those issues. Brendan Higgins (2): kunit: tool: fix broken default args in unit tests kunit: tool: fix improper treatment of file location tools/testing/kunit

[PATCH v1 2/2] kunit: tool: fix improper treatment of file location

2020-07-14 Thread Brendan Higgins
fig") Fixes: 45ba7a893ad8 ("kunit: kunit_tool: Separate out config/build/exec/parse") Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py | 24 tools/testing/kunit/kunit_tool_test.py | 4 ++-- 2 files changed, 2 insertions(+), 26

[PATCH v1 1/2] kunit: tool: fix broken default args in unit tests

2020-07-14 Thread Brendan Higgins
Commit ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") changed the default build directory for KUnit tests, but failed to update associated unit tests for kunit_tool, so update them. Fixes: ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") Signed-off

Re: [PATCH] kunit: capture stderr on all make subprocess calls

2020-07-09 Thread Brendan Higgins
; [1] https://bugzilla.kernel.org/show_bug.cgi?id=205219 > > Signed-off-by: Will Chen Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [RFC v5 03/11] mm/damon-test: Add more unit tests for 'init_regions'

2020-07-07 Thread Brendan Higgins
On Tue, Jul 7, 2020 at 7:47 AM SeongJae Park wrote: > > From: SeongJae Park > > This commit adds more test cases for the new feature, 'init_regions'. > > Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins

Re: [PATCH v2 1/2] kbuild: introduce ccflags-remove-y and asflags-remove-y

2020-07-07 Thread Brendan Higgins
09ded0 ("ftrace: do not trace library functions") > excluded too much. In later commit, I will try to remove ccflags-remove-y > from sub-directory Makefiles. > > Suggested-by: Sami Tolvanen > Signed-off-by: Masahiro Yamada > Acked-by: Steven Rostedt (VMware) > Acked-by: Michael Ellerman (powerpc) Acked-by: Brendan Higgins (KUnit)

Re: [RFC PATCH] Revert "um: Make CONFIG_STATIC_LINK actually static"

2020-06-30 Thread Brendan Higgins
On Wed, Jun 24, 2020 at 2:23 PM Ignat Korchagin wrote: > > This reverts commit 3363179385629c1804ea846f4e72608c2201a81e. > > This change is too restrictive. I've been running UML statically linked kernel > with UML_NET_VECTOR networking in a docker "FROM: scratch" container just > fine. > As

Re: [PATCH v5 02/12] arch: arm64: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > On Fri, Jun 26, 2020 at 02:09:07PM -0700, Brendan Higgins wrote: > > Add a linker section to arm64 where KUnit can put references to its test > > suites. This patch is an early step in transitioning to dispatching all &g

Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
On Fri, Jun 26, 2020 at 2:20 PM Kees Cook wrote: > > On Fri, Jun 26, 2020 at 02:09:06PM -0700, Brendan Higgins wrote: > > Add a linker section where KUnit can put references to its test suites. > > This patch is the first step in transitioning to dispatching all KUnit > >

Re: [PATCH v4 00/11] kunit: create a centralized executor to dispatch all KUnit tests

2020-06-26 Thread Brendan Higgins
On Wed, Jun 24, 2020 at 6:47 PM David Gow wrote: > > Glad this is back out there: a couple of minor nitpicks below: > > On Thu, Jun 25, 2020 at 4:58 AM Brendan Higgins > wrote: > > > > ## TL;DR > > > > This patchset adds a centralized executor to

[PATCH v5 09/12] kunit: test: add test plan to KUnit TAP format

2020-06-26 Thread Brendan Higgins
]: https://github.com/isaacs/testanything.github.io/blob/tap14/tap-version-14-specification.md#the-plan Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- lib/kunit/executor.c | 17 lib/kunit/test.c | 11 --- tools/testing

[PATCH v5 05/12] arch: um: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
Add a linker section to UML where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins Reviewed-by: Stephen

[PATCH v5 08/12] init: main: add KUnit to kernel init

2020-06-26 Thread Brendan Higgins
Remove KUnit from init calls entirely, instead call directly from kernel_init(). Co-developed-by: Alan Maguire Signed-off-by: Alan Maguire Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/kunit/test.h | 9 + init/main.c | 4 lib/kunit/executor.c | 4

[PATCH v5 06/12] arch: xtensa: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
Add a linker section to xtensa where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/xtensa

[PATCH v5 12/12] Documentation: kunit: add a brief blurb about kunit_test_suite

2020-06-26 Thread Brendan Higgins
Add a brief blurb saying how and when the kunit_test_suite() macro works to the usage documentation. Signed-off-by: Brendan Higgins --- Documentation/dev-tools/kunit/usage.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev

[PATCH v5 02/12] arch: arm64: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
Add a linker section to arm64 where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/arm64

[PATCH v5 10/12] kunit: Add 'kunit_shutdown' option

2020-06-26 Thread Brendan Higgins
after running all tests without needing a special initramfs. Signed-off-by: David Gow Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- lib/kunit/executor.c| 20 tools/testing/kunit/kunit_kernel.py | 2 +- tools/testing/kunit/kunit_parser.py | 2

[PATCH v5 03/12] arch: microblaze: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
Add a linker section to microblaze where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch

[PATCH v5 11/12] Documentation: Add kunit_shutdown to kernel-parameters.txt

2020-06-26 Thread Brendan Higgins
Add kunit_shutdown, an option to specify that the kernel shutsdown after running KUnit tests, to the kernel-parameters.txt documentation. Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- Documentation/admin-guide/kernel-parameters.txt | 8 1 file changed, 8 insertions

[PATCH v5 07/12] kunit: test: create a single centralized executor for all tests

2020-06-26 Thread Brendan Higgins
Signed-off-by: Iurii Zaikin Co-developed-by: Brendan Higgins Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/kunit/test.h | 67 +--- lib/kunit/Makefile | 3 +- lib/kunit/executor.c | 28 ++ lib/kunit/test.c | 2

[PATCH v5 00/12] kunit: create a centralized executor to dispatch all KUnit tests

2020-06-26 Thread Brendan Higgins
macro works. ## Remaining work to be done: The only architecture for which I was able to get a compiler, but was apparently unable to get KUnit into a section that the executor to see was m68k - not sure why. Alan Maguire (1): kunit: test: create a single centralized executor for all tests Brendan

[PATCH v5 04/12] arch: powerpc: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
Add a linker section to powerpc where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/powerpc

[PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites

2020-06-26 Thread Brendan Higgins
Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/asm-generic/vmlinux.lds.h | 8 1 file changed, 8 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7d..4f9b036fc9616 100644 --- a/include/asm-generic

Re: [RESEND, PATCH v2] lib: overflow-test: add KUnit test of check_*_overflow functions

2020-06-25 Thread Brendan Higgins
On Thu, Jun 18, 2020 at 8:06 PM Kees Cook wrote: Apologies for just jumping in the middle of this late. Vitor just brought something to my attention. > On Thu, Jun 18, 2020 at 11:08:14AM -0300, Vitor Massaru Iha wrote: > > This adds the conversion of the runtime tests of check_*_overflow

[RFC v1] kunit: tool: add support for QEMU

2020-06-24 Thread Brendan Higgins
Add basic support to run QEMU via kunit_tool. Add support for i386, x86_64, arm, arm64, and a couple others. Signed-off-by: Brendan Higgins --- This patch is very RFC; nevertheless, I wanted to get it out onto the list before I fix some of the more obvious problems. In particular, the most

[PATCH v4 01/11] vmlinux.lds.h: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/asm-generic/vmlinux.lds.h | 8 1 file changed, 8 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index db600ef218d7d..4f9b036fc9616 100644 --- a/include/asm-generic

[PATCH v4 09/11] kunit: test: add test plan to KUnit TAP format

2020-06-24 Thread Brendan Higgins
]: https://github.com/isaacs/testanything.github.io/blob/tap14/tap-version-14-specification.md#the-plan Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- lib/kunit/executor.c | 37 + lib/kunit/test.c | 11 --- tools

[PATCH v4 03/11] arch: microblaze: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to microblaze where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch

[PATCH v4 11/11] Documentation: kunit: add a brief blurb about kunit_test_suite

2020-06-24 Thread Brendan Higgins
Add a brief blurb saying how and when the kunit_test_suite() macro works to the usage documentation. Signed-off-by: Brendan Higgins --- Documentation/dev-tools/kunit/usage.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev

[PATCH v4 10/11] Documentation: Add kunit_shutdown to kernel-parameters.txt

2020-06-24 Thread Brendan Higgins
Add kunit_shutdown, an option to specify that the kernel shutsdown after running KUnit tests, to the kernel-parameters.txt documentation. Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- Documentation/admin-guide/kernel-parameters.txt | 8 1 file changed, 8 insertions

[PATCH v4 07/11] kunit: test: create a single centralized executor for all tests

2020-06-24 Thread Brendan Higgins
Signed-off-by: Iurii Zaikin Co-developed-by: Brendan Higgins Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/kunit/test.h | 64 ++-- lib/kunit/Makefile | 3 ++- lib/kunit/executor.c | 28 +++ lib/kunit/test.c | 2

[PATCH v4 06/11] arch: xtensa: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to xtensa where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/xtensa

[PATCH v4 08/11] init: main: add KUnit to kernel init

2020-06-24 Thread Brendan Higgins
Remove KUnit from init calls entirely, instead call directly from kernel_init(). Co-developed-by: Alan Maguire Signed-off-by: Alan Maguire Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/kunit/test.h | 9 + init/main.c | 4 lib/kunit/executor.c | 4

[PATCH v4 05/11] arch: um: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to UML where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins Reviewed-by: Stephen

[PATCH v4 02/11] arch: arm64: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to arm64 where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/arm64

[PATCH v4 00/11] kunit: create a centralized executor to dispatch all KUnit tests

2020-06-24 Thread Brendan Higgins
: The only architecture for which I was able to get a compiler, but was apparently unable to get KUnit into a section that the executor to see was m68k - not sure why. Alan Maguire (1): kunit: test: create a single centralized executor for all tests Brendan Higgins (10): vmlinux.lds.h: add linker

[PATCH v4 04/11] arch: powerpc: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to powerpc where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/powerpc

Re: [PATCH v3 4/7] init: main: add KUnit to kernel init

2020-06-24 Thread Brendan Higgins
On Mon, Mar 2, 2020 at 2:45 PM Kees Cook wrote: Sorry it took so long to respond. I am reviving this patchset now, about to send out a new revision and I just saw this comment. > On 2/27/20 7:20 PM, Brendan Higgins wrote: > > Remove KUnit from init calls entirely, instead call dire

Re: [PATCH v3 4/7] init: main: add KUnit to kernel init

2020-06-24 Thread Brendan Higgins
On Mon, Mar 2, 2020 at 11:13 AM Frank Rowand wrote: Sorry it took so long to respond. I am reviving this patchset now, about to send out a new revision and I just saw this comment. > On 2/27/20 7:20 PM, Brendan Higgins wrote: > > Remove KUnit from init calls entirely, instead call dire

Re: xilinx_axienet_main.c:undefined reference to `devm_ioremap_resource'

2020-06-23 Thread Brendan Higgins
On Sat, Jun 20, 2020 at 1:59 AM kernel test robot wrote: > > Hi Brendan, > > It's probably a bug fix that unveils the link errors. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 4333a9b0b67bb4e8bcd91bdd80da80b0ec151162 > commit:

Re: RFC: KTAP documentation - expected messages

2020-06-23 Thread Brendan Higgins
On Mon, Jun 22, 2020 at 7:47 PM David Gow wrote: > > On Mon, Jun 22, 2020 at 6:45 AM Frank Rowand wrote: > > > > Tim Bird started a thread [1] proposing that he document the selftest result > > format used by Linux kernel tests. > > > > [1] > >

Re: [PATCH] Documentation: kunit: Add naming guidelines

2020-06-22 Thread Brendan Higgins
I imagine +Theodore Ts'o might have some thoughts on this. +Bird, Timothy - Figured you might be interested since I think this might pertain to the KTAP discussion. On Fri, Jun 19, 2020 at 10:50 PM David Gow wrote: > > As discussed in [1], KUnit tests have hitherto not had a particularly >

Re: common KUnit Kconfig and file naming (was: Re: [PATCH] lib: kunit_test_overflow: add KUnit test of check_*_overflow functions)

2020-06-19 Thread Brendan Higgins
On Thu, Jun 18, 2020 at 11:39 PM David Gow wrote: [...] > On Fri, Jun 19, 2020 at 4:28 AM Brendan Higgins > wrote: > > > > On Tue, Jun 16, 2020 at 9:21 PM David Gow wrote: > > > > > > On Tue, Jun 16, 2020 at 5:40 PM Alan Maguire > > > wrote: &

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-19 Thread Brendan Higgins
On Tue, Jun 16, 2020 at 4:52 PM Kees Cook wrote: > > On Mon, Jun 15, 2020 at 07:07:34PM +, Bird, Tim wrote: > > From: Kees Cook > > > Note: making the plan line required differs from TAP13 and TAP14. I > > > think it's the right choice, but we should be clear. > > > > [...] > > With regards

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-19 Thread Brendan Higgins
On Tue, Jun 16, 2020 at 9:06 PM David Gow wrote: > > On Wed, Jun 17, 2020 at 11:36 AM Kees Cook wrote: > > > > On Wed, Jun 17, 2020 at 02:30:45AM +, Bird, Tim wrote: > > > Agreed. You only need machine-parsable data if you expect the CI > > > system to do something more with the data than

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-19 Thread Brendan Higgins
On Tue, Jun 16, 2020 at 2:16 PM Bird, Tim wrote: > > > > > -Original Message- > > From: Brendan Higgins > > > > On Wed, Jun 10, 2020 at 06:11:06PM +, Bird, Tim wrote: > > > Some months ago I started work on a document to formalize how > &

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-19 Thread Brendan Higgins
On Tue, Jun 16, 2020 at 1:37 PM Bird, Tim wrote: > > > -Original Message- > > From: Brendan Higgins > > > > On Mon, Jun 15, 2020 at 10:34 AM Bird, Tim wrote: > > > > > > > -Original Message- > > > > From: David Go

Re: [PATCH v2] kunit: fix KconfigParseError handling CC_VERSION_TEXT

2020-06-18 Thread Brendan Higgins
On Thu, Jun 18, 2020 at 5:39 AM Vitor Massaru Iha wrote: > > Commit 8b59cd81dc5 ("kbuild: ensure full rebuild when the compiler > is updated") added the environment variable CC_VERSION_TEXT, > parse_from_string() doesn't expect a string in value field and this > causes the failure below: > >

Re: [PATCH] kunit: fix KconfigParseError by ignoring CC_VERSION_TEXT

2020-06-18 Thread Brendan Higgins
On Wed, Jun 17, 2020 at 8:57 PM Vitor Massaru Iha wrote: > > Commit 8b59cd81dc5 ("kbuild: ensure full rebuild when the compiler > is updated") added the environment variable CC_VERSION_TEXT, > parse_from_string() doesn't expect a string and this causes the > failure below: > > [iha@bbking linux]$

Re: common KUnit Kconfig and file naming (was: Re: [PATCH] lib: kunit_test_overflow: add KUnit test of check_*_overflow functions)

2020-06-18 Thread Brendan Higgins
On Tue, Jun 16, 2020 at 9:21 PM David Gow wrote: > > On Tue, Jun 16, 2020 at 5:40 PM Alan Maguire wrote: > > > > On Tue, 16 Jun 2020, David Gow wrote: > > > > > CONFIG_PM_QOS_KUNIT_TESTOn Mon, Jun 15, 2020 at 1:48 AM Kees Cook > > > wrote: > > > > > > > > On Sat, Jun 13, 2020 at 02:51:17PM

Re: [PATCH] kunit: kunit_tool: Fix invalid result when build fails

2020-06-18 Thread Brendan Higgins
avid Gow Oh wow! This is an old issue. Nice work! Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-16 Thread Brendan Higgins
On Wed, Jun 10, 2020 at 06:11:06PM +, Bird, Tim wrote: > Some months ago I started work on a document to formalize how > kselftest implements the TAP specification. However, I didn't finish > that work. Maybe it's time to do so now. > > kselftest has developed a few differences from the

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-16 Thread Brendan Higgins
On Mon, Jun 15, 2020 at 10:34 AM Bird, Tim wrote: > > > -Original Message- > > From: David Gow > > > > On Thu, Jun 11, 2020 at 2:11 AM Bird, Tim wrote: [...] > > KUnit is currently outputting "TAP version 14", as we were hoping some > > of our changes would get into the TAP14 spec. (Any

Re: RFC - kernel selftest result documentation (KTAP)

2020-06-16 Thread Brendan Higgins
On Tue, Jun 16, 2020 at 9:42 AM Bird, Tim wrote: Apologies for taking so long to get to this. I have been busy with some stuff internally at Google. > > -Original Message- > > From: Paolo Bonzini > > > > On 15/06/20 21:07, Bird, Tim wrote: > > >> Note: making the plan line required

Re: [PATCH] lib: kunit_test_overflow: add KUnit test of check_*_overflow functions

2020-06-12 Thread Brendan Higgins
On Thu, Jun 11, 2020 at 2:55 PM Vitor Massaru Iha wrote: > > This adds the convertion of the runtime tests of check_*_overflow fuctions, > from `lib/test_overflow.c`to KUnit tests. > > The log similar to the one seen in dmesg running test_overflow can be > seen in `test.log`. > > Signed-off-by:

Re: [PATCH] kunit: show error if kunit results are not present

2020-06-11 Thread Brendan Higgins
+Will Chen On Thu, Jun 11, 2020 at 2:17 PM Uriel Guajardo wrote: > > From: Uriel Guajardo > > Currently, if the kernel is configured incorrectly or if it crashes before any > kunit tests are run, kunit finishes without error, reporting > that 0 test cases were run. > > To fix this, an error is

Re: [PATCH] kunit: show error if kunit results are not present

2020-06-11 Thread Brendan Higgins
, an error is shown when the tap header is not found, which > indicates that kunit was not able to run at all. > > Signed-off-by: Uriel Guajardo Reviewed-by: Brendan Higgins

Re: [PATCH] kunit: kunit_config: Fix parsing of CONFIG options with space

2020-06-09 Thread Brendan Higgins
KUnit config > parsing which did not like the spaces in the string. > > Fix this by updating the regex to allow strings containing spaces. > > Fixes: 8b59cd81dc5e ("kbuild: ensure full rebuild when the compiler is > updated") > Signed-off-by: Rikard Falkeborn Reviewed

Re: [PATCH v8 5/5] mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set

2020-06-09 Thread Brendan Higgins
y these would panic the system > if panic_on_warn was set, now they can run (and will panic the system > should non-KASAN warnings show up). > > Signed-off-by: David Gow > Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins

Re: [PATCH v8 4/5] KASAN: Testing Documentation

2020-06-09 Thread Brendan Higgins
f-by: David Gow > Reviewed-by: Andrey Konovalov Acked-by: Brendan Higgins

Re: [PATCH v8 2/5] KUnit: KASAN Integration

2020-06-09 Thread Brendan Higgins
bqueu...@mail.gmail.com/T/#t > > Signed-off-by: Patricia Alfonso > Signed-off-by: David Gow > Reviewed-by: Dmitry Vyukov > Reviewed-by: Andrey Konovalov Acked-by: Brendan Higgins

Re: [PATCH v4 kunit-next 0/2] kunit: extend kunit resources API

2020-06-05 Thread Brendan Higgins
On Fri, May 29, 2020 at 2:46 PM Alan Maguire wrote: > > A recent RFC patch set [1] suggests some additional functionality > may be needed around kunit resources. It seems to require > > 1. support for resources without allocation > 2. support for lookup of such resources > 3. support for access

Re: Re: [PATCH v14 13/15] mm/damon-test: Add a kunit test for recording setup

2020-06-03 Thread Brendan Higgins
On Wed, Jun 3, 2020 at 5:42 AM SeongJae Park wrote: > > On Tue, 2 Jun 2020 13:28:03 -0700 Brendan Higgins > wrote: > > > On Tue, Jun 2, 2020 at 6:16 AM SeongJae Park wrote: > > > > > > From: SeongJae Park > > > > > > This comm

Re: [PATCH v14 13/15] mm/damon-test: Add a kunit test for recording setup

2020-06-02 Thread Brendan Higgins
On Tue, Jun 2, 2020 at 6:16 AM SeongJae Park wrote: > > From: SeongJae Park > > This commit adds another unit test case for the recording setup. > > Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins

Re: [PATCH] Documentation: kunit: Add some troubleshooting tips to the FAQ

2020-06-02 Thread Brendan Higgins
bde-7352-083bf4b94...@intel.com/T/#m23213d4e156db6d59b0b460a9014950f5ff6eb03 > > Signed-off-by: David Gow Looks good to me + Alan's suggestion. Reviewed-by: Brendan Higgins

Re: [PATCH 1/2] software node: implement software_node_unregister()

2020-05-28 Thread Brendan Higgins
de_pointer() test which to use this new > function as it had the problem of tearing things down in the backwards > order. > > Fixes: f1ce39df508d ("lib/test_printf: Add tests for %pfw printk modifier") > Reported-by: Naresh Kamboju > Reported-by: kernel test robot >

Re: [PATCH v7 0/5] KUnit-KASAN Integration

2020-05-28 Thread Brendan Higgins
On Tue, May 26, 2020 at 7:51 PM David Gow wrote: > > On Sat, May 23, 2020 at 6:30 AM shuah wrote: > > > > On 5/3/20 4:09 AM, Alan Maguire wrote: > > > On Thu, 23 Apr 2020, David Gow wrote: > > > > > >> This patchset contains everything needed to integrate KASAN and KUnit. > > >> > > >> KUnit

Re: [PATCH v3 kunit-next 2/2] kunit: add support for named resources

2020-05-28 Thread Brendan Higgins
an Maguire FYI, I already gave a reviewed-by for this commit back in v1, so: Reviewed-by: Brendan Higgins

Re: [PATCH v3 kunit-next 1/2] kunit: generalize kunit_resource API beyond allocated resources

2020-05-28 Thread Brendan Higgins
names > for consistency and readability. > > [1] https://lkml.org/lkml/2020/2/26/1286 > > Signed-off-by: Alan Maguire One comment below, other than that: Reviewed-by: Brendan Higgins Sorry for not keeping up with this. I forgot that I didn't give this a reviewed-by. > ---

Re: [PATCH v3 0/6] Enable as many KUnit tests as possible

2020-05-28 Thread Brendan Higgins
On Wed, May 27, 2020 at 4:49 AM Anders Roxell wrote: > > Hi all, > > Friendly ping: who can take this? Sorry, I just reviewed the last patch. Shuah, do you mind picking this up for 5.8? > Cheers, > Anders > > On Mon, 11 May 2020 at 15:14, Anders Roxell wrote: > > > > Hi, > > > > This patchset

Re: [PATCH v3 1/6] kunit: Kconfig: enable a KUNIT_ALL_TESTS fragment

2020-05-28 Thread Brendan Higgins
will be missed if CONFIG_KUNIT_ALL_TESTS is set as a module. > > Signed-off-by: Anders Roxell Reviewed-by: Brendan Higgins

Re: [PATCH v1] Revert "software node: Simplify software_node_release() function"

2020-05-20 Thread Brendan Higgins
On Wed, May 20, 2020 at 9:42 AM Andy Shevchenko wrote: > > On Wed, May 20, 2020 at 05:02:27PM +0200, Petr Mladek wrote: > > On Thu 2020-02-27 16:00:01, Brendan Higgins wrote: > > > I have found similar report from a test robot, see > > https://lore.kernel.org/lkml/

Re: [RFC PATCH] kunit: Support skipped tests

2020-05-14 Thread Brendan Higgins
On Tue, May 12, 2020 at 9:30 PM David Gow wrote: > > This is a proof-of-concept to support "skipping" tests. > > The kunit_mark_skipped() macro marks the current test as "skipped", with > the provided reason. The kunit_skip() macro will mark the test as > skipped, and abort the test. > > The TAP

<    1   2   3   4   5   6   7   8   9   >