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

2021-01-05 Thread David Gow
> >>>> On 12/22/20 4:11 AM, Andy Shevchenko wrote: > >>>>> On Mon, Dec 21, 2020 at 11:39:00PM -0800, David Gow wrote: > >>>>>> kunit_tool relies on the UML console outputting printk() output to the > >>>>>> tty in or

Re: [PATCH v10 3/5] KASAN: Port KASAN Tests to KUnit

2020-08-04 Thread David Gow
On Tue, Aug 4, 2020 at 6:15 PM Andrey Konovalov wrote: > > On Tue, Aug 4, 2020 at 12:59 AM David Gow wrote: > > > > On Sat, Aug 1, 2020 at 3:10 PM David Gow wrote: > > > > > > From: Patricia Alfonso > > > > > > Transfer all previous tests f

[PATCH v11 3/6] KASAN: Port KASAN Tests to KUnit

2020-08-04 Thread David Gow
not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. Signed-off-by: Patricia Alfonso Sign

[PATCH v11 4/6] kasan: test: Make KASAN KUnit test comply with naming guidelines

2020-08-04 Thread David Gow
/20200702071416.1780522-1-david...@google.com/ Signed-off-by: David Gow --- lib/Makefile| 6 +++--- lib/{test_kasan.c => kasan_kunit.c} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/{test_kasan.c => kasan_kunit.c} (100%) diff --git a/lib/Makefile b/lib/Ma

[PATCH v11 0/6] KASAN-KUnit Integration

2020-08-04 Thread David Gow
/lkml/2020/7/31/571 [8] https://lore.kernel.org/linux-kselftest/8d43e88e-1356-cd63-9152-209b81b16...@linuxfoundation.org/T/#u David Gow (2): kasan: test: Make KASAN KUnit test comply with naming guidelines mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set Patricia Alfonso (4): Ad

[PATCH v11 6/6] mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set

2020-08-04 Thread David Gow
warnings show up). Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins --- mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index e2c14b10bc81..00a53f1355ae 100644 --- a/mm/kasan/report.c +++ b

[PATCH v11 5/6] KASAN: Testing Documentation

2020-08-04 Thread David Gow
From: Patricia Alfonso Include documentation on how to test KASAN using CONFIG_TEST_KASAN_KUNIT and CONFIG_TEST_KASAN_MODULE. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins --- Documentation/dev

[PATCH v11 2/6] KUnit: KASAN Integration

2020-08-04 Thread David Gow
resenting if a KASAN report is expected and if a KASAN report is found [1] (https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.magu...@oracle.com/T/#t) Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by:

[PATCH v11 1/6] Add KUnit Struct to Current Task

2020-08-04 Thread David Gow
From: Patricia Alfonso In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Reviewed-by: Brendan Higgins Signed-off-by: David Gow --- include/linux/sched.h | 4

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

2020-08-10 Thread David Gow
On Sat, Aug 8, 2020 at 4:51 PM Brendan Higgins wrote: > > 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

[PATCH v12 0/6] KASAN-KUnit Integration

2020-08-10 Thread David Gow
52-209b81b16...@linuxfoundation.org/T/#u David Gow (2): kasan: test: Make KASAN KUnit test comply with naming guidelines mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set Patricia Alfonso (4): Add KUnit Struct to Current Task KUnit: KASAN Integration KASAN: Po

[PATCH v12 1/6] Add KUnit Struct to Current Task

2020-08-10 Thread David Gow
From: Patricia Alfonso In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov Signed-off-by: David Gow

[PATCH v12 2/6] KUnit: KASAN Integration

2020-08-10 Thread David Gow
resenting if a KASAN report is expected and if a KASAN report is found [1] (https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.magu...@oracle.com/T/#t) Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by:

[PATCH v12 3/6] KASAN: Port KASAN Tests to KUnit

2020-08-10 Thread David Gow
not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. Signed-off-by: Patricia Alfonso Sign

[PATCH v12 4/6] kasan: test: Make KASAN KUnit test comply with naming guidelines

2020-08-10 Thread David Gow
/20200702071416.1780522-1-david...@google.com/ Signed-off-by: David Gow Tested-by: Andrey Konovalov --- lib/Makefile| 6 +++--- lib/{test_kasan.c => kasan_kunit.c} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/{test_kasan.c => kasan_kunit.c} (100%) diff

[PATCH v12 6/6] mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set

2020-08-10 Thread David Gow
warnings show up). Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov --- mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index e2c14b10bc81..00a53f1355ae 100644

[PATCH v12 5/6] KASAN: Testing Documentation

2020-08-10 Thread David Gow
From: Patricia Alfonso Include documentation on how to test KASAN using CONFIG_TEST_KASAN_KUNIT and CONFIG_TEST_KASAN_MODULE. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins Tested-by: Andrey

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

2020-08-27 Thread David Gow
On Thu, Aug 27, 2020 at 9:14 PM Marco Elver wrote: > > On Thu, Jul 02, 2020 at 12:14AM -0700, David Gow wrote: > > As discussed in [1], KUnit tests have hitherto not had a particularly > > consistent naming scheme. This adds documentation outlining how tests > > and tes

[PATCH v2] Documentation: kunit: Add naming guidelines

2020-09-08 Thread David Gow
/202006141005.BA19A9D3@keescook/t/#u Signed-off-by: David Gow Reviewed-by: Kees Cook Reviewed-by: Brendan Higgins --- This is v2 of the KUnit test nomenclature guidelines. The guidelines have changed a bit in response to the discussion on the v1 thread which came about after plumbers. The major

[PATCH v13 4/5] KASAN: Testing Documentation

2020-09-10 Thread David Gow
From: Patricia Alfonso Include documentation on how to test KASAN using CONFIG_TEST_KASAN_KUNIT and CONFIG_TEST_KASAN_MODULE. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins Tested-by: Andrey

[PATCH v13 0/5] KASAN-KUnit Integration

2020-09-10 Thread David Gow
3e88e-1356-cd63-9152-209b81b16...@linuxfoundation.org/T/#u David Gow (1): mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set Patricia Alfonso (4): Add KUnit Struct to Current Task KUnit: KASAN Integration KASAN: Port KASAN Tests to KUnit KASAN: Testing Documentation Documenta

[PATCH v13 1/5] Add KUnit Struct to Current Task

2020-09-10 Thread David Gow
From: Patricia Alfonso In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov Signed-off-by: David Gow

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

2020-09-10 Thread David Gow
warnings show up). Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov --- mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index e2c14b10bc81..00a53f1355ae 100644

[PATCH v13 3/5] KASAN: Port KASAN Tests to KUnit

2020-09-10 Thread David Gow
not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. Signed-off-by: Patricia Alfonso Sign

[PATCH v13 2/5] KUnit: KASAN Integration

2020-09-10 Thread David Gow
resenting if a KASAN report is expected and if a KASAN report is found [1] (https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.magu...@oracle.com/T/#t) Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by:

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

2020-08-31 Thread David Gow
On Tue, Sep 1, 2020 at 7:47 AM Kees Cook wrote: > > On Fri, Aug 28, 2020 at 12:17:05AM +0800, David Gow wrote: > > On Thu, Aug 27, 2020 at 9:14 PM Marco Elver wrote: > > > Just an idea: Maybe the names are also an opportunity to distinguish > > > real _unit_

[PATCH v10 0/5] KASAN-KUnit Integration

2020-08-01 Thread David Gow
5] https://bugzilla.kernel.org/show_bug.cgi?id=206337 [6] https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-david...@google.com/ [7] https://lkml.org/lkml/2020/7/31/571 David Gow (1): mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set Patricia Alfonso (4): Add KUnit

[PATCH v10 2/5] KUnit: KASAN Integration

2020-08-01 Thread David Gow
resenting if a KASAN report is expected and if a KASAN report is found [1] (https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.magu...@oracle.com/T/#t) Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by:

[PATCH v10 1/5] Add KUnit Struct to Current Task

2020-08-01 Thread David Gow
From: Patricia Alfonso In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Reviewed-by: Brendan Higgins Signed-off-by: David Gow --- include/linux/sched.h | 4

[PATCH v10 3/5] KASAN: Port KASAN Tests to KUnit

2020-08-01 Thread David Gow
not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. Signed-off-by: Patricia Alfonso Sign

[PATCH v10 4/5] KASAN: Testing Documentation

2020-08-01 Thread David Gow
From: Patricia Alfonso Include documentation on how to test KASAN using CONFIG_TEST_KASAN_KUNIT and CONFIG_TEST_KASAN_MODULE. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins --- Documentation/dev

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

2020-08-01 Thread David Gow
warnings show up). Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins --- mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index e2c14b10bc81..00a53f1355ae 100644 --- a/mm/kasan/report.c +++ b

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

2020-08-01 Thread David Gow
On Fri, Jul 31, 2020 at 9:25 PM 'Andrey Konovalov' via kasan-dev wrote: > > On Fri, Jul 31, 2020 at 6:43 AM David Gow wrote: > > > > This patchset contains everything needed to integrate KASAN and KUnit. > > > > KUnit will be able to: > > (1) Fail tests w

Re: [PATCH v10 3/5] KASAN: Port KASAN Tests to KUnit

2020-08-03 Thread David Gow
On Sat, Aug 1, 2020 at 3:10 PM David Gow wrote: > > From: Patricia Alfonso > > Transfer all previous tests for KASAN to KUnit so they can be run > more easily. Using kunit_tool, developers can run these tests with their > other KUnit tests and see "pass" or "

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

2020-09-14 Thread David Gow
warnings show up). Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov --- mm/kasan/report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index e2c14b10bc81..00a53f1355ae 100644

[PATCH v14 1/5] Add KUnit Struct to Current Task

2020-09-14 Thread David Gow
From: Patricia Alfonso In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov Signed-off-by: David Gow

[PATCH v14 4/5] KASAN: Testing Documentation

2020-09-14 Thread David Gow
From: Patricia Alfonso Include documentation on how to test KASAN using CONFIG_TEST_KASAN_KUNIT and CONFIG_TEST_KASAN_MODULE. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins Tested-by: Andrey

[PATCH v14 3/5] KASAN: Port KASAN Tests to KUnit

2020-09-14 Thread David Gow
not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. Signed-off-by: Patricia Alfonso Sign

[PATCH v14 0/5] KASAN-KUnit Integration

2020-09-14 Thread David Gow
/lkml/2020/7/31/571 [8] https://lore.kernel.org/linux-kselftest/8d43e88e-1356-cd63-9152-209b81b16...@linuxfoundation.org/T/#u [9] https://www.spinics.net/lists/kernel/msg3660451.html David Gow (1): mm: kasan: Do not panic if both panic_on_warn and kasan_multishot set Patricia Alfonso (4): Add KUnit

[PATCH v14 2/5] KUnit: KASAN Integration

2020-09-14 Thread David Gow
resenting if a KASAN report is expected and if a KASAN report is found [1] (https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.magu...@oracle.com/T/#t) Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Reviewed-by: Andrey Konovalov Reviewed-by:

Re: linux-next: build warning after merge of the akpm-current tree

2020-09-14 Thread David Gow
[+kasan-dev, +kunit-dev] On Mon, Sep 14, 2020 at 3:01 PM Stephen Rothwell wrote: > > Hi all, > > After merging the akpm-current tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > In file included from lib/test_kasan_module.c:16: > lib/../mm/kasan/kasan.h:232:6:

[PATCH v3] Documentation: kunit: Add naming guidelines

2020-09-10 Thread David Gow
/202006141005.BA19A9D3@keescook/t/#u Signed-off-by: David Gow Reviewed-by: Kees Cook Reviewed-by: Brendan Higgins Reviewed-by: Marco Elver Reviewed-by: Tim Bird --- This is v3 of the KUnit test naming guidelines. It's basically just v2 with some spelling fixes (thanks Marco). Changelog: v3

Re: [PATCH] KUnit: Docs: style: fix some Kconfig example issues

2020-10-28 Thread David Gow
ash ('/') to a sub-directory > name -- this is how the text mostly appears in other Kconfig files. > > Signed-off-by: Randy Dunlap > Cc: David Gow > Cc: linux-kselft...@vger.kernel.org > Cc: kunit-...@googlegroups.com > Cc: Shuah Khan > Cc: Shuah Khan > Cc: Brendan Higgins

[PATCH] kunit: Print test statistics on failure

2020-12-10 Thread David Gow
diagnostic lines, so that these statistics do not prevent the result from parsing. Signed-off-by: David Gow --- This is largely a follow-up to the discussion here: https://lore.kernel.org/linux-kselftest/CABVgOSmy4n_LGwDS7yWfoLftcQzxv6S+iXx9Y=opcgg2gu0...@mail.gmail.com/T/#t Does this seem like a sensib

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

2020-12-11 Thread David Gow
Various helper functions were misspelling "diagnostic" in their names. It finally got annoying, so fix it. Signed-off-by: David Gow --- tools/testing/kunit/kunit_parser.py | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/tes

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

2020-12-08 Thread David Gow
from the > list for _every_ outer iteration. > > Signed-off-by: Daniel Latypov > --- Thanks! This works great here: I didn't time it to see how much faster it is, but it's clearly an improvement. Reviewed-by: David Gow Cheers, -- David

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

2020-12-21 Thread David Gow
-by: David Gow Fixes: 757055ae8ded ("init/console: Use ttynull as a fallback when there is no console") --- tools/testing/kunit/kunit_kernel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kerne

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

2020-12-15 Thread David Gow
de > guidance for testing many inputs") to show a minimal example of the new > feature. > > Signed-off-by: Daniel Latypov > --- This looks good to me. Thanks! Reviewed-by: David Gow -- David smime.p7s Description: S/MIME Cryptographic Signature

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

2020-12-17 Thread David Gow
On Wed, Dec 16, 2020 at 10:53 PM Quentin Monnet wrote: > > 2020-11-21 17:48 UTC+0800 ~ David Gow > > On Sat, Nov 21, 2020 at 3:38 PM Andrii Nakryiko > > wrote: > >> > >> On Thu, Nov 19, 2020 at 12:51 AM David Gow wrote: > >>> > >

[PATCH v4] fat: Add KUnit tests for checksums and timestamps

2020-10-23 Thread David Gow
/linux.git/tree/fs/ext4/inode-test.c Signed-off-by: David Gow Acked-by: OGAWA Hirofumi --- Changes since v3: https://lore.kernel.org/linux-kselftest/20201021061713.1545931-1-david...@google.com/ - Update the Kconfig entry to use "depends on" rather than "select", as discus

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

2020-10-23 Thread David Gow
On Fri, Oct 23, 2020 at 10:07 PM Theodore Y. Ts'o wrote: > > On Thu, Oct 22, 2020 at 04:52:52PM -0700, Brendan Higgins wrote: > > So you, me, Luis, David, and a whole bunch of other people have been > > thinking about this problem for a while. What if we just put > > kunitconfig fragments in

[PATCH v5] fat: Add KUnit tests for checksums and timestamps

2020-10-24 Thread David Gow
/linux.git/tree/fs/ext4/inode-test.c Signed-off-by: David Gow Acked-by: OGAWA Hirofumi --- Whoops! Sent out a broken early version of this as v4 instead. Sorry about that! -- David Changes since v4: https://lore.kernel.org/linux-kselftest/20201024052047.2526780-1-david...@google.com/ - Fix

[PATCH v6] fat: Add KUnit tests for checksums and timestamps

2020-10-24 Thread David Gow
/linux.git/tree/fs/ext4/inode-test.c Signed-off-by: David Gow Acked-by: OGAWA Hirofumi --- I am _so_ sorry: I sent out the wrong version again! It's clearly not my day! This version actually has the fix! -- David Changes since v4/v5: https://lore.kernel.org/linux-kselftest

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

2020-11-12 Thread David Gow
On Thu, Nov 12, 2020 at 12:55 AM Bird, Tim wrote: > > > > > -Original Message- > > From: David Gow > > > > On Wed, Nov 11, 2020 at 1:02 AM Bird, Tim wrote: > > > > > > > -Original Message- > > > > From:

[PATCH] drivers: fpga: Specify HAS_IOMEM dependency for FPGA_DFL

2020-11-19 Thread David Gow
Because dfl.c uses the 'devm_ioremap', 'devm_iounmap', 'devm_ioremap_resource', and 'devm_platform_ioremap_resource' functions, it should depend on HAS_IOMEM. This fixes make allyesconfig under UML (ARCH=um), which doesn't provide HAS_IOMEM. Signed-off-by: David Gow --- drivers/fpga/Kconfig

[PATCH] staging: hikey9xx: Specify HAS_IOMEM dependency for MFD_HI6421_SPMI

2020-11-19 Thread David Gow
]: - MFD_HI6421_SPMI [=y] && STAGING [=y] && OF [=y] && SPMI [=y] By specifying HAS_IOMEM as a dependency for MFD_HI6421_SPMI (as SPMI_HISI3670 already dows), this issue is resolved, and no such warning appears when building on architectures without HAS_IOMEM. Signed-off-by: David G

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

2020-11-19 Thread David Gow
= in tools/scripts/Makefile.include. Signed-off-by: David Gow --- Hi all, I'm not 100% sure this is the correct fix here -- it seems to work for me, and makes some sense, but let me know if there's a better way. One other thing worth noting is that I've been hitting this with make allyesconfig

Re: [PATCH] drivers: fpga: Specify HAS_IOMEM dependency for FPGA_DFL

2020-11-19 Thread David Gow
On Fri, Nov 20, 2020 at 2:27 PM Moritz Fischer wrote: > > Hi David, > > On Thu, Nov 19, 2020 at 12:22:09AM -0800, David Gow wrote: > > Because dfl.c uses the 'devm_ioremap', 'devm_iounmap', > > 'devm_ioremap_resource', and 'devm_platform_ioremap_resource' > &g

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

2020-11-12 Thread David Gow
On Thu, Nov 12, 2020 at 8:37 PM Marco Elver wrote: > > On Thu, Nov 12, 2020 at 04:18PM +0800, David Gow wrote: > > On Thu, Nov 12, 2020 at 12:55 AM Bird, Tim wrote: > [...] > > > > kunit_tool has a bug when parsing the comments / diagnostic lines, > > > &

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

2020-11-13 Thread David Gow
On Fri, Nov 13, 2020 at 6:31 PM Marco Elver wrote: > > On Fri, Nov 13, 2020 at 01:17PM +0800, David Gow wrote: > > On Thu, Nov 12, 2020 at 8:37 PM Marco Elver wrote: > [...] > > > > (It also might be a little tricky with the current implementation to &g

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

2020-11-13 Thread David Gow
On Sat, Nov 14, 2020 at 9:38 AM Arpitha Raghunandan <98.a...@gmail.com> wrote: > > On 14/11/20 5:44 am, Marco Elver wrote: > > > > Arpitha: Do you want to send v7, but with the following modifications > > from what I proposed? Assuming nobody objects. > > > > 1. Remove the num_params counter and

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

2020-10-20 Thread David Gow
On Tue, Oct 20, 2020 at 6:46 AM Daniel Latypov wrote: > > Add basic test coverage for files that don't require any config options: > * gcd.c > * lcm.c > * int_sqrt.c > * reciprocal_div.c > (Ignored int_pow.c since it's a simple textbook algorithm.) > I don't see a particular reason why int_pow.c

Re: [PATCH v2] fat: Add KUnit tests for checksums and timestamps

2020-10-20 Thread David Gow
On Tue, Oct 20, 2020 at 2:51 PM OGAWA Hirofumi wrote: > > David Gow writes: > > > diff --git a/fs/fat/misc.c b/fs/fat/misc.c > > index f1b2a1fc2a6a..445ad3542e74 100644 > > --- a/fs/fat/misc.c > > +++ b/fs/fat/misc.c > > @@ -229,6 +229,7 @@ void fat_

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

2020-10-20 Thread David Gow
dates the document for this. > > Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module") > Signed-off-by: SeongJae Park Sorry for the delay in looking at this. Apart from another minuscule typo below, this looks good to me. Reviewed-by: David Gow Cheers, -- Davi

[PATCH v3] fat: Add KUnit tests for checksums and timestamps

2020-10-21 Thread David Gow
/linux.git/tree/fs/ext4/inode-test.c Signed-off-by: David Gow Acked-by: OGAWA Hirofumi --- Changes since v2: https://lore.kernel.org/linux-kselftest/20201020055856.1270482-1-david...@google.com/ - Comment that the export for fat_time_fat2unix() function is for KUnit tests. Changes since v1

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

2020-10-21 Thread David Gow
JSON") Signed-off-by: David Gow --- This is a quick fix because kunit.py parse is completely broken: it appears it was introduced in the rebase of the JSON parser after the separation of concerns patch. tools/testing/kunit/kunit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2020-10-21 Thread David Gow
On Thu, Oct 22, 2020 at 5:15 AM Brendan Higgins wrote: > > 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. > >

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

2020-10-21 Thread David Gow
> Signed-off-by: Brendan Higgins Excellent: this fixes all of the failing tests in kunit_tool_test.py for me. Reviewed-by: David Gow -- David > --- > tools/testing/kunit/kunit_tool_test.py| 32 ++ > .../test_data/test_config_printk_time.log | Bi

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

2020-10-21 Thread David Gow
: 45ba7a893ad89114e773b3dc32f6431354c465d6 ("kunit: kunit_tool: Separate out config/build/exec/parse") Signed-off-by: David Gow --- tools/testing/kunit/kunit_parser.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py index 8019e3dd4c32..744ee9cb0

Re: [PATCH] kunit: tool: fix extra trailing \n in parsed test output

2020-10-29 Thread David Gow
est: EXPECTATION FAILED at > lib/kunit/kunit-example-test.c:29 > [16:16:46] Expected 1 + 1 == 3, but > [16:16:46] 1 + 1 == 2 > [16:16:46] 3 == 3 > [16:16:46] not ok 1 - example_simple_test > [16:16:46] > > Signed-off-by: Daniel Latypov > --- Thanks! This

Re: [PATCH] kunit: tool: print out stderr from make (like build warnings)

2020-10-29 Thread David Gow
on ‘kunit_test_successful_try’: > ../lib/kunit/kunit-test.c:19:2: error: unknown type name ‘invalid_type’ >19 | invalid_type *test = data; > | ^~~~ > ... > > Signed-off-by: Daniel Latypov > --- Thanks a lot -- this was really bugging me, and works great. Reviewed-by: David Gow

Re: [PATCH] kunit: tool: fix pre-existing python type annotation errors

2020-10-29 Thread David Gow
script runs, rather than have to use mypy as a tool to verify it separately? Otherwise, maybe we can run it automatically from the kunit_tool_test.py unit tests or something similar? Regardless, this is Reviewed-by: David Gow Cheers, -- David

Re: [PATCH] kunit: tool: fix extra trailing \n in parsed test output

2020-10-30 Thread David Gow
On Fri, Oct 30, 2020 at 1:41 PM Daniel Latypov wrote: > > On Thu, Oct 29, 2020 at 7:34 PM David Gow wrote: > > > > On Wed, Oct 21, 2020 at 7:32 AM Daniel Latypov wrote: > > > > > > For simplcity, strip all trailing whitespace from parsed output. > > >

Re: [PATCH] kunit: tool: fix --raw_output to actually show output

2020-10-30 Thread David Gow
On Fri, Oct 30, 2020 at 2:17 PM Daniel Latypov wrote: > > Currently --raw_output means nothing gets shown. > Why? > Because `raw_output()` has a `yield` and therefore is a generator, which > means it only executes when you ask it for a value. > > Given no one actually is using it as a generator

Re: [PATCH] kunit: tool: fix extra trailing \n in raw + parsed test output

2020-10-30 Thread David Gow
elftest/20201020233219.4146059-1-dlaty...@google.com/ > > Signed-off-by: Daniel Latypov > --- Thanks! I tried this out against everything I could (including the nastier --alltests option), and didn't hit any problems, so it looks good to go to me! Reviewed-by: David Gow Tested-by: David Gow Cheers, -- David

[PATCH v2] drivers: fpga: Specify HAS_IOMEM dependency for FPGA_DFL

2020-11-20 Thread David Gow
mmio resources in their own feature drivers") Signed-off-by: David Gow --- Changes since v1: ( https://lore.kernel.org/linux-fpga/20201119082209.3598354-1-david...@google.com/ ) - Add Fixes tag drivers/fpga/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/fpga/Kconfig b/dr

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

2020-11-21 Thread David Gow
On Sat, Nov 21, 2020 at 3:38 PM Andrii Nakryiko wrote: > > On Thu, Nov 19, 2020 at 12:51 AM David Gow wrote: > > > > If BPF_PRELOAD is enabled, and an out-of-tree build is requested with > > make O=, compilation seems to fail with: > > > > tools/scripts/M

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

2020-11-09 Thread David Gow
On Mon, Nov 9, 2020 at 2:49 PM Arpitha Raghunandan <98.a...@gmail.com> wrote: > > On 07/11/20 3:36 pm, Marco Elver wrote: > > On Sat, 7 Nov 2020 at 05:58, David Gow wrote: > >> On Sat, Nov 7, 2020 at 3:22 AM Arpitha Raghunandan <98.a...@gmail.com> >

[PATCH] kunit: kunit_tool: Correctly parse diagnostic messages

2020-11-09 Thread David Gow
] and the draft KTAP spec[2] are expecting. [1]: http://testanything.org/tap-specification.html [2]: https://lore.kernel.org/linux-kselftest/cy4pr13mb1175b804e31e502221bc8163fd...@cy4pr13mb1175.namprd13.prod.outlook.com/T/ Signed-off-by: David Gow --- tools/testing/kunit/kunit_parser.py | 7 --

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

2020-11-10 Thread David Gow
On Wed, Nov 11, 2020 at 1:02 AM Bird, Tim wrote: > > > > > -Original Message- > > From: David Gow > > > > On Mon, Nov 9, 2020 at 2:49 PM Arpitha Raghunandan <98.a...@gmail.com> > > wrote: > > > > > > On 07/11/20 3:36 pm, Ma

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

2020-11-16 Thread David Gow
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 > --- [Resending this because my email client re-defaulted to HTML! Aarrgh!] This looks good to me! I tested it in UML an

Re: [PATCH v9 2/2] fs: ext4: Modify inode-test.c to use KUnit parameterized testing feature

2020-11-16 Thread David Gow
debugfs results file. But that's clearly not an issue with this patch, and the actual combined result is still present (and the complete results should show up in dmesg anyway). Tested-by: David Gow Reviewed-by: David Gow Thanks! -- David

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

2020-11-30 Thread David Gow
typov > --- I won't pretend to be an expert on Python, but this seems good to me. I tested it on my machine and it works fine. So, Reviewed-by: David Gow -- Davkd > tools/testing/kunit/kunit_tool_test.py | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) > &

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

2020-11-30 Thread David Gow
d the older code a touch more easily. In any case, Reviewed-by: David Gow -- David

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

2020-11-30 Thread David Gow
On Tue, Dec 1, 2020 at 7:33 AM Daniel Latypov wrote: > > get_absolute_path() makes an attempt to allow for this. > But that doesn't work as soon as os.chdir() gets called. Can we explain why this doesn't work? It's because the test_data/ files are accessed with relative paths, so chdir breaks

Re: [PATCH 5/5] minor: kunit: tool: s/get_absolute_path/test_data_path in unit test

2020-11-30 Thread David Gow
On Tue, Dec 1, 2020 at 7:33 AM Daniel Latypov wrote: > > 1. the name is a lie. It gives relative paths, e.g. if I run from the > same dir as the test file, it gives './test_data/' > > 2. it's only used for generating paths to tools/testing/kunit/test_data/ > So we can tersen things by making it

Re: [PATCH 3/5] kunit: tool: stop using bare asserts in unit test

2020-11-30 Thread David Gow
tty sensible from my rudimentary python knowledge. Reviewed-by: David Gow Cheers, -- David

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

2020-11-23 Thread David Gow
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 for parameterized test

Re: [PATCH 3/3] kunit: tool: move kunitconfig parsing into __init__

2020-12-03 Thread David Gow
On Fri, Dec 4, 2020 at 3:41 AM Daniel Latypov wrote: > > LinuxSourceTree will unceremoniously crash if the user doesn't call > read_kunitconfig() first in a number of functions. This patch seems to partly be reverting the changes here, right:

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

2020-12-03 Thread David Gow
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 > --- Otherwise, the actual code changes all seem sensible, and it worked fine when I tested it, so: Reviewed-by: David Gow -- David

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

2020-12-03 Thread David Gow
s looks good to me: I gave it some quick testing, and reading through it, all of the changes seem sensible. I wasn't able to get pytype running here, but mypy worked fine. Reviewed-by: David Gow -- David

Re: [PATCH 3/3] kunit: tool: move kunitconfig parsing into __init__

2020-12-04 Thread David Gow
On Sat, Dec 5, 2020 at 2:18 AM Daniel Latypov wrote: > > On Thu, Dec 3, 2020 at 7:57 PM David Gow wrote: > > > > On Fri, Dec 4, 2020 at 3:41 AM Daniel Latypov wrote: > > > > > > LinuxSourceTree will unceremoniously crash if the user doesn't call > &

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

2020-12-01 Thread David Gow
On Wed, Dec 2, 2020 at 3:00 AM Daniel Latypov wrote: > > On Mon, Nov 30, 2020 at 11:33 PM David Gow wrote: > > > > On Tue, Dec 1, 2020 at 7:33 AM Daniel Latypov wrote: > > > > > > get_absolute_path() makes an attempt to allow for this. > > > But

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

2020-12-02 Thread David Gow
On Wed, Dec 2, 2020 at 6:06 PM Andy Shevchenko wrote: > > On Wed, Dec 02, 2020 at 09:51:19AM +0530, Arpitha Raghunandan wrote: > > On 01/12/20 4:36 pm, Andy Shevchenko wrote: > > > On Tue, Dec 1, 2020 at 9:21 AM Arpitha Raghunandan <98.a...@gmail.com> > > > wrote: > > ... > > > >> I ran both the

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

2020-12-02 Thread David Gow
On Wed, Dec 2, 2020 at 8:21 PM Andy Shevchenko wrote: > > On Wed, Dec 2, 2020 at 1:57 PM David Gow wrote: > > On Wed, Dec 2, 2020 at 6:06 PM Andy Shevchenko > > wrote: > > > On Wed, Dec 02, 2020 at 09:51:19AM +0530, Arpitha Raghunandan wrote: > > ... > > &

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

2020-12-02 Thread David Gow
ov > --- This patch hasn't changed since v1, right? It's still: Reviewed-by: David Gow Cheers, -- David

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

2020-12-02 Thread David Gow
side. > > Do so to make the code more Pythonic. > > Signed-off-by: Daniel Latypov > --- Reviewed-by: David Gow Cheers, -- David

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

2020-12-02 Thread David Gow
yg1wg0zddbtlosucob-gwmexlgvt...@mail.gmail.com/ > > Fixes: 5578d008d9e0 ("kunit: tool: fix running kunit_tool from outside kernel > tree") > Signed-off-by: Daniel Latypov > --- Thanks: I much prefer this to v1. Having it work the same way as test_tmpdir is a bonus. Reviewed-by: David Gow Cheers, -- David

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

2020-12-02 Thread David Gow
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 > --- Looks good, thanks! Reviewed-by: David Gow -- David

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

2020-11-06 Thread David Gow
nit_parser: make parser more robust") > Signed-off-by: Brendan Higgins > --- Reviewed-by: David Gow Thanks. I wasn't able to find any issues which required those files to be binary. For the record, a link to the original issue, which appeared to be with whitespace (spaces before tabs) i

  1   2   3   >