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

2019-10-07 Thread shuah
eating myself Let's work on top of - it is rebased to 5.4-rc1 and ready for use. https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=test Let's use that for kunit work for 5.5. I won't add any kselftest patches to it and keep it dedicated for kunit work. When tests ar

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

2019-10-07 Thread shuah
ial thought. However, it makes perfect sense to add a couple of tests in. We have a few weeks anyway and it gives us more confidence on kunit. I already have a branch that is in linux-next and it just has kunit in it and I will rebase it to 5.4-rc1. https://git.kernel.org/pub/scm/linux/kernel/git/shuah/lin

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

2019-10-04 Thread shuah
On 10/4/19 6:33 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 4:57 PM shuah wrote: On 10/4/19 5:52 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 4:30 PM Theodore Y. Ts'o wrote: On Fri, Oct 04, 2019 at 04:47:09PM -0600, shuah wrote: However, if I encourage arbitrary tests

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

2019-10-04 Thread shuah
On 10/4/19 5:52 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 4:30 PM Theodore Y. Ts'o wrote: On Fri, Oct 04, 2019 at 04:47:09PM -0600, shuah wrote: However, if I encourage arbitrary tests/improvements into my KUnit branch, it further diverges away from torvalds/master, and is more

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

2019-10-04 Thread shuah
On 10/4/19 5:10 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 3:47 PM shuah wrote: On 10/4/19 4:27 PM, Brendan Higgins wrote: On Fri, Oct 04, 2019 at 03:59:10PM -0600, shuah wrote: On 10/4/19 3:42 PM, Linus Torvalds wrote: On Fri, Oct 4, 2019 at 2:39 PM Theodore Y. Ts'o wrote

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

2019-10-04 Thread shuah
On 10/4/19 4:27 PM, Brendan Higgins wrote: On Fri, Oct 04, 2019 at 03:59:10PM -0600, shuah wrote: On 10/4/19 3:42 PM, Linus Torvalds wrote: On Fri, Oct 4, 2019 at 2:39 PM Theodore Y. Ts'o wrote: This question is primarily directed at Shuah and Linus What's the current status

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

2019-10-04 Thread shuah
On 10/4/19 3:42 PM, Linus Torvalds wrote: On Fri, Oct 4, 2019 at 2:39 PM Theodore Y. Ts'o wrote: This question is primarily directed at Shuah and Linus What's the current status of the kunit series now that Brendan has moved it out of the top-level kunit directory as Linus has requested

Re: [PATCH v18 15/19] Documentation: kunit: add documentation for KUnit

2019-09-23 Thread shuah
apply. Hope you are okay with that Randy! thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

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

2019-08-24 Thread shuah
On 8/23/19 7:34 PM, Brendan Higgins wrote: ## TL;DR This revision addresses comments from Shuah by fixing a couple checkpatch warnings and fixing some comment readability issues. No API or major structual changes have been made since v13. ## Background This patch set proposes KUnit

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

2019-08-23 Thread shuah
On 8/23/19 1:20 PM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 12:04 PM shuah wrote: On 8/23/19 12:56 PM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 11:32 AM shuah wrote: On 8/23/19 11:54 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:34 AM shuah wrote: On 8/23/19 11:27

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

2019-08-23 Thread shuah
On 8/23/19 12:56 PM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 11:32 AM shuah wrote: On 8/23/19 11:54 AM, Brendan Higgins wrote: 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

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

2019-08-23 Thread shuah
On 8/23/19 11:54 AM, Brendan Higgins wrote: 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: Hi Brendan

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

2019-08-23 Thread shuah
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: Hi Brendan, On 8/20/19 5:20 PM, Brendan Higgins wrote: Add core facilities for defining unit tests

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

2019-08-23 Thread shuah
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 for aborting/bailing out of test cases, which is needed for implementing assertions. An assertion is like an expectation, but bails

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

2019-08-23 Thread shuah
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 facilities for defining unit tests; this provides a common way to define test cases, functions that execute code which is under test

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

2019-08-23 Thread shuah
I recall discussion on this. What's the point in keeping thie BUG() around when it doesn't even reach? It can even be a WARN_ON() in that case right? thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listi

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

2019-08-23 Thread shuah
. + * + * Example: Can you fix these line continuations. It makes it very hard to read. Sorry for this late comment. These comments lines are longer than 80 and wrap. There are several comment lines in the file that are way too long. thanks, -- Shuah

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

2019-08-20 Thread shuah
On 8/20/19 5:23 PM, Brendan Higgins wrote: On Tue, Aug 20, 2019 at 2:26 PM Brendan Higgins wrote: On Tue, Aug 20, 2019 at 12:08 PM shuah wrote: On 8/20/19 12:24 PM, Brendan Higgins wrote: On Tue, Aug 20, 2019 at 11:24:45AM -0600, shuah wrote: On 8/13/19 11:50 PM, Brendan Higgins wrote

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

2019-08-20 Thread shuah
On 8/20/19 12:24 PM, Brendan Higgins wrote: On Tue, Aug 20, 2019 at 11:24:45AM -0600, shuah wrote: On 8/13/19 11:50 PM, Brendan Higgins wrote: ## 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

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

2019-08-20 Thread shuah
changes from here on out. Hi Brendan, I found checkpatch errors in one or two patches. Can you fix those and send v14. thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

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

2019-07-09 Thread shuah
:Luis Chamberlain L:linux-ker...@vger.kernel.org Thanks Brendan. I am good with this. I can take KUnit patches through kselftest with your Ack. thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman

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

2019-06-21 Thread shuah
On 6/21/19 12:13 PM, Theodore Ts'o wrote: On Fri, Jun 21, 2019 at 08:59:48AM -0600, shuah wrote: ### But wait! Doesn't kselftest support in kernel testing?! I think I commented on this before. I agree with the statement that there is no overlap between Kselftest and KUnit. I would like

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

2019-06-21 Thread shuah
a Kselftest test module on my laptop and running tests, but I wouldn't use KUnit the same way. Again, this is not a competition between which is better. Kselftest and KUnit serve different needs and problem spaces. Please redo this documentation to reflect that. thanks, -- Shuah

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

2019-05-07 Thread shuah
On 5/7/19 2:01 AM, Greg KH wrote: On Mon, May 06, 2019 at 08:14:12PM -0700, Frank Rowand wrote: On 5/1/19 4:01 PM, Brendan Higgins wrote: ## TLDR I rebased the last patchset on 5.1-rc7 in hopes that we can get this in 5.2. Shuah, I think you, Greg KH, and myself talked off thread, and we

Re: [PATCH v2 15/17] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-03 Thread shuah
/kunit-docs/third_party/kernel/docs/ +S: Maintained +F: Documentation/kunit/ +F: include/kunit/ +F: kunit/ +F: tools/testing/kunit/ + Please add kselftest mailing list to this entry, based on our conversation on taking these patches through kselftest tree. thanks, -- Shuah

Re: [PATCH v2 11/17] kunit: test: add test managed resource tests

2019-05-03 Thread shuah
. thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

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

2019-05-02 Thread shuah
it *test, const char *name) { spin_lock_init(>lock); INIT_LIST_HEAD(>resources); test->name = name; test->vprintk = kunit_vprintk; + test->fail = kunit_fail; return 0; } thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [PATCH v2 03/17] kunit: test: add string_stream a std::stream like string builder

2019-05-02 Thread shuah
return stream; +} + +void string_stream_get(struct string_stream *stream) +{ + kref_get(>refcount); +} + +int string_stream_put(struct string_stream *stream) +{ + return kref_put(>refcount, _stream_destroy); +} + thanks, -- Shuah ___ Linux-nv

Re: [PATCH v2 07/17] kunit: test: add initial tests

2019-05-02 Thread shuah
On 5/1/19 5:01 PM, 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: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-02 Thread shuah
this Sunday. Shuah, I think you, Greg KH, and myself talked off thread, and we agreed we would merge through your tree when the time came? Am I remembering correctly? No objection from me. Yes. I can take these through kselftest tree when the time comes. Agree with Greg that 5.2 might be rushing

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

2018-11-28 Thread shuah
developers contribute tests as part of their kernel work-flow. Maintaining tests and framework separately will make it harder to maintain them and keep them updated for us the kernel community. thanks, -- Shuah ___ Linux-nvdimm mailing list Linux-nvdimm

Re: [RFC v2 01/14] kunit: test: add KUnit test runner core

2018-11-07 Thread Shuah Khan
On 11/06/2018 06:28 PM, Brendan Higgins wrote: > On Fri, Nov 2, 2018 at 11:44 AM Shuah Khan wrote: >> >> On 10/23/2018 05:57 PM, Brendan Higgins wrote: > >>> + * Example: >>> + * >>> + * .. code-block:: c >>&g

Re: [RFC v2 01/14] kunit: test: add KUnit test runner core

2018-11-02 Thread Shuah Khan
INT_MIN)); > + * } > + * > + * static struct test_case example_test_cases[] = { > + * TEST_CASE(add_test_basic), > + * {}, > + * }; > + * > + */ > +struct test_case { > + void (*run_case)(struct test *tes

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

2018-11-02 Thread Shuah Khan
roblems: ./tools/testing/kunit/kunit.py usage: kunit.py [-h] {run,new} ... Helps writing and running KUnit tests. positional arguments: {run,new} run Runs KUnit tests. new Prints out boilerplate for writing new tests. optional arguments: -h, --help show this help mes

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

2018-10-25 Thread Shuah Khan
tps://kunit-review.googlesource.com/c/linux/+/1132), >as suggested by Rob. > - Cleaned up some of the commit messages and tweaked commit order a >bit based on suggestions. > I am a bit behind on reviewing this patch series. Just a quick note that I will start looking at these earl