Re: [PATCH 02/17] Documentation/driver-api: firmware/built-in-fw: drop doubled word

2020-07-06 Thread Luis Chamberlain
On Fri, Jul 03, 2020 at 08:44:47PM -0700, Randy Dunlap wrote: > Drop the doubled word "for". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: Luis Chamberlain > Cc: Greg Kroah-Hartman For all the firmware pa

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

2019-07-05 Thread Luis Chamberlain
On Wed, Jul 03, 2019 at 05:36:15PM -0700, Brendan Higgins wrote: > 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 > Acked-by: Luis Chamberla

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

2019-07-05 Thread Luis Chamberlain
urii Zaikin > Signed-off-by: Brendan Higgins > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Logan Gunthorpe Acked-by: Luis Chamberlain Luis ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

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

2019-07-05 Thread Luis Chamberlain
On Wed, Jul 03, 2019 at 05:35:59PM -0700, Brendan Higgins wrote: > diff --git a/kunit/test.c b/kunit/test.c > index c030ba5a43e40..a70fbe449e922 100644 > --- a/kunit/test.c > +++ b/kunit/test.c > @@ -122,7 +122,8 @@ static void kunit_print_test_case_ok_not_ok(struct > kunit_case *test_case, > >

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

2019-07-05 Thread Luis Chamberlain
On Wed, Jul 03, 2019 at 05:35:58PM -0700, Brendan Higgins wrote: > +struct kunit { > + void *priv; > + > + /* private: internal use only. */ > + const char *name; /* Read only after initialization! */ > + bool success; /* Read only after test_case finishes! */ > +}; No lock

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

2019-07-02 Thread Luis Chamberlain
On Tue, Jul 02, 2019 at 10:52:50AM -0700, Brendan Higgins wrote: > On Wed, Jun 26, 2019 at 12:53 AM Brendan Higgins > wrote: > > > > On Tue, Jun 25, 2019 at 4:22 PM Luis Chamberlain wrote: > > > > > > On Mon, Jun 17, 2019 at 01:26:02AM -0700, Brendan Higgi

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

2019-06-28 Thread Luis Chamberlain
On Fri, Jun 28, 2019 at 01:01:54AM -0700, Brendan Higgins wrote: > On Wed, Jun 26, 2019 at 11:10 PM Luis Chamberlain wrote: > > > > On Wed, Jun 26, 2019 at 09:07:43PM -0700, Iurii Zaikin wrote: > > > On Tue, Jun 25, 2019 at 7:17 PM Luis Chamberlain > > &

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

2019-06-27 Thread Luis Chamberlain
On Wed, Jun 26, 2019 at 09:07:43PM -0700, Iurii Zaikin wrote: > On Tue, Jun 25, 2019 at 7:17 PM Luis Chamberlain wrote: > > > +static void sysctl_test_dointvec_table_maxlen_unset(struct kunit *test) > > > +{ > > > + struct ctl_table table = { > &

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

2019-06-26 Thread Luis Chamberlain
On Wed, Jun 26, 2019 at 01:02:55AM -0700, Brendan Higgins wrote: > On Tue, Jun 25, 2019 at 5:01 PM Luis Chamberlain wrote: > > > > On Mon, Jun 17, 2019 at 01:26:08AM -0700, Brendan Higgins wrote: > > > create mode 100644 > > > tools/testing/kunit/test_data/t

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

2019-06-26 Thread Luis Chamberlain
On Tue, Jun 25, 2019 at 11:41:47PM -0700, Brendan Higgins wrote: > On Tue, Jun 25, 2019 at 4:02 PM Luis Chamberlain wrote: > > > > On Tue, Jun 25, 2019 at 03:14:45PM -0700, Brendan Higgins wrote: > > > On Tue, Jun 25, 2019 at 2:44 PM Luis Chamberlain > > &g

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

2019-06-25 Thread Luis Chamberlain
On Tue, Jun 25, 2019 at 05:07:32PM -0700, Brendan Higgins wrote: > On Tue, Jun 25, 2019 at 3:33 PM Luis Chamberlain wrote: > > > > On Mon, Jun 17, 2019 at 01:25:56AM -0700, Brendan Higgins wrote: > > > +/** > > > + * module_test() - used to register a kunit_mod

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

2019-06-25 Thread Luis Chamberlain
On Wed, Jun 19, 2019 at 06:17:51PM -0700, Frank Rowand wrote: > It does not matter whether KUnit provides additional things, relative > to kselftest. The point I was making is that there appears to be > _some_ overlap between kselftest and KUnit, and if there is overlap > then it is worth

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

2019-06-25 Thread Luis Chamberlain
On Mon, Jun 17, 2019 at 01:26:12AM -0700, Brendan Higgins wrote: > 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. First, thanks for this work! My review

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

2019-06-25 Thread Luis Chamberlain
On Mon, Jun 17, 2019 at 01:26:08AM -0700, Brendan Higgins wrote: > create mode 100644 > tools/testing/kunit/test_data/test_is_test_passed-all_passed.log > create mode 100644 > tools/testing/kunit/test_data/test_is_test_passed-crash.log > create mode 100644 >

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

2019-06-25 Thread Luis Chamberlain
On Mon, Jun 17, 2019 at 01:26:02AM -0700, Brendan Higgins wrote: > diff --git a/kunit/example-test.c b/kunit/example-test.c > new file mode 100644 > index 0..f44b8ece488bb > --- /dev/null > +++ b/kunit/example-test.c <-- snip --> > +/* > + * This defines a suite or grouping of tests.

Re: [PATCH v5 06/18] kbuild: enable building KUnit

2019-06-25 Thread Luis Chamberlain
On Tue, Jun 25, 2019 at 03:41:29PM -0700, Brendan Higgins wrote: > On Tue, Jun 25, 2019 at 3:13 PM Luis Chamberlain wrote: > > > > On Mon, Jun 17, 2019 at 01:26:01AM -0700, Brendan Higgins wrote: > > > diff --git a/Kconfig b/Kconfig > > > index 48

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

2019-06-25 Thread Luis Chamberlain
On Tue, Jun 25, 2019 at 03:14:45PM -0700, Brendan Higgins wrote: > On Tue, Jun 25, 2019 at 2:44 PM Luis Chamberlain wrote: > > Since its a new architecture and since you seem to imply most tests > > don't require locking or even IRQs disabled, I think its worth to > >

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

2019-06-25 Thread Luis Chamberlain
On Mon, Jun 17, 2019 at 01:25:56AM -0700, Brendan Higgins wrote: > +/** > + * module_test() - used to register a kunit_module with KUnit. > + * @module: a statically allocated kunit_module. > + * > + * Registers @module with the test framework. See kunit_module for > more > + * information. >

Re: [PATCH v5 06/18] kbuild: enable building KUnit

2019-06-25 Thread Luis Chamberlain
On Mon, Jun 17, 2019 at 01:26:01AM -0700, Brendan Higgins wrote: > diff --git a/Kconfig b/Kconfig > index 48a80beab6853..10428501edb78 100644 > --- a/Kconfig > +++ b/Kconfig > @@ -30,3 +30,5 @@ source "crypto/Kconfig" > source "lib/Kconfig" > > source "lib/Kconfig.debug" > + > +source

Re: [RFC v3 14/19] Documentation: kunit: add documentation for KUnit

2019-02-14 Thread Luis Chamberlain
On Wed, Feb 13, 2019 at 04:17:13PM -0800, Brendan Higgins wrote: > On Wed, Feb 13, 2019 at 1:55 PM Kieran Bingham > wrote: > Oh, yep, you are right. Does that mean we should bother at all with a > defconfig? If one wanted a qemu enabled type of kernel and also for kuniut one could imply run:

Re: [driver-core PATCH v8 0/9] Add NUMA aware async_schedule calls

2018-12-10 Thread Luis Chamberlain
On Mon, Dec 10, 2018 at 03:25:04PM -0800, Alexander Duyck wrote: > On Mon, 2018-12-10 at 11:22 -0800, Luis Chamberlain wrote: > > On Wed, Dec 05, 2018 at 09:25:13AM -0800, Alexander Duyck wrote: > > > This patch set provides functionality that will help to improve

Re: [driver-core PATCH v8 0/9] Add NUMA aware async_schedule calls

2018-12-10 Thread Luis Chamberlain
On Wed, Dec 05, 2018 at 09:25:13AM -0800, Alexander Duyck wrote: > This patch set provides functionality that will help to improve the > locality of the async_schedule calls used to provide deferred > initialization. > > This patch set originally started out focused on just the one call to >

Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel

2018-12-04 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 03:50:48PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:44 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 11:36:28AM -0800, Brendan Higgins wrote: > > > The ultimate goal is to create minimal isolated test binaries;

Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel

2018-12-04 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 03:48:15PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 5:54 AM Kieran Bingham > wrote: > > > > Hi Brendan, > > > > Thanks again for this series! > > > > On 28/11/2018 19:36, Brendan Higgins wrote: > > > The ultimate goal is to create minimal isolated test

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-12-03 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 03:34:57PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:34 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > > > diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c &

Re: [RFC v3 07/19] kunit: test: add initial tests

2018-12-03 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 03:26:26PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:40 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 11:36:24AM -0800, Brendan Higgins wrote: > > > Add a test for string stream along with a simpler example. > >

Re: [RFC v3 03/19] kunit: test: add string_stream a std::stream like string builder

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 06:14:17PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:29 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 11:36:20AM -0800, Brendan Higgins wrote: > > > A number of test features need to do pretty complicated string pri

Re: [RFC v3 01/19] kunit: test: add KUnit test runner core

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 06:08:36PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:28 PM Luis Chamberlain wrote: > > > > > +static void kunit_run_case_internal(struct kunit *test, > > > +

Re: [RFC v3 01/19] kunit: test: add KUnit test runner core

2018-11-30 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:18AM -0800, Brendan Higgins wrote: > +int kunit_run_tests(struct kunit_module *module) > +{ > + bool all_passed = true, success; > + struct kunit_case *test_case; > + struct kunit test; > + int ret; > + > + ret = kunit_init_test(, module->name); >

Re: [RFC v3 01/19] kunit: test: add KUnit test runner core

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 05:51:11PM -0800, Brendan Higgins wrote: > On Thu, Nov 29, 2018 at 7:14 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 11:36:18AM -0800, Brendan Higgins wrote: > > > +#define module_test(module) \ > > > + static i

Re: [driver-core PATCH v7 4/9] driver core: Probe devices asynchronously instead of the driver

2018-11-30 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 04:32:26PM -0800, Alexander Duyck wrote: > Probe devices asynchronously instead of the driver. > +static void __driver_attach_async_helper(void *_dev, async_cookie_t cookie) > +{ > + struct device *dev = _dev; > + struct device_driver *drv; > + > +

Re: [driver-core PATCH v7 3/9] device core: Consolidate locking and unlocking of parent and device

2018-11-30 Thread Luis Chamberlain
: Rafael J. Wysocki > Signed-off-by: Alexander Duyck Reviewed-by: Luis Chamberlain Luis > --- > drivers/base/base.h |2 + > drivers/base/bus.c | 23 ++--- > drivers/base/dd.c | 91 > --- > 3 files chan

Re: [driver-core PATCH v7 2/9] driver core: Establish clear order of operations for deferred probe and remove

2018-11-30 Thread Luis Chamberlain
ch the driver later when we > finally complete the deferred asynchronous probe call. > > Reviewed-by: Bart Van Assche > Signed-off-by: Alexander Duyck Reviewed-by: Luis Chamberlain This is the sort of corner case that is best if we had a test case for it, as it is hard to reproduce

Re: [driver-core PATCH v7 1/9] driver core: Move async_synchronize_full call

2018-11-30 Thread Luis Chamberlain
ivers") > Reviewed-by: Bart Van Assche > Reviewed-by: Dan Williams > Signed-off-by: Alexander Duyck Reviewed-by: Luis Chamberlain Luis > --- > drivers/base/dd.c |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/base/dd.c b/d

Re: [RFC v3 06/19] arch: um: enable running kunit from User Mode Linux

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 08:05:34AM -0600, Rob Herring wrote: > On Thu, Nov 29, 2018 at 9:37 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 03:26:03PM -0600, Rob Herring wrote: > > > On Wed, Nov 28, 2018 at 1:37 PM Brendan Higgins > > > wrote: &g

Re: [RFC v3 16/19] arch: um: make UML unflatten device tree when testing

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:33AM -0800, Brendan Higgins wrote: > Make UML unflatten any present device trees when running KUnit tests. > > Signed-off-by: Brendan Higgins > --- > arch/um/kernel/um_arch.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/um/kernel/um_arch.c

Re: [RFC v3 14/19] Documentation: kunit: add documentation for KUnit

2018-11-29 Thread Luis Chamberlain
On Thu, Nov 29, 2018 at 01:56:37PM +, Kieran Bingham wrote: > Hi Brendan, > > Please excuse the top posting, but I'm replying here as I'm following > the section "Creating a kunitconfig" in Documentation/kunit/start.rst. > > Could the three line kunitconfig file live under say >

Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:28AM -0800, Brendan Higgins wrote: > The ultimate goal is to create minimal isolated test binaries; in the > meantime we are using UML to provide the infrastructure to run tests, so > define an abstract way to configure and run tests that allow us to > change the

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > +static void segv_run_catcher(jmp_buf *catcher, void *fault_addr) > +{ > + current->thread.fault_addr = fault_addr; > + UML_LONGJMP(catcher, 1); > +} Some documentation about what this does exactly would be appreciated.

Re: [RFC v3 07/19] kunit: test: add initial tests

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:24AM -0800, Brendan Higgins wrote: > Add a test for string stream along with a simpler example. > > Signed-off-by: Brendan Higgins > --- > kunit/Kconfig | 12 ++ > kunit/Makefile | 4 ++ > kunit/example-test.c | 88

Re: [RFC v3 06/19] arch: um: enable running kunit from User Mode Linux

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 03:26:03PM -0600, Rob Herring wrote: > On Wed, Nov 28, 2018 at 1:37 PM Brendan Higgins > wrote: > > > > Make minimum number of changes outside of the KUnit directories for > > KUnit to build and run using UML. > > There's nothing in this patch limiting this to UML. Not

Re: [RFC v3 08/19] arch: um: add shim to trap to allow installing a fault catcher for tests

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:25AM -0800, Brendan Higgins wrote: > diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c > index cced829460427..bf90e678b3d71 100644 > --- a/arch/um/kernel/trap.c > +++ b/arch/um/kernel/trap.c > @@ -201,6 +201,12 @@ void segv_handler(int sig, struct siginfo

Re: [RFC v3 06/19] arch: um: enable running kunit from User Mode Linux

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:23AM -0800, Brendan Higgins wrote: > Make minimum number of changes outside of the KUnit directories for > KUnit to build and run using UML. > > Signed-off-by: Brendan Higgins > --- > Kconfig | 2 ++ > Makefile | 2 +- > 2 files changed, 3 insertions(+), 1

Re: [RFC v3 03/19] kunit: test: add string_stream a std::stream like string builder

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:20AM -0800, Brendan Higgins wrote: > 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

Re: [RFC v3 01/19] kunit: test: add KUnit test runner core

2018-11-29 Thread Luis Chamberlain
> +static void kunit_run_case_internal(struct kunit *test, > + struct kunit_module *module, > + struct kunit_case *test_case) > +{ > + int ret; > + > + if (module->init) { > + ret = module->init(test); > +

Re: [RFC v3 01/19] kunit: test: add KUnit test runner core

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 11:36:18AM -0800, Brendan Higgins wrote: > +#define module_test(module) \ > + static int module_kunit_init##module(void) \ > + { \ > + return kunit_run_tests(); \ > + } \ > +

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

2018-11-29 Thread Luis Chamberlain
On Wed, Nov 28, 2018 at 01:50:01PM -0700, shuah wrote: > On 11/28/18 12:54 PM, Knut Omang wrote: > > On Mon, 2018-11-26 at 17:41 -0800, Brendan Higgins wrote: > > Both approaches provide assertion macros for running tests inside the > > kernel, > > I doubt the kernel community would like to see