Re: [PATCH] Documentation: kunit: Fix verification command

2019-10-07 Thread Brendan Higgins
On Sun, Sep 8, 2019 at 4:40 PM Brendan Higgins wrote: > > On Sat, Sep 7, 2019 at 2:01 PM SeongJae Park wrote: > > > > kunit wrapper script ('kunit.py') receives a sub-command (only 'run' for > > now) as its argument. If no sub-command is given, it pri

Re: [RFC 03/19] ktf: Introduce a generic netlink protocol for test result communication

2019-09-08 Thread Brendan Higgins
On Tue, Aug 13, 2019 at 08:09:18AM +0200, Knut Omang wrote: > The generic netlink protocol used to communicate between > kernel and user space about tests and test results, as well as some > means for configuring tests within the kernel. > > Unlike other kernel side test code in the kernel, ktf do

Re: [RFC 02/19] ktf: Introduce the main part of the kernel side of ktf

2019-09-08 Thread Brendan Higgins
On Tue, Aug 13, 2019 at 08:09:17AM +0200, Knut Omang wrote: Sorry, it's taken me way too long to get down to a proper code review on this. I was hoping to send you something a couple weeks ago in preparation for Tuesday, but I have been crazy busy. > The ktf module itself and basic data structure

Re: [PATCH] Documentation: kunit: Fix verification command

2019-09-08 Thread Brendan Higgins
the kunit > documentation for a verification of kunit is missing the sub-command. > This commit fixes the example. > > Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins > --- > Documentation/dev-tools/kunit/start.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH v2] doc: kselftest: update for clarity on running kselftests in CI rings

2019-08-29 Thread Brendan Higgins
On Wed, Aug 28, 2019 at 12:18 PM shuah wrote: > > On 8/26/19 6:37 PM, Shuah Khan wrote: > > Update to add clarity and recommendations on running newer kselftests > > on older kernels vs. matching the kernel and kselftest revisions. > > > > The recommendation is "Match kernel revision and kselftest

Re: [PATCH v2] doc: kselftest: update for clarity on running kselftests in CI rings

2019-08-29 Thread Brendan Higgins
d-off-by: Shuah Khan Reviewed-by: Brendan Higgins One minor comment below. > --- > Changes since v1: Fixed "WARNING: Title underline too short." > > Documentation/dev-tools/kselftest.rst | 25 + > 1 file changed, 25 insertions(+) >

Re: [PATCH v14 01/18] kunit: test: add KUnit test runner core

2019-08-23 Thread Brendan Higgins
On Fri, Aug 23, 2019 at 10:34 AM shuah wrote: > > On 8/23/19 11:27 AM, Brendan Higgins wrote: > > On Fri, Aug 23, 2019 at 10:05 AM shuah wrote: > >> > >> On 8/23/19 10:48 AM, Brendan Higgins wrote: > >>> On Fri, Aug 23, 2019 at 8:33 AM shuah wrote: &g

Re: [PATCH v14 09/18] kunit: test: add support for test abort

2019-08-23 Thread Brendan Higgins
On Fri, Aug 23, 2019 at 10:07 AM shuah wrote: > > On 8/23/19 10:56 AM, Brendan Higgins wrote: > > On Fri, Aug 23, 2019 at 8:36 AM shuah wrote: > >> > >> Hi Brendan, > >> > >> On 8/20/19 5:20 PM, Brendan Higgins wrote: > >>> Add support

Re: [PATCH v14 01/18] kunit: test: add KUnit test runner core

2019-08-23 Thread Brendan Higgins
On Fri, Aug 23, 2019 at 10:05 AM shuah wrote: > > On 8/23/19 10:48 AM, Brendan Higgins wrote: > > On Fri, Aug 23, 2019 at 8:33 AM shuah wrote: > >> > >> Hi Brendan, > >> > >> On 8/20/19 5:20 PM, Brendan Higgins wrote: > >>> Add core fa

Re: [PATCH v14 09/18] kunit: test: add support for test abort

2019-08-23 Thread Brendan Higgins
On Fri, Aug 23, 2019 at 8:36 AM shuah wrote: > > Hi Brendan, > > On 8/20/19 5:20 PM, Brendan Higgins wrote: > > Add support for aborting/bailing out of test cases, which is needed for > > implementing assertions. > > > > An assertion is like an expecta

Re: [PATCH v14 01/18] kunit: test: add KUnit test runner core

2019-08-23 Thread Brendan Higgins
On Fri, Aug 23, 2019 at 8:33 AM shuah wrote: > > Hi Brendan, > > On 8/20/19 5:20 PM, Brendan Higgins wrote: > > Add core facilities for defining unit tests; this provides a common way > > to define test cases, functions that execute code which is under test > >

[PATCH v13 05/18] kunit: test: add the concept of expectations

2019-08-13 Thread Brendan Higgins
Add support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe Reviewed-by: Stephen Boyd --- include/kunit/test.h | 834

[PATCH v13 00/18] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-08-13 Thread Brendan Higgins
## TL;DR This revision addresses comments from Stephen and Bjorn Helgaas. Most changes are pretty minor stuff that doesn't affect the API in anyway. One significant change, however, is that I added support for freeing kunit_resource managed resources before the test case is finished via kunit_reso

Re: [RFC 00/19] Integration of Kernel Test Framework (KTF) into the kernel tree

2019-08-13 Thread Brendan Higgins
On Tue, Aug 13, 2019 at 4:29 AM Knut Omang wrote: > > On Tue, 2019-08-13 at 01:17 -0700, Brendan Higgins wrote: > > On Mon, Aug 12, 2019 at 11:11 PM Knut Omang wrote: > > [...] > > > Alan Maguire (3): > > > ktf: Implementation of ktf support for overrid

Re: [RFC 00/19] Integration of Kernel Test Framework (KTF) into the kernel tree

2019-08-13 Thread Brendan Higgins
On Tue, Aug 13, 2019 at 2:51 AM Knut Omang wrote: > > On Tue, 2019-08-13 at 10:23 +0200, Greg Kroah-Hartman wrote: > > On Tue, Aug 13, 2019 at 08:09:15AM +0200, Knut Omang wrote: > > > and in the making:: > > > > > > kunit/(kernel only (UML)) > > > > You are going to have t

Re: [RFC 00/19] Integration of Kernel Test Framework (KTF) into the kernel tree

2019-08-13 Thread Brendan Higgins
On Mon, Aug 12, 2019 at 11:11 PM Knut Omang wrote: [...] > Alan Maguire (3): > ktf: Implementation of ktf support for overriding function entry and return. > ktf: A simple debugfs interface to test results > ktf: Simple coverage support > > Knut Omang (16): > kbuild: Fixes to rules for hos

Re: [RFC 00/19] Integration of Kernel Test Framework (KTF) into the kernel tree

2019-08-13 Thread Brendan Higgins
On Mon, Aug 12, 2019 at 11:11 PM Knut Omang wrote: > > KTF has already been available for a while as a separate git repository with > means to facilitate use with any kernel version. > > KTF can be used both for "pure" unit testing and for more pragmatic > approaches to component testing. Apart fr

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-12 Thread Brendan Higgins
On Thu, Aug 1, 2019 at 2:43 PM Brendan Higgins wrote: > > On Thu, Aug 1, 2019 at 2:14 PM Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-08-01 11:59:57) > > > On Thu, Aug 1, 2019 at 11:55 AM Brendan Higgins > > > wrote: > > > > >

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Brendan Higgins
On Tue, Jul 16, 2019 at 10:50 AM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-16 01:37:34) > > On Tue, Jul 16, 2019 at 12:57 AM Brendan Higgins > > wrote: > > > > > > A `struct kunit_stream` is usually associated with a message that is > >

Re: [kbuild:kunit 14/17] htmldocs: include/kunit/kunit-stream.h:58: warning: Function parameter or member '2' not described in '__printf'

2019-06-04 Thread Brendan Higgins
On Mon, May 20, 2019 at 9:49 PM Randy Dunlap wrote: > > On 5/10/19 2:03 PM, Brendan Higgins wrote: > > On Thu, May 9, 2019 at 6:23 PM kbuild test robot wrote: > >> tree: > >> https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kb

Re: [PATCH v4 16/18] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-14 Thread Brendan Higgins
On Tue, May 14, 2019 at 03:17:09PM -0700, Brendan Higgins wrote: > Add myself as maintainer of KUnit, the Linux kernel's unit testing > framework. > > Signed-off-by: Brendan Higgins > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Logan Gunthorpe > --- > MAINTAINE

Re: [PATCH v3 15/18] Documentation: kunit: add documentation for KUnit

2019-05-14 Thread Brendan Higgins
On Tue, May 14, 2019 at 12:16:23PM -0600, Jonathan Corbet wrote: > On Tue, 14 May 2019 11:08:10 -0700 > Brendan Higgins wrote: > > > > Naturally, though, I have one request: I'd rather not see this at the top > > > level, which is more than crowded eno

[PATCH v4 13/18] kunit: tool: add Python wrappers for running KUnit tests

2019-05-14 Thread Brendan Higgins
. - provide function to invoke the kernel and stream the output back. Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- tools/testing/kunit/.gitignore| 3 + tools/testing/kunit/kunit.py

[PATCH v4 15/18] Documentation: kunit: add documentation for KUnit

2019-05-14 Thread Brendan Higgins
Add documentation for KUnit, the Linux kernel unit testing framework. - Add intro and usage guide for KUnit - Add API reference Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Documentation/dev-tools/index.rst

[PATCH v4 16/18] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-14 Thread Brendan Higgins
Add myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS

[PATCH v4 14/18] kunit: defconfig: add defconfigs for building KUnit tests

2019-05-14 Thread Brendan Higgins
Add defconfig for UML and a fragment that can be used to configure other architectures for building KUnit tests. Add option to kunit_tool to use a defconfig to create the kunitconfig. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- arch/um

[PATCH v4 18/18] MAINTAINERS: add proc sysctl KUnit test to PROC SYSCTL section

2019-05-14 Thread Brendan Higgins
Add entry for the new proc sysctl KUnit test to the PROC SYSCTL section. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8a91887c8d541..2e539647589fd

[PATCH v4 10/18] kunit: test: add tests for kunit test abort

2019-05-14 Thread Brendan Higgins
Add KUnit tests for the KUnit test abort mechanism (see preceding commit). Add tests both for general try catch mechanism as well as non-architecture specific mechanism. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- kunit/Makefile| 3

[PATCH v4 17/18] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()

2019-05-14 Thread Brendan Higgins
From: Iurii Zaikin KUnit tests for initialized data behavior of proc_dointvec that is explicitly checked in the code. Includes basic parsing tests including int min/max overflow. Signed-off-by: Iurii Zaikin Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan

[PATCH v4 09/18] kunit: test: add support for test abort

2019-05-14 Thread Brendan Higgins
. Logically speaking, these are the premises of the test case, so if a premise isn't true, there is no point in continuing the test case because there are no conclusions that can be drawn without the premises. Whereas, the expectation is the thing you are trying to prove. Signed-off-by: Brendan Hi

[PATCH v4 11/18] kunit: test: add the concept of assertions

2019-05-14 Thread Brendan Higgins
still express the idea of a premise using the above idiom, but I think KUNIT_ASSERT_* states the intended idea perfectly. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/test.h | 498 - kunit/s

[PATCH v4 07/18] kunit: test: add initial tests

2019-05-14 Thread Brendan Higgins
Add a test for string stream along with a simpler example. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- kunit/Kconfig | 25 ++- kunit/Makefile | 4 ++ kunit/example-test.c | 88

[PATCH v4 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-05-14 Thread Brendan Higgins
A lot of the expectation and assertion infrastructure prints out fairly complicated test failure messages, so add a C++ style log library for for logging test results. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/kunit-stream.h

[PATCH v4 06/18] kbuild: enable building KUnit

2019-05-14 Thread Brendan Higgins
KUnit is a new unit testing framework for the kernel and when used is built into the kernel as a part of it. Add KUnit to the root Kconfig and Makefile to allow it to be actually built. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Kconfig

[PATCH v4 12/18] kunit: test: add tests for KUnit managed resources

2019-05-14 Thread Brendan Higgins
: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- kunit/test-test.c | 123 ++ 1 file changed, 123 insertions(+) diff --git a/kunit/test-test.c b/kunit/test-test.c index 7afc9bb52f7be..ee926f798b266 100644 --- a/kunit

[PATCH v4 08/18] objtool: add kunit_try_catch_throw to the noreturn list

2019-05-14 Thread Brendan Higgins
kernel, to bail out of a broken test. As a consequence, it is a new __noreturn function that objtool thinks is broken (as seen above). So fix this warning by adding kunit_try_catch_throw to objtool's noreturn list. Reported-by: kbuild test robot Signed-off-by: Brendan Higgins Link:

[PATCH v4 05/18] kunit: test: add the concept of expectations

2019-05-14 Thread Brendan Higgins
Add support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/test.h | 518 +++ kunit/test.c | 66

[PATCH v4 03/18] kunit: test: add string_stream a std::stream like string builder

2019-05-14 Thread Brendan Higgins
A number of test features need to do pretty complicated string printing where it may not be possible to rely on a single preallocated string with parameters. So provide a library for constructing the string as you go similar to C++'s std::string. Signed-off-by: Brendan Higgins Reviewed-by:

[PATCH v4 02/18] kunit: test: add test resource management API

2019-05-14 Thread Brendan Higgins
;test resources" which are managed by the test infrastructure and are automatically cleaned up at the conclusion of the test. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/test.h | 109

[PATCH v4 01/18] kunit: test: add KUnit test runner core

2019-05-14 Thread Brendan Higgins
them test_modules). Just define test cases and how to execute them for now; setting expectations on code will be defined later. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/test.h | 162 ++ kunit/Kconfig

[PATCH v4 00/18] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-14 Thread Brendan Higgins
## TLDR A quick follow up to yesterday's revision. I got some feedback that I wanted to incorporate before anyone else read the update. For this reason, I will leave a TLDR of the biggest changes since v2. Biggest things to look out for (since v2): - KUnit core now outputs results in TAP14. - He

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-14 Thread Brendan Higgins
On Fri, May 10, 2019 at 02:52:59PM -0700, Frank Rowand wrote: Sorry, I forgot to get back to this thread. > On 5/9/19 3:20 PM, Logan Gunthorpe wrote: > > > > > > On 2019-05-09 3:42 p.m., Theodore Ts'o wrote: > >> On Thu, May 09, 2019 at 11:12:12AM -0700, Frank Rowand wrote: > >>> > >>>     "My

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-14 Thread Brendan Higgins
On Tue, May 14, 2019 at 02:05:05PM +0200, Daniel Vetter wrote: > On Tue, May 14, 2019 at 8:04 AM Brendan Higgins > wrote: > > > > On Mon, May 13, 2019 at 04:44:51PM +0200, Daniel Vetter wrote: > > > On Sat, May 11, 2019 at 01:33:44PM -0400, Theodore Ts'o wrote: &g

Re: [PATCH v3 08/18] objtool: add kunit_try_catch_throw to the noreturn list

2019-05-14 Thread Brendan Higgins
On Tue, May 14, 2019 at 10:46:55AM +0200, Peter Zijlstra wrote: > On Tue, May 14, 2019 at 01:12:23AM -0700, Brendan Higgins wrote: > > On Tue, May 14, 2019 at 08:56:43AM +0200, Peter Zijlstra wrote: > > > On Mon, May 13, 2019 at 10:42:42PM -0700, Brendan Higgins wrote: >

Re: [PATCH v3 15/18] Documentation: kunit: add documentation for KUnit

2019-05-14 Thread Brendan Higgins
On Tue, May 14, 2019 at 07:34:22AM -0600, Jonathan Corbet wrote: > On Mon, 13 May 2019 22:42:49 -0700 > Brendan Higgins wrote: > > > Add documentation for KUnit, the Linux kernel unit testing framework. > > - Add intro and usage guide for KUnit > > - Add API refer

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-14 Thread Brendan Higgins
On Fri, May 10, 2019 at 03:13:40PM -0700, Frank Rowand wrote: > On 5/10/19 9:17 AM, Logan Gunthorpe wrote: > > > > > > On 2019-05-09 11:18 p.m., Frank Rowand wrote: > > > >> YES, kselftest has in-kernel tests. (Excuse the shouting...) > > > > Cool. From my cursory look, in my opinion, these wo

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-14 Thread Brendan Higgins
On Wed, May 08, 2019 at 05:58:49PM -0700, Frank Rowand wrote: > Hi Ted, > > On 5/7/19 10:22 AM, Theodore Ts'o wrote: > > On Tue, May 07, 2019 at 10:01:19AM +0200, Greg KH wrote: > Not very helpful to cut the text here, plus not explicitly indicating that > text was cut (yes, I know the ">>>" will

Re: [PATCH v3 08/18] objtool: add kunit_try_catch_throw to the noreturn list

2019-05-14 Thread Brendan Higgins
On Tue, May 14, 2019 at 08:56:43AM +0200, Peter Zijlstra wrote: > On Mon, May 13, 2019 at 10:42:42PM -0700, Brendan Higgins wrote: > > This fixes the following warning seen on GCC 7.3: > > kunit/test-test.o: warning: objtool: kunit_test_unsuccessful_try() falls > > thr

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-14 Thread Brendan Higgins
On Sat, May 11, 2019 at 08:43:23AM +0200, Knut Omang wrote: > On Fri, 2019-05-10 at 14:59 -0700, Frank Rowand wrote: > > On 5/10/19 3:23 AM, Brendan Higgins wrote: > > >> On Fri, May 10, 2019 at 7:49 AM Knut Omang wrote: > > >>> > > >>> On

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Brendan Higgins
On Sat, May 11, 2019 at 08:17:47AM +0200, Knut Omang wrote: > On Fri, 2019-05-10 at 15:18 -0700, Frank Rowand wrote: > > On 5/10/19 1:54 PM, Brendan Higgins wrote: > > > On Fri, May 10, 2019 at 5:13 AM Knut Omang wrote: > > >> On Fri, 2019-05-10 at 03:23 -0700, Bren

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Brendan Higgins
On Mon, May 13, 2019 at 04:44:51PM +0200, Daniel Vetter wrote: > On Sat, May 11, 2019 at 01:33:44PM -0400, Theodore Ts'o wrote: > > On Fri, May 10, 2019 at 02:12:40PM -0700, Frank Rowand wrote: > > > However, the reply is incorrect. Kselftest in-kernel tests (which > > > is the context here) can b

[PATCH v3 15/18] Documentation: kunit: add documentation for KUnit

2019-05-13 Thread Brendan Higgins
Add documentation for KUnit, the Linux kernel unit testing framework. - Add intro and usage guide for KUnit - Add API reference Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Addressed

[PATCH v3 10/18] kunit: test: add tests for kunit test abort

2019-05-13 Thread Brendan Higgins
Add KUnit tests for the KUnit test abort mechanism (see preceding commit). Add tests both for general try catch mechanism as well as non-architecture specific mechanism. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- kunit/Makefile| 3

[PATCH v3 13/18] kunit: tool: add Python wrappers for running KUnit tests

2019-05-13 Thread Brendan Higgins
. - provide function to invoke the kernel and stream the output back. Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- tools/testing/kunit/.gitignore| 3 + tools/testing/kunit/kunit.py

[PATCH v3 16/18] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-13 Thread Brendan Higgins
Add myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added linux-kselftest@ as a mailing list entry for KUnit as requested by

[PATCH v3 14/18] kunit: defconfig: add defconfigs for building KUnit tests

2019-05-13 Thread Brendan Higgins
Add defconfig for UML and a fragment that can be used to configure other architectures for building KUnit tests. Add option to kunit_tool to use a defconfig to create the kunitconfig. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- arch/um

[PATCH v3 18/18] MAINTAINERS: add proc sysctl KUnit test to PROC SYSCTL section

2019-05-13 Thread Brendan Higgins
Add entry for the new proc sysctl KUnit test to the PROC SYSCTL section. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8a91887c8d541..2e539647589fd

[PATCH v3 17/18] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()

2019-05-13 Thread Brendan Higgins
From: Iurii Zaikin KUnit tests for initialized data behavior of proc_dointvec that is explicitly checked in the code. Includes basic parsing tests including int min/max overflow. Signed-off-by: Iurii Zaikin Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan

[PATCH v3 09/18] kunit: test: add support for test abort

2019-05-13 Thread Brendan Higgins
. Logically speaking, these are the premises of the test case, so if a premise isn't true, there is no point in continuing the test case because there are no conclusions that can be drawn without the premises. Whereas, the expectation is the thing you are trying to prove. Signed-off-by: Brendan Hi

[PATCH v3 12/18] kunit: test: add tests for KUnit managed resources

2019-05-13 Thread Brendan Higgins
: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added more details to change log as per Shuah's comments. - Made use of new EXPECT macro for pointer comparison to warning reported by kbuild bot. --- kunit/test-test.c

[PATCH v3 11/18] kunit: test: add the concept of assertions

2019-05-13 Thread Brendan Higgins
still express the idea of a premise using the above idiom, but I think KUNIT_ASSERT_* states the intended idea perfectly. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/test.h | 498 - kunit/s

[PATCH v3 08/18] objtool: add kunit_try_catch_throw to the noreturn list

2019-05-13 Thread Brendan Higgins
This fixes the following warning seen on GCC 7.3: kunit/test-test.o: warning: objtool: kunit_test_unsuccessful_try() falls through to next function kunit_test_catch() Reported-by: kbuild test robot To: Josh Poimboeuf To: Peter Zijlstra Signed-off-by: Brendan Higgins Link: https

[PATCH v3 07/18] kunit: test: add initial tests

2019-05-13 Thread Brendan Higgins
Add a test for string stream along with a simpler example. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added more Kconfig help text for KUNIT_TEST and KUNIT_EXAMPLE_TEST as per Shuah's comments. ---

[PATCH v3 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-05-13 Thread Brendan Higgins
A lot of the expectation and assertion infrastructure prints out fairly complicated test failure messages, so add a C++ style log library for for logging test results. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision

[PATCH v3 02/18] kunit: test: add test resource management API

2019-05-13 Thread Brendan Higgins
;test resources" which are managed by the test infrastructure and are automatically cleaned up at the conclusion of the test. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/test.h | 109

[PATCH v3 05/18] kunit: test: add the concept of expectations

2019-05-13 Thread Brendan Higgins
Add support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added EXPECT macros for pointer comparison to address issue pointed

[PATCH v3 03/18] kunit: test: add string_stream a std::stream like string builder

2019-05-13 Thread Brendan Higgins
A number of test features need to do pretty complicated string printing where it may not be possible to rely on a single preallocated string with parameters. So provide a library for constructing the string as you go similar to C++'s std::string. Signed-off-by: Brendan Higgins Reviewed-by:

[PATCH v3 06/18] kbuild: enable building KUnit

2019-05-13 Thread Brendan Higgins
Add KUnit to root Kconfig and Makefile allowing it to actually be built. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Masahiro reported a number of issues here on the previous revision; however, all of the

[PATCH v3 01/18] kunit: test: add KUnit test runner core

2019-05-13 Thread Brendan Higgins
them test_modules). Just define test cases and how to execute them for now; setting expectations on code will be defined later. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Converted KUnit core to print test

[PATCH v3 00/18] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Brendan Higgins
## TLDR I mostly wanted to incorporate feedback I got over the last week and a half. Biggest things to look out for: - KUnit core now outputs results in TAP14. - Heavily reworked tools/testing/kunit/kunit.py - Changed how parsing works. - Added testing. - Greg, Logan, you might want to re-

Re: [PATCH v2 0/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-09 Thread Brendan Higgins
On Wed, Aug 9, 2017 at 7:26 PM, Corey Minyard wrote: > On 08/09/2017 08:04 PM, Brendan Higgins wrote: >>> >>> Perhaps that is some level of abuse, but it's pretty common. I'm not >>> against it. >>> >>> There is standard IPMI firmware

Re: [PATCH v1 0/3] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-09 Thread Brendan Higgins
On Wed, Aug 9, 2017 at 3:56 AM, Anton D. Kachalov wrote: > Hello, > > I would like to mention one of the our related work for IPMI and I2C. > > We use OpenIPMI stack to connect to the computing nodes through the I2C > using IPMB (BT is not supported by nodes): > > https://github.com/ya-mouse/meta-

Re: [PATCH v2 0/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-09 Thread Brendan Higgins
> Perhaps that is some level of abuse, but it's pretty common. I'm not > against it. > > There is standard IPMI firmware NetFN (though no commands defined) that if > you use > the driver automatically goes into "Maintenance mode" and modified the > timeouts > and handling to some extent to help wi

Re: [PATCH v2 0/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-07 Thread Brendan Higgins
On Sat, Aug 5, 2017 at 3:23 PM, Corey Minyard wrote: > On 08/04/2017 08:18 PM, Brendan Higgins wrote: >> >> This patchset introduces IPMI Block Transfer over I2C (BT-I2C), which has >> the >> same semantics as IPMI Block Transfer except it done over I2C. >> &

[PATCH v2 1/4] ipmi: bt-i2c: added documentation for bt-i2c drivers

2017-08-04 Thread Brendan Higgins
Added device tree binding documentation for ipmi-bt-i2c (host) and ipmi-bmc-bt-i2c (BMC) and documentation for the Block Transfer over I2C (bt-i2c) protocol. Signed-off-by: Brendan Higgins --- Changes for v2: - Fixed a typo - Reworded a sentence to make it clear that I was talking about

[PATCH v2 3/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C BMC side

2017-08-04 Thread Brendan Higgins
same BMC side file system interface as "ipmi-bt-host". Signed-off-by: Brendan Higgins --- Changes for v2: - None --- drivers/char/Kconfig| 1 + drivers/char/Makefile | 1 + drivers/char/ipmi_bmc/Kconfig | 22 ++ drivers/char/ipmi_bm

[PATCH v2 0/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-04 Thread Brendan Higgins
This patchset introduces IPMI Block Transfer over I2C (BT-I2C), which has the same semantics as IPMI Block Transfer except it done over I2C. For the OpenBMC people, this is based on an RFC: https://lists.ozlabs.org/pipermail/openbmc/2016-September/004505.html The documentation discusses the reaso

[PATCH v2 2/4] ipmi: bt-i2c: added IPMI Block Transfer over I2C host side

2017-08-04 Thread Brendan Higgins
t i2c_device_id ipmi_bt_i2c_i2c_id[] = { + {"ipmi-bt-i2c", 0}, + {}, +}; +MODULE_DEVICE_TABLE(i2c, ipmi_bt_i2c_i2c_id); + +static struct i2c_driver ipmi_bt_i2c_driver = { + .driver = { + .name = "ipmi-bt-i2c", + .acpi_match_table = ipmi_bt_

[PATCH v2 4/4] ipmi: bt-bmc: move Aspeed IPMI BMC driver to ipmi_bmc

2017-08-04 Thread Brendan Higgins
From: Benjamin Fair The ipmi_bmc folder contains drivers for a BMC to communicate using IPMI. The ipmi folder is only for drivers on the host side using the OpenIPMI framework. Signed-off-by: Benjamin Fair Signed-off-by: Brendan Higgins --- Added in v2: --- drivers/char/ipmi/Kconfig

Re: [PATCH v1 0/3] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-04 Thread Brendan Higgins
On Fri, Aug 4, 2017 at 4:18 PM, Brendan Higgins wrote: > This patchset introduces IPMI Block Transfer over I2C (BT-I2C), which has the > same semantics as IPMI Block Transfer except it done over I2C. > > The documentation discusses the reason for this in greater detail, suffice it

[PATCH v1 1/3] ipmi: bt-i2c: added documentation for bt-i2c drivers

2017-08-04 Thread Brendan Higgins
Added device tree binding documentation for ipmi-bt-i2c (host) and ipmi-bmc-bt-i2c (BMC) and documentation for the Block Transfer over I2C (bt-i2c) protocol. Signed-off-by: Brendan Higgins --- Documentation/bt-i2c.txt | 121 + .../devicetree

[PATCH v1 0/3] ipmi: bt-i2c: added IPMI Block Transfer over I2C

2017-08-04 Thread Brendan Higgins
This patchset introduces IPMI Block Transfer over I2C (BT-I2C), which has the same semantics as IPMI Block Transfer except it done over I2C. The documentation discusses the reason for this in greater detail, suffice it to say SSIF cannot be correctly implemented on some naive I2C devices. There ar

[PATCH v1 2/3] ipmi: bt-i2c: added IPMI Block Transfer over I2C host side

2017-08-04 Thread Brendan Higgins
bt_i2c_i2c_id[] = { + {"ipmi-bt-i2c", 0}, + {}, +}; +MODULE_DEVICE_TABLE(i2c, ipmi_bt_i2c_i2c_id); + +static struct i2c_driver ipmi_bt_i2c_driver = { + .driver = { + .name = "ipmi-bt-i2c", + .acpi_match_table = ipmi_bt_i2c_acpi_id, + },

[PATCH v1 3/3] ipmi: bt-i2c: added IPMI Block Transfer over I2C BMC side

2017-08-04 Thread Brendan Higgins
same BMC side file system interface as "ipmi-bt-host". Signed-off-by: Brendan Higgins --- drivers/char/Kconfig| 1 + drivers/char/Makefile | 1 + drivers/char/ipmi_bmc/Kconfig | 22 ++ drivers/char/ipmi_bmc/Makefile | 5 + dr