Re: [PATCH v4] Documentation: kunit: add tips for running KUnit

2021-04-15 Thread Brendan Higgins
TODOs for > brendanhigg...@google.com who tracked down the runtime issue in GCC. > To be clear: these are not issues specific to KUnit, but rather to UML. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Reviewed-by: Brendan Higgins

Re: [PATCH v4 1/3] kunit: make test->lock irq safe

2021-04-13 Thread Brendan Higgins
ks and lockdep splats. > > This patch therefore changes the test->lock usage to spin_lock_irqsave() > and spin_unlock_irqrestore(). > > Signed-off-by: Vlastimil Babka > Signed-off-by: Oliver Glitta Reviewed-by: Brendan Higgins Thanks!

Re: [PATCH] Documentation: dev-tools: Add Testing Overview

2021-04-12 Thread Brendan Higgins
On Mon, Apr 12, 2021 at 3:43 AM Marco Elver wrote: > > On Sat, 10 Apr 2021 at 13:53, Daniel Latypov wrote: > > On Sat, Apr 10, 2021 at 12:05 AM David Gow wrote: > [...] > > > + > > > + > > > +Sanitizers > > > +== > > > + > > The "sanitizers" have originally been a group of tools that

Re: [PATCH] Documentation: dev-tools: Add Testing Overview

2021-04-12 Thread Brendan Higgins
On Sat, Apr 10, 2021 at 12:05 AM David Gow wrote: > > The kernel now has a number of testing and debugging tools, and we've > seen a bit of confusion about what the differences between them are. > > Add a basic documentation outlining the testing tools, when to use each, > and how they interact.

Re: [PATCH] Documentation: kunit: add tips for running KUnit

2021-04-12 Thread Brendan Higgins
On Mon, Apr 12, 2021 at 10:27 AM Daniel Latypov wrote: > > hOn Fri, Apr 9, 2021 at 9:10 PM David Gow wrote: > > > > Thanks for writing this: it's good to have these things documented at last! > > > > There are definitely a few things this document points out which still > > need deciding, which

Re: [PATCH v3 1/2] kunit: add a KUnit test for SLUB debugging functionality

2021-04-09 Thread Brendan Higgins
On Thu, Apr 8, 2021 at 10:19 AM Daniel Latypov wrote: > > On Thu, Apr 8, 2021 at 3:30 AM Marco Elver wrote: > > > > On Tue, 6 Apr 2021 at 12:57, Vlastimil Babka wrote: > > > > > > > > > On 4/1/21 11:24 PM, Marco Elver wrote: > > > > On Thu, 1 Apr 2021 at 21:04, Daniel Latypov wrote: > > > >> >

Re: [PATCH] Documentation: kunit: add tips for using current->kunit_test

2021-04-07 Thread Brendan Higgins
API docs and leave filling in the blanks as an exercise to > the reader. > > Also give an example of kunit_fail_current_test(). > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [PATCH] kunit: fix -Wunused-function warning for __kunit_fail_current_test

2021-04-06 Thread Brendan Higgins
> Signed-off-by: Daniel Latypov > Fixes: 359a376081d4 ("kunit: support failure from dynamic analysis tools") Reviewed-by: Brendan Higgins

Re: [PATCH v3 1/2] kunit: add a KUnit test for SLUB debugging functionality

2021-04-02 Thread Brendan Higgins
On Thu, Apr 1, 2021 at 12:04 PM 'Daniel Latypov' via KUnit Development wrote: > > On Thu, Apr 1, 2021 at 2:16 AM 'Marco Elver' via KUnit Development > wrote: [...] > > #else > > static inline bool slab_add_kunit_errors(void) { return false; } > > #endif > > > > And

Re: [PATCH] kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals

2021-04-02 Thread Brendan Higgins
FAIL("msg") exists) > > In that case, you'd get: > > Expected "hello" == "world", but > > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [PATCH] kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment

2021-04-02 Thread Brendan Higgins
sting/kunit/kunit.py run --kunitconfig=fs/ext4 > > Also add in such a fragment for kunit itself so we can give that as an > example more close to home (and thus less likely to be accidentally > broken). > > [1] https://lore.kernel.org/linux-ext4/ycnf4yp1db97z...@mit.edu/ > > Sign

Re: [PATCH v4 1/2] kunit: support failure from dynamic analysis tools

2021-04-02 Thread Brendan Higgins
> [15:19:34] [FAILED] example_simple_test > [15:19:34] # example_simple_test: initializing > [15:19:34] # example_simple_test: lib/kunit/kunit-example-test.c:24: > message > [15:19:34] not ok 1 - example_simple_test > > Co-developed-by: Daniel Latypov > Signed-off-by: Daniel Latypov > Signed-off-by: Uriel Guajardo > Reviewed-by: Alan Maguire Reviewed-by: Brendan Higgins

Re: [PATCH 4/6] um: split up CONFIG_GCOV

2021-03-18 Thread Brendan Higgins
On Fri, Mar 12, 2021 at 1:56 AM Johannes Berg wrote: > > From: Johannes Berg > > It's not always desirable to collect coverage data for the > entire kernel, so split off CONFIG_GCOV_BASE. This option > only enables linking with coverage options, and compiles a > single file (reboot.c) with them

Re: [PATCH v2] kunit: fix checkpatch warning

2021-03-03 Thread Brendan Higgins
you can see in this example [2] (note that everything after "Signed-off-by: David Gow \n ---" and before "tools/testing/kunit/configs/broken_on_uml.config | 2 ++" is discarded by git am). Anyway, aside from these minor points of LKML best practices, this patch still lo

Re: [PATCH] kunit: tool: Fix a python tuple typing error

2021-02-26 Thread Brendan Higgins
es 97752c39bd ("kunit: kunit_tool: Allow .kunitconfig to disable config > items") > Signed-off-by: David Gow Acked-by: Brendan Higgins

Re: [PATCH] kunit: fix checkpatch warning

2021-02-26 Thread Brendan Higgins
On Fri, Feb 26, 2021 at 12:54 PM Lucas Pires Stankus wrote: > > Tidy up code by fixing the following checkpatch warnings: > CHECK: Alignment should match open parenthesis > CHECK: Lines should not end with a '(' > > Signed-off-by: Lucas Stankus Reviewed-by: Brendan Higgins Thanks!

Re: [PATCH] kunit: tool: Disable PAGE_POISONING under --alltests

2021-02-26 Thread Brendan Higgins
n actually run. > > Fixes: f289041ed4 ("mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO") > Signed-off-by: David Gow Reviewed-by: Brendan Higgins

Re: [PATCH v3 1/2] kunit: support failure from dynamic analysis tools

2021-02-11 Thread Brendan Higgins
On Thu, Feb 11, 2021 at 12:58 PM Daniel Latypov wrote: > > On Thu, Feb 11, 2021 at 7:40 AM Alan Maguire wrote: > > > > On Thu, 11 Feb 2021, David Gow wrote: > > > > > On Wed, Feb 10, 2021 at 6:14 AM Daniel Latypov > > > wrote: > > > > > > > > From: Uriel Guajardo > > > > > > > > Add a

Re: [PATCH v4 0/3] kunit: support running subsets of test suites from kunit.py

2021-02-08 Thread Brendan Higgins
needed to plumb in this suite name glob. > > [1] > https://lore.kernel.org/linux-kselftest/20210201205514.3943096-1-dlaty...@google.com/ Tested-by: Brendan Higgins

Re: [PATCH] Documentation: kunit: add tips.rst for small examples

2021-02-05 Thread Brendan Higgins
age.rst is more of optional further reading. > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [PATCH v2] kunit: make kunit_tool accept optional path to .kunitconfig fragment

2021-02-05 Thread Brendan Higgins
people could create a separate > directory if wanted; this patch imposes no restrictions on the path). > > Signed-off-by: Daniel Latypov Tested-by: Brendan Higgins

Re: [PATCH v3 0/3] kunit: support running subsets of test suites from kunit.py

2021-02-05 Thread Brendan Higgins
On Thu, Feb 4, 2021 at 2:54 PM Daniel Latypov wrote: > > When using `kunit.py run` to run tests, users must populate a > `kunitconfig` file to select the options the tests are hidden behind and > all their dependencies. > > The patch [1] to allow specifying a path to kunitconfig promises to make

Re: [PATCH] KUnit: Docs: make start.rst example Kconfig follow style.rst

2021-02-05 Thread Brendan Higgins
On Tue, Jan 19, 2021 at 3:52 PM Daniel Latypov wrote: > > The primary change is that we want to encourage people to respect > KUNIT_ALL_TESTS to make it easy to run all the relevant tests for a > given config. > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [PATCH] kunit: tool: simplify kconfig is_subset_of() logic

2021-02-05 Thread Brendan Higgins
from the > list for _every_ outer iteration. > > Signed-off-by: Daniel Latypov Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH] kunit: Print test statistics on failure

2021-02-05 Thread Brendan Higgins
On Thu, Dec 10, 2020 at 11:23 PM David Gow wrote: > > When a number of tests fail, it can be useful to get higher-level > statistics of how many tests are failing (or how many parameters are > failing in parameterised tests), and in what cases or suites. This is > already done by some non-KUnit

Re: [PATCH v2 3/3] kunit: tool: fix unintentional statefulness in run_kernel()

2021-02-04 Thread Brendan Higgins
: tool: add Python wrappers for running KUnit > tests") > Signed-off-by: Daniel Latypov Whoah, nice catch! I didn't even know that was a thing! Reviewed-by: Brendan Higgins

Re: [PATCH v2 2/3] kunit: tool: add support for filtering suites by glob

2021-02-04 Thread Brendan Higgins
s the "kunit_filter.glob" commandline option to the UML > kernel, which currently only supports filtering by suite name. > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [PATCH v2 1/3] kunit: add kunit.filter_glob cmdline option to filter suites

2021-02-04 Thread Brendan Higgins
of Kconfig entries to select > specific suites. > So even just doing this makes using kunit far less annoying. > > Signed-off-by: Daniel Latypov One minor issue below, otherwise: Reviewed-by: Brendan Higgins > --- > lib/kunit/Kconfig| 1 + > lib/kunit/executor.c | 91

Re: [PATCH v2] kunit: make kunit_tool accept optional path to .kunitconfig fragment

2021-02-01 Thread Brendan Higgins
people could create a separate > directory if wanted; this patch imposes no restrictions on the path). > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [RFC 0/3] kunit vs structleak

2021-01-29 Thread Brendan Higgins
On Wed, Jan 27, 2021 at 12:15 PM Kees Cook wrote: > > On Mon, Jan 25, 2021 at 01:45:25PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > I ran into a couple of problems with kunit tests taking too much stack > > space, sometimes dangerously so. These the the three instances that > >

Re: [PATCH] kunit: don't show `1 == 1` in failed assertion messages

2021-01-29 Thread Brendan Higgins
iling "but" > > Expected 2 + 2 == 5, but > > > > It didn't feel worth adding a check up-front to see if both sides are > literals to handle this better. > > *A quick grep suggests 100+ comparisons to an integer literal as the > right hand side. > > Signed-off-by: Daniel Latypov I don't feel very strongly about this either way. In any case: Reviewed-by: Brendan Higgins

Re: [PATCH v4 1/3] kunit: tool: surface and address more typing issues

2021-01-14 Thread Brendan Higgins
iscover a number of new violations. > Exclude main() since we reuse `request` for the different types of > requests, which mypy isn't happy about. > > This commit fixes all but one error, where `TestSuite.status` might be > None. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH v4 2/3] kunit: tool: fix minor typing issue with None status

2021-01-14 Thread Brendan Higgins
e precedent in commit 3fc48259d525 ("kunit: Don't > fail test suites if one of them is empty"). > > Also slightly simplify the code and add type annotations. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [PATCH v4 3/3] kunit: tool: move kunitconfig parsing into __init__, make it optional

2021-01-14 Thread Brendan Higgins
> > Add an optional boolean that can be used to disable this for use cases > in the future where we might not need/want to load the config. > > Signed-off-by: Daniel Latypov > Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [PATCH v3 1/3] kunit: tool: surface and address more typing issues

2021-01-14 Thread Brendan Higgins
On Thu, Jan 7, 2021 at 3:48 PM Daniel Latypov wrote: > > The authors of this tool were more familiar with a different > type-checker, https://github.com/google/pytype. > > That's open source, but mypy seems more prevalent (and runs faster). > And unlike pytype, mypy doesn't try to infer types so

Re: [PATCH] kunit: tool: Fix spelling of "diagnostic" in kunit_parser

2021-01-14 Thread Brendan Higgins
On Fri, Dec 11, 2020 at 2:32 PM David Gow wrote: > > Various helper functions were misspelling "diagnostic" in their names. > It finally got annoying, so fix it. > > Signed-off-by: David Gow Tested-by: Brendan Higgins

Re: [PATCH] kunit: tool: Fix spelling of "diagnostic" in kunit_parser

2021-01-14 Thread Brendan Higgins
On Fri, Dec 11, 2020 at 2:32 PM David Gow wrote: > > Various helper functions were misspelling "diagnostic" in their names. > It finally got annoying, so fix it. > > Signed-off-by: David Gow Reviewed-by: Brendan Higgins

Re: [PATCH] Documentation: kunit: include example of a parameterized test

2021-01-14 Thread Brendan Higgins
de > guidance for testing many inputs") to show a minimal example of the new > feature. > > Signed-off-by: Daniel Latypov Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH v2 1/4] kunit: tool: fix unit test cleanup handling

2021-01-14 Thread Brendan Higgins
niel Latypov Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH v2 2/4] kunit: tool: stop using bare asserts in unit test

2021-01-14 Thread Brendan Higgins
ck of exception types. self.assertRaises does this. > * s/kall/call. There's no reason to name it this way. > * This is probably a misunderstanding from the docs which uses it > since `mock.call` is in scope as `call`. > > Signed-off-by: Daniel Latypov Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH v2 3/4] kunit: tool: use `with open()` in unit test

2021-01-14 Thread Brendan Higgins
side. > > Do so to make the code more Pythonic. > > Signed-off-by: Daniel Latypov Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH v2 4/4] minor: kunit: tool: fix unit test so it can run from non-root dir

2021-01-14 Thread Brendan Higgins
yg1wg0zddbtlosucob-gwmexlgvt...@mail.gmail.com/ > > Fixes: 5578d008d9e0 ("kunit: tool: fix running kunit_tool from outside kernel > tree") > Signed-off-by: Daniel Latypov Tested-by: Brendan Higgins Acked-by: Brendan Higgins

Re: [PATCH v3 3/3] kunit: tool: move kunitconfig parsing into __init__, make it optional

2021-01-11 Thread Brendan Higgins
> > Add an optional boolean that can be used to disable this for use cases > in the future where we might not need/want to load the config. > > Signed-off-by: Daniel Latypov Very nice! This makes the code much more readable! Reviewed-by: Brendan Higgins

Re: [PATCH v3 2/3] kunit: tool: fix minor typing issue with None status

2021-01-11 Thread Brendan Higgins
e precedent in commit 3fc48259d525 ("kunit: Don't > fail test suites if one of them is empty"). > > Also slightly simplify the code and add type annotations. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Reviewed-by: Brendan Higgins

Re: [PATCH v3 1/3] kunit: tool: surface and address more typing issues

2021-01-11 Thread Brendan Higgins
iscover a number of new violations. > Exclude main() since we reuse `request` for the different types of > requests, which mypy isn't happy about. > > This commit fixes all but one error, where `TestSuite.status` might be > None. > > Signed-off-by: Daniel Latypov > Reviewed-by: David Gow Acked-by: Brendan Higgins

Re: [PATCH] kunit: tool: Force the use of the 'tty' console for UML

2020-12-27 Thread Brendan Higgins
rg/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=757055ae8dedf5333af17b3b5b4b70ba9bc9da4e > > Signed-off-by: David Gow > Fixes: 757055ae8ded ("init/console: Use ttynull as a fallback when there is > no console") Acked-by: Brendan Higgins Thanks for taking care of this!

Re: [PATCH v8 1/2] kunit: Support for Parameterized Testing

2020-11-30 Thread Brendan Higgins
n be turned into subsubtest outputs. > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> > Co-developed-by: Marco Elver > Signed-off-by: Marco Elver Acked-by: Brendan Higgins

Re: [PATCH v9 1/2] kunit: Support for Parameterized Testing

2020-11-30 Thread Brendan Higgins
On Mon, Nov 23, 2020 at 11:25 PM David Gow wrote: > > On Mon, Nov 23, 2020 at 9:08 PM Marco Elver wrote: > > > > On Tue, 17 Nov 2020 at 08:21, David Gow wrote: > > > On Mon, Nov 16, 2020 at 1:41 PM Arpitha Raghunandan <98.a...@gmail.com> > > > wrote: > > > > > > > > Implementation of support

Re: [PATCH v2] Documentation: kunit: provide guidance for testing many inputs

2020-11-30 Thread Brendan Higgins
mentioned > elsewhere [1]) which are particularly useful in these situations. > > It is also criminally underused at the moment, only appearing in 2 > tests (both written by people involved in KUnit). > > [1] not even on > https://www.kernel.org/doc/html/latest/dev-tools/kunit/api/test.html > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins

Re: [PATCH] kunit: kunit_tool: Correctly parse diagnostic messages

2020-11-30 Thread Brendan Higgins
75.namprd13.prod.outlook.com/T/ > > Signed-off-by: David Gow Reviewed-by: Brendan Higgins

Re: [PATCH] Documentation: kunit: provide guidance for testing many inputs

2020-11-23 Thread Brendan Higgins
ode examples in the future? Anyway, like I said, I think this patch in and of itself looks pretty good. Reviewed-by: Brendan Higgins > --- > Documentation/dev-tools/kunit/usage.rst | 66 + > 1 file changed, 66 insertions(+) > > diff --git a/Documentation/dev-

Re: [RFC PATCH] bpf: preload: Fix build error when O= is set

2020-11-19 Thread Brendan Higgins
is off on UML or whether we do the fix you proposed here though. Nevertheless, I would like to see *some* fix go in before v5.10 is released. Reviewed-by: Brendan Higgins

[PATCH v1] kunit: tool: unmark test_data as binary blobs

2020-11-05 Thread Brendan Higgins
The tools/testing/kunit/test_data/ directory was marked as binary because some of the test_data files cause checkpatch warnings. Fix this by dropping the .gitattributes file. Fixes: afc63da64f1e ("kunit: kunit_parser: make parser more robust") Signed-off-by: Brendan Higgins --- too

Re: [PATCH] kunit: fix display of failed expectations for strings

2020-11-05 Thread Brendan Higgins
"bye" == 1625079500 > > After this patch: > Expected "hi" == "bye", but > "hi" == hi > "bye" == bye > > KUNIT_INIT_BINARY_STR_ASSERT_STRUCT() was written but just mistakenly > not actually used by KUNIT_EXPECT_STREQ() and friends. > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [PATCH v3] lib: Convert test_printf.c to KUnit

2020-11-03 Thread Brendan Higgins
On Tue, Nov 3, 2020 at 8:22 AM Greg KH wrote: > > On Tue, Nov 03, 2020 at 05:11:47PM +0100, Petr Mladek wrote: > > On Tue 2020-11-03 12:52:23, Greg KH wrote: > > > On Tue, Nov 03, 2020 at 01:33:53PM +0200, Andy Shevchenko wrote: > > > > On Tue, Nov 03, 2020 at 04:40:49PM +0530, Arpitha

Re: [RFC v2 00/12] kunit: introduce class mocking support.

2020-11-02 Thread Brendan Higgins
`struct kunit *` to mock init's to allow allocating ops structs. > * Update kunit-example-test.cc to do so as a more realistic example. > v1: > https://lore.kernel.org/linux-kselftest/20200918183114.2571146-1-dlaty...@google.com/ > --- > > Brendan Higgins (9): > kunit: test: a

Re: [PATCH] kunit: Fix kunit.py parse subcommand (use null build_dir)

2020-10-30 Thread Brendan Higgins
a6d1780d5bbfca0ce9b8104ca6233502fcbf86 > > Fixes: 21a6d1780d5bbfca0ce9b8104ca6233502fcbf86 ("kunit: tool: allow > generating test results in JSON") > Signed-off-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [PATCH 2/2] kunit: tool: Mark 'kunittest_config' as constant again

2020-10-26 Thread Brendan Higgins
On Sun, Oct 25, 2020 at 5:45 AM wrote: > > On Thu, Oct 22, 2020 at 08:35:26AM +0200, SeongJae Park wrote: > > On Wed, 21 Oct 2020 14:32:52 -0700 Brendan Higgins > > wrote: > > > > > On Mon, Oct 12, 2020 at 3:27 AM SeongJae Park wrote: &g

Re: [PATCH] ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it

2020-10-22 Thread Brendan Higgins
On Wed, Oct 21, 2020 at 3:36 PM Theodore Y. Ts'o wrote: > > On Wed, Oct 21, 2020 at 02:16:56PM -0700, Randy Dunlap wrote: > > On 10/21/20 2:15 PM, Brendan Higgins wrote: > > > On Tue, Oct 20, 2020 at 12:37 AM Geert Uytterhoeven > > > wrote: > > >> >

Re: [PATCH] lib: add basic KUnit test for lib/math

2020-10-22 Thread Brendan Higgins
On Thu, Oct 22, 2020 at 12:04 PM Andy Shevchenko wrote: > > On Thu, Oct 22, 2020 at 11:53:50AM -0700, Brendan Higgins wrote: > > On Thu, Oct 22, 2020 at 8:06 AM Andy Shevchenko > > wrote: > > > On Wed, Oct 21, 2020 at 10:47:50AM -0700, Daniel Latypov wrote: >

Re: [PATCH] lib: add basic KUnit test for lib/math

2020-10-22 Thread Brendan Higgins
On Thu, Oct 22, 2020 at 8:06 AM Andy Shevchenko wrote: > > On Wed, Oct 21, 2020 at 10:47:50AM -0700, Daniel Latypov wrote: > > On Tue, Oct 20, 2020 at 8:40 PM David Gow wrote: > > > On Tue, Oct 20, 2020 at 6:46 AM Daniel Latypov > > > wrote: > > > > > > > > Add basic test coverage for files

Re: [PATCH] lib: add basic KUnit test for lib/math

2020-10-22 Thread Brendan Higgins
On Thu, Oct 22, 2020 at 9:26 AM Daniel Latypov wrote: > > On Thu, Oct 22, 2020 at 8:06 AM Andy Shevchenko > wrote: > > > > On Wed, Oct 21, 2020 at 10:47:50AM -0700, Daniel Latypov wrote: > > > On Tue, Oct 20, 2020 at 8:40 PM David Gow wrote: > > > > On Tue, Oct 20, 2020 at 6:46 AM Daniel

Re: [PATCH] kunit: Fix kunit.py --raw_output option

2020-10-21 Thread Brendan Higgins
is > enabled), it was not printing anything. > > Fixes: 45ba7a893ad89114e773b3dc32f6431354c465d6 ("kunit: kunit_tool: > Separate out config/build/exec/parse") > Signed-off-by: David Gow Thanks for fixing this! Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [PATCH 2/2] kunit: tool: Mark 'kunittest_config' as constant again

2020-10-21 Thread Brendan Higgins
it d43c7fb05765 ("kunit: tool: fix improper treatment of file > location") > > Signed-off-by: SeongJae Park Reviewed-by: Brendan Higgins Thanks for this! This is something I meant to fix a while ago and forgot about. One minor issue, this patch does not apply on torvalds/master right now. Could you please rebase this?

Re: [PATCH] ext: EXT4_KUNIT_TESTS should depend on EXT4_FS instead of selecting it

2020-10-21 Thread Brendan Higgins
On Tue, Oct 20, 2020 at 12:37 AM Geert Uytterhoeven wrote: > > EXT4_KUNIT_TESTS selects EXT4_FS, thus enabling an optional feature the > user may not want to enable. Fix this by making the test depend on > EXT4_FS instead. > > Fixes: 1cbeab1b242d16fd ("ext4: add kunit test for decoding extended

Re: [PATCH v3 5/6] kunit: test: fix remaining kernel-doc warnings

2020-10-21 Thread Brendan Higgins
; > Fixes: aac35468ca20 ("kunit: test: create a single centralized executor for > all tests") > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins

Re: [PATCH] Documentation: kunit: Update Kconfig parts for KUNIT's module support

2020-10-21 Thread Brendan Higgins
or this. > > Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module") > Signed-off-by: SeongJae Park > Reviewed-by: David Gow Reviewed-by: Brendan Higgins

[PATCH v1] kunit: tools: fix kunit_tool tests for parsing test plans

2020-10-21 Thread Brendan Higgins
Some tests logs for kunit_tool tests are missing their test plans causing their tests to fail; fix this by adding the test plans. Fixes: 45dcbb6f5ef7 ("kunit: test: add test plan to KUnit TAP format") Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit_tool_test.py

[PATCH v1] i2c: aspeed: add KUnit tests for clock parameters

2020-10-16 Thread Brendan Higgins
Add KUnit tests for Aspeed I2C driver to test setting clock divider registers given an input clock speed. I wrote this test a while ago and it found a bug in the Aspeed I2C driver a couple years ago[1]. Link[1]: https://lore.kernel.org/patchwork/patch/989312/ Signed-off-by: Brendan Higgins

Re: [PATCH] lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE

2020-10-16 Thread Brendan Higgins
: kunit: add bitfield test conversion to KUnit") > Signed-off-by: Vitor Massaru Iha > Link: > https://lore.kernel.org/linux-next/20201015163056.56fcc...@canb.auug.org.au/ Reviewed-by: Brendan Higgins Thanks for taking care of this so quickly!

Re: [PATCH] lib: kunit: add test_min_heap test conversion to KUnit

2020-10-12 Thread Brendan Higgins
On Tue, Aug 4, 2020 at 9:22 AM Vitor Massaru Iha wrote: > > Hi Peter, > > On Tue, Aug 4, 2020 at 11:23 AM wrote: > > > > On Tue, Aug 04, 2020 at 10:46:21AM -0300, Vitor Massaru Iha wrote: > > > On Tue, Aug 4, 2020 at 10:25 AM wrote: > > > > On Wed, Jul 29, 2020 at 06:57:17PM -0300, Vitor

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

2020-10-12 Thread Brendan Higgins
On Mon, Oct 12, 2020 at 1:13 PM Brendan Higgins wrote: > > On Fri, Aug 21, 2020 at 5:19 AM Rasmus Villemoes > wrote: > > Sorry about the late reply. I saw activity on this before and thought > it was under control. I only saw the unresolved state now looking > through patc

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

2020-10-12 Thread Brendan Higgins
On Fri, Aug 21, 2020 at 03:28:49PM +0300, Andy Shevchenko wrote: > On Fri, Aug 21, 2020 at 01:37:10PM +0200, Petr Mladek wrote: > > On Mon 2020-08-17 09:06:32, Rasmus Villemoes wrote: > > > On 17/08/2020 06.30, Arpitha Raghunandan wrote: > > > > Converts test lib/test_printf.c to KUnit. > > > >

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

2020-10-12 Thread Brendan Higgins
On Fri, Aug 21, 2020 at 5:19 AM Rasmus Villemoes wrote: Sorry about the late reply. I saw activity on this before and thought it was under control. I only saw the unresolved state now looking through patchwork. > On 21/08/2020 13.37, Petr Mladek wrote: > > On Mon 2020-08-17 09:06:32, Rasmus

Re: [PATCH] lib: kunit: add bitfield test conversion to KUnit

2020-10-09 Thread Brendan Higgins
On Thu, Sep 17, 2020 at 3:00 AM Johannes Berg wrote: > > On Wed, 2020-08-19 at 14:10 -0700, Brendan Higgins wrote: > > On Wed, Jul 29, 2020 at 10:58 AM Vitor Massaru Iha > > wrote: > > > This adds the conversion of the runtime tests of test_bitfield, > > >

Re: [PATCH] kunit: tool: fix display of make errors

2020-09-30 Thread Brendan Higgins
n only concatenate str (not "OSError") to str > so fix this with an explicit cast to str. > > Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Cheers!

Re: [RFC v1 00/12] kunit: introduce class mocking support.

2020-09-28 Thread Brendan Higgins
On Tue, Sep 22, 2020 at 5:24 PM Daniel Latypov wrote: > > On Fri, Sep 18, 2020 at 11:31 AM Daniel Latypov wrote: > > > > # Background > > KUnit currently lacks any first-class support for mocking. > > For an overview and discussion on the pros and cons, see > >

[PATCH v1] kunit: tool: handle when .kunit exists but .kunitconfig does not

2020-09-28 Thread Brendan Higgins
5578d008d9e0 ("kunit: tool: fix running kunit_tool from outside kernel tree") Link: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?id=5578d008d9e06bb531fb3e62dd17096d9fd9c853 Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py | 12 --

[PATCH v1] kunit: tool: fix --alltests flag

2020-09-23 Thread Brendan Higgins
Alltests flag evidently stopped working when run from outside of the root of the source tree, so fix that. Also add an additional broken config to the broken_on_uml config. Signed-off-by: Brendan Higgins --- tools/testing/kunit/configs/broken_on_uml.config | 1 + tools/testing/kunit

Re: linux-next: Tree for Sep 2 (lib/ubsan.c)

2020-09-10 Thread Brendan Higgins
On Tue, Sep 8, 2020 at 5:55 PM Shuah Khan wrote: > > On 9/8/20 6:49 PM, Randy Dunlap wrote: > > On 9/8/20 5:46 PM, Stephen Rothwell wrote: > >> Hi Randy, > >> > >> On Tue, 8 Sep 2020 07:38:31 -0700 Randy Dunlap > >> wrote: > >>> &g

Re: [PATCH v3 3/5] i2c: aspeed: Mask IRQ status to relevant bits

2020-09-10 Thread Brendan Higgins
On Wed, Sep 9, 2020 at 1:31 PM Eddie James wrote: > > Mask the IRQ status to only the bits that the driver checks. This > prevents excessive driver warnings when operating in slave mode > when additional bits are set that the driver doesn't handle. > > Signed-off-by: Eddie James > Reviewed-by:

Re: linux-next: Tree for Sep 2 (lib/ubsan.c)

2020-09-04 Thread Brendan Higgins
On Thu, Sep 3, 2020 at 11:12 PM Randy Dunlap wrote: > > On 9/2/20 8:44 AM, Randy Dunlap wrote: > > On 9/2/20 1:09 AM, Stephen Rothwell wrote: > >> Hi all, > >> > >> Changes since 20200828: > >> > > > > > > on i386: > > > > ../lib/ubsan.c: In function ‘ubsan_prologue’: > > ../lib/ubsan.c:141:2:

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

2020-08-27 Thread Brendan Higgins
On Thu, Aug 27, 2020 at 11:28 AM Marco Elver wrote: > > On Thu, 27 Aug 2020 at 18:17, David Gow wrote: > [...] > > > First of all, thanks for the talk yesterday! I only looked at this > > > because somebody pasted the LKML link. :-) > > > > No worries! Clearly this document needed linking --

Re: [PATCH] lib: kunit: add list_sort test conversion to KUnit

2020-08-19 Thread Brendan Higgins
0996679f0998 kunit: kunit_config: Fix parsing of > CONFIG options with space > > Code Style Documentation: [0] > > Signed-off-by: Vitor Massaru Iha > Link: [0] > https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-david...@google.com/T/#u Reviewed-by: Brendan Higgi

Re: [PATCH] lib: kunit: add bitfield test conversion to KUnit

2020-08-19 Thread Brendan Higgins
0996679f0998 kunit: kunit_config: Fix parsing of > CONFIG options with space > > Code Style Documentation: [0] > > Signed-off-by: Vitor Massaru Iha > Link: [0] > https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-david...@google.com/T/#u Reviewed-by: Brendan Higgins Pro

Re: [PATCH v2] lib: Convert test_user_copy to KUnit test

2020-08-19 Thread Brendan Higgins
On Fri, Jul 17, 2020 at 5:51 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 Reviewed-by: Brendan Higgins Thanks!

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

2020-08-19 Thread Brendan Higgins
n you put these together in the same patch series as you had before? When I asked you to split the patch up, I was just asking about that specific patch within the series. I still think all the patches go together. As for this specific patch, I see one minor issue below; other than that, this looks goo

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

2020-08-18 Thread Brendan Higgins
On Tue, Aug 18, 2020 at 12:26 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

[PATCH v2 1/2] kunit: tool: fix running kunit_tool from outside kernel tree

2020-08-11 Thread Brendan Higgins
Currently kunit_tool does not work correctly when executed from a path outside of the kernel tree, so make sure that the current working directory is correct and the kunit_dir is properly initialized before running. Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py | 13

[PATCH v2 2/2] kunit: tool: allow generating test results in JSON

2020-08-11 Thread Brendan Higgins
#post Signed-off-by: Heidi Fahim Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py | 35 +++--- tools/testing/kunit/kunit_json.py | 63 ++ tools/testing/kunit/kunit_tool_test.py | 33 ++ 3 files changed, 125 insertions(+), 6

Re: [PATCH v1 2/2] kunit: tool: allow generating test results in JSON

2020-08-11 Thread Brendan Higgins
On Tue, Aug 11, 2020 at 12:56 PM Bird, Tim wrote: > > > > > -Original Message- > > From: Brendan Higgins > > Sent: Friday, August 7, 2020 7:17 PM > > > > From: Heidi Fahim > > > > Add a --json flag, which when specified when kunit_too

Re: [PATCH 2/2] kunit: ubsan integration

2020-08-10 Thread Brendan Higgins
eed to sign off on this. In the future, make sure to run get_maintainers.pl Reviewed-by: Brendan Higgins > --- > lib/ubsan.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/ubsan.c b/lib/ubsan.c > index cb9af3f6b77e..1460e2c828c8 100644 > --- a/lib/ubsan.c

Re: [PATCH 1/2] kunit: support failure from dynamic analysis tools

2020-08-10 Thread Brendan Higgins
.com/ > > Signed-off-by: Uriel Guajardo Reviewed-by: Brendan Higgins

Re: [PATCH] kunit: added lockdep support

2020-08-10 Thread Brendan Higgins
On Thu, Aug 6, 2020 at 1:43 PM Uriel Guajardo wrote: > > On Thu, Aug 6, 2020 at 3:37 PM Uriel Guajardo > wrote: > > > > From: Uriel Guajardo > > > > KUnit tests will now fail if lockdep detects an error during a test > > case. > > > > The idea comes from how lib/locking-selftest [1] checks for

Re: [PATCH] kunit: added lockdep support

2020-08-10 Thread Brendan Higgins
gt; > [1] > https://elixir.bootlin.com/linux/v5.7.12/source/lib/locking-selftest.c#L1137 > > [2] > https://lore.kernel.org/linux-kselftest/20200806174326.3577537-1-urielguajard...@gmail.com/ > > Signed-off-by: Uriel Guajardo Reviewed-by: Brendan Higgins

Re: [PATCH v1 1/2] kunit: tool: fix running kunit_tool from outside kernel tree

2020-08-08 Thread Brendan Higgins
On Fri, Aug 7, 2020 at 10:45 PM David Gow wrote: > > On Sat, Aug 8, 2020 at 9:17 AM Brendan Higgins > wrote: > > > > Currently kunit_tool does not work correctly when executed from a path > > outside of the kernel tree, so make sure that the current worki

[PATCH v1 2/2] kunit: tool: allow generating test results in JSON

2020-08-07 Thread Brendan Higgins
]: https://api.kernelci.org/schema-test-group.html#post Signed-off-by: Heidi Fahim Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py | 35 +++--- tools/testing/kunit/kunit_json.py | 63 ++ tools/testing/kunit/kunit_tool_test.py | 33

[PATCH v1 1/2] kunit: tool: fix running kunit_tool from outside kernel tree

2020-08-07 Thread Brendan Higgins
Currently kunit_tool does not work correctly when executed from a path outside of the kernel tree, so make sure that the current working directory is correct and the kunit_dir is properly initialized before running. Signed-off-by: Brendan Higgins --- tools/testing/kunit/kunit.py | 8 1

[PATCH v6 4/5] kunit: test: add test plan to KUnit TAP format

2020-08-04 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 v6 1/5] vmlinux.lds.h: add linker section for KUnit test suites

2020-08-04 Thread Brendan Higgins
Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/asm-generic/vmlinux.lds.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 052e0f05a9841..75130a4d92ef0 100644

  1   2   3   4   5   6   7   8   9   >