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

2020-12-01 Thread Arpitha Raghunandan
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: >> Convert test lib/test_hexdump.c to KUnit. More information about >> KUnit can be found at: >> https://www.kernel.org/doc/html/latest/dev-tools

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

2020-11-30 Thread Arpitha Raghunandan
0", "9b3483d", The difference in outputs can be seen here: https://gist.github.com/arpi-r/38f53a3c65692bf684a6bf3453884b6e Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v2->v3: - Modify KUNIT_EXPECT macros used - kunittest variable made

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

2020-11-15 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Signed-off-by: Marco Elver --- Changes v8->v9: - Replace strncpy() with strscpy() in timestamp_expectation_to_desc() Changes v7->v8: - Replace s

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

2020-11-15 Thread Arpitha Raghunandan
overall test case output summarizes TAP-compliant success or failure of all parameter runs. In future, when supported by kunit-tool, these can be turned into subsubtest outputs. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco

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

2020-11-15 Thread Arpitha Raghunandan
On 16/11/20 1:14 am, Marco Elver wrote: > On Sun, 15 Nov 2020 at 19:59, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> Modify fs/ext4/inode-test.c to use the parameterized testing >> feature of KUnit. >> >> Signed-off-by: Arpitha Raghunandan <98.a..

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

2020-11-15 Thread Arpitha Raghunandan
overall test case output summarizes TAP-compliant success or failure of all parameter runs. In future, when supported by kunit-tool, these can be turned into subsubtest outputs. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco

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

2020-11-15 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Signed-off-by: Marco Elver --- Changes v7->v8: - Replace strcpy() with strncpy() in timestamp_expectation_to_desc() Changes v6->v7:

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

2020-11-15 Thread Arpitha Raghunandan
On 15/11/20 2:28 pm, Marco Elver wrote: > On Sat, 14 Nov 2020 at 13:38, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> Implementation of support for parameterized testing in KUnit. This >> approach requires the creation of a test case using the >> KUNIT_CASE_P

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

2020-11-14 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Signed-off-by: Marco Elver --- Changes v6->v7: - Introduce timestamp_expectation_to_desc() to convert param to description. Changes v5->v6: - No ch

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

2020-11-14 Thread Arpitha Raghunandan
overall test case output summarizes TAP-compliant success or failure of all parameter runs. In future, when supported by kunit-tool, these can be turned into subsubtest outputs. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco

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

2020-11-13 Thread Arpitha Raghunandan
On 14/11/20 5:44 am, Marco Elver wrote: > On Fri, 13 Nov 2020 at 23:37, David Gow wrote: >> >> 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 migh

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

2020-11-10 Thread Arpitha Raghunandan
On 10/11/20 10:11 pm, Marco Elver wrote: > On Tue, 10 Nov 2020 at 17:32, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> On 10/11/20 4:05 pm, Marco Elver wrote: >>> On Tue, 10 Nov 2020 at 08:21, David Gow wrote: >>> [...] >>>>>> &g

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

2020-11-10 Thread Arpitha Raghunandan
On 10/11/20 4:05 pm, Marco Elver wrote: > On Tue, 10 Nov 2020 at 08:21, David Gow wrote: > [...] The previous attempt [1] at something similar failed because it seems we'd need to teach kunit-tool new tricks [2], too. [1] https://lkml.kernel.org/r/20201105195503.ga2399...@elver

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

2020-11-08 Thread Arpitha Raghunandan
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> wrote: >>> >>> Implementation of support for parameterized testing in KUnit. >>> This app

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

2020-11-06 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v5->v6: - No change to this patch of the patch series Changes v4->v5: - No change to this patch of the patch series Changes v3->v4:

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

2020-11-06 Thread Arpitha Raghunandan
. It also provides a macro to generate common-case generators. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco Elver --- Changes v5->v6: - Fix alignment to maintain consistency Changes v4->v5: - Update kernel-doc comments. - Us

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

2020-11-06 Thread Arpitha Raghunandan
On 07/11/20 12:15 am, Marco Elver wrote: > On Fri, 6 Nov 2020 at 19:28, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> Implementation of support for parameterized testing in KUnit. >> This approach requires the creation of a test case using the >> KUNI

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

2020-11-06 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v4->v5: - No change to this patch of the patch series Changes v3->v4: - Modification based on latest implementation of KUnit parameter

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

2020-11-06 Thread Arpitha Raghunandan
. It also provides a macro to generate common-case generators. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco Elver --- Changes v4->v5: - Update kernel-doc comments. - Use const void* for generator return and prev value types. - A

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

2020-11-06 Thread Arpitha Raghunandan
On 06/11/20 6:04 pm, Marco Elver wrote: > On Fri, Nov 06, 2020 at 09:11AM +0100, Marco Elver wrote: >> On Fri, 6 Nov 2020 at 06:54, Arpitha Raghunandan <98.a...@gmail.com> wrote: > [...] >>> I think this format of output should be fine for parameterized tests. >&

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

2020-11-05 Thread Arpitha Raghunandan
On 06/11/20 1:25 am, Marco Elver wrote: > On Thu, Nov 05, 2020 at 04:02PM +0100, Marco Elver wrote: >> On Thu, 5 Nov 2020 at 15:30, Arpitha Raghunandan <98.a...@gmail.com> wrote: > [...] >>>>> I tried adding support to run each parameter as a distinct tes

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

2020-11-05 Thread Arpitha Raghunandan
On 04/11/20 1:48 pm, Rasmus Villemoes wrote: > On 03/11/2020 17.11, 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 Raghunandan

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

2020-11-05 Thread Arpitha Raghunandan
On 05/11/20 2:00 pm, Marco Elver wrote: > On Thu, 5 Nov 2020 at 08:32, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> On 28/10/20 12:51 am, Marco Elver wrote: >>> On Tue, 27 Oct 2020 at 18:47, Arpitha Raghunandan <98.a...@gmail.com> wrote: >

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

2020-11-04 Thread Arpitha Raghunandan
On 28/10/20 12:51 am, Marco Elver wrote: > On Tue, 27 Oct 2020 at 18:47, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> Implementation of support for parameterized testing in KUnit. >> This approach requires the creation of a test case using the >> KUNI

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

2020-11-03 Thread Arpitha Raghunandan
ok 20 - struct_clk     ok 21 - bitmap     ok 22 - netdev_features     ok 23 - flags     ok 24 - errptr     ok 25 - fwnode_pointer not ok 1 - printf This patch is based on top of Andy's series that renames KUnit based tests in lib/ and Ramsus' series on deterministic random testing. Signe

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

2020-10-28 Thread Arpitha Raghunandan
linus/master v5.10-rc1 next-20201027] >> [If your patch is applied to the wrong git tree, kindly drop us a note. >> And when submitting patch, we suggest to use '--base' as documented in >> https://git-scm.com/docs/git-format-patch] >> >> url: >> h

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

2020-10-28 Thread Arpitha Raghunandan
On 28/10/20 12:51 am, Marco Elver wrote: > On Tue, 27 Oct 2020 at 18:47, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> Implementation of support for parameterized testing in KUnit. >> This approach requires the creation of a test case using the >> KUNI

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

2020-10-27 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v3->v4: - Modification based on latest implementation of KUnit parameterized testing Changes v2->v3: - Marked hardcoded test data const -

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

2020-10-27 Thread Arpitha Raghunandan
. It also provides a macro to generate common-case generators. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco Elver --- Changes v3->v4: - Rename kunit variables - Rename generator function helper macro - Add documentation for

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

2020-10-27 Thread Arpitha Raghunandan
On 27/10/20 2:33 pm, Marco Elver wrote: > I just tried to give this a spin on some of my tests and noticed some > more things (apologies for the multiple rounds of comments): > > On Mon, 26 Oct 2020 at 19:36, Arpitha Raghunandan <98.a...@gmail.com> wrote: > [...] >> /*

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

2020-10-27 Thread Arpitha Raghunandan
On 27/10/20 1:14 pm, Marco Elver wrote: > On Tue, 27 Oct 2020 at 06:14, Arpitha Raghunandan <98.a...@gmail.com> wrote: > [...] >>>> diff --git a/include/kunit/test.h b/include/kunit/test.h >>>> index a423fffefea0..16bf9f334e2c 100644 >>>> --- a/incl

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

2020-10-26 Thread Arpitha Raghunandan
On 27/10/20 4:44 am, Marco Elver wrote: > On Mon, 26 Oct 2020 at 19:36, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> Implementation of support for parameterized testing in KUnit. >> This approach requires the creation of a test case using the >> KUNI

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

2020-10-26 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v2->v3: - Marked hardcoded test data const - Modification based on latest implementation of KUnit parameterized testing Changes v1->v2: -

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

2020-10-26 Thread Arpitha Raghunandan
. It also provides a macro to generate common-case generators. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> Co-developed-by: Marco Elver Signed-off-by: Marco Elver --- Changes v2->v3: - Modifictaion of generator macro and method Changes v1->v2: - Use of a generator method to

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

2020-10-26 Thread Arpitha Raghunandan
On 26/10/20 11:41 pm, Iurii Zaikin wrote: >> +static struct timestamp_expectation test_data[] = { > Can you mark this and the rest of the hardcoded values as the const they are? > Sure, I will make this change for the next version.

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

2020-10-23 Thread Arpitha Raghunandan
On 24/10/20 12:18 am, Marco Elver wrote: > On Fri, Oct 23, 2020 at 08:35PM +0530, Arpitha Raghunandan wrote: >> Implementation of support for parameterized testing in KUnit. > > Already looks much cleaner, thanks for using this approach! > > I think the commit message nee

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

2020-10-23 Thread Arpitha Raghunandan
On 23/10/20 11:31 pm, Petr Mladek wrote: > On Fri 2020-10-23 19:13:00, Arpitha Raghunandan wrote: >> On 23/10/20 4:36 pm, Rasmus Villemoes wrote: >>> On 22/10/2020 21.16, Andy Shevchenko wrote: >>>> On Thu, Oct 22, 2020 at 08:43:49PM +0530, Arpitha Raghunandan wrote

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

2020-10-23 Thread Arpitha Raghunandan
Modify fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v1->v2: - Modification based on latest implementation of KUnit parameterized testing fs/ext4/inode-tes

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

2020-10-23 Thread Arpitha Raghunandan
Implementation of support for parameterized testing in KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v1->v2: - Use of a generator method to access test case parameters include/kunit/test.h | 45 lib/kunit/test.c

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

2020-10-23 Thread Arpitha Raghunandan
On 23/10/20 4:36 pm, Rasmus Villemoes wrote: > On 22/10/2020 21.16, Andy Shevchenko wrote: >> On Thu, Oct 22, 2020 at 08:43:49PM +0530, Arpitha Raghunandan wrote: >>> Convert test lib/test_printf.c to KUnit. More information about >>> KUnit can be found at: >>

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

2020-10-22 Thread Arpitha Raghunandan
0.1', expected '127-000.000.001|127.0.0.1' # selftest: EXPECTATION FAILED at lib/printf_kunit.c:82 vsnprintf(buf, 5, "%pi4|%pI4", ...) wrote '127.', expected '127-' # selftest: EXPECTATION FAILED at lib/printf_kunit.c:118 kvasprintf(..., "%pi4

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

2020-10-14 Thread Arpitha Raghunandan
On 12/10/20 4:30 pm, Marco Elver wrote: > On Sat, 10 Oct 2020 at 16:54, Arpitha Raghunandan <98.a...@gmail.com> wrote: >> Implementation of support for parameterized testing in KUnit. >> >> Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> >

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

2020-10-13 Thread Arpitha Raghunandan
On 13/10/20 2:16 am, Brendan Higgins wrote: > 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 Rag

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

2020-10-10 Thread Arpitha Raghunandan
Modifies fs/ext4/inode-test.c to use the parameterized testing feature of KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- fs/ext4/inode-test.c | 64 +--- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/fs/ext4/inode-

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

2020-10-10 Thread Arpitha Raghunandan
Implementation of support for parameterized testing in KUnit. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- include/kunit/test.h | 29 + lib/kunit/test.c | 44 +++- 2 files changed, 72 insertions(+), 1 de

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

2020-08-20 Thread Arpitha Raghunandan
On 17/08/20 12:36 pm, Rasmus Villemoes wrote: > On 17/08/2020 06.30, Arpitha Raghunandan wrote: >> Converts test lib/test_printf.c to KUnit. >> More information about KUnit can be found at >> https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html. >> KUnit

[PATCH] lib: Convert test_printf.c to KUnit

2020-08-16 Thread Arpitha Raghunandan
Converts test lib/test_printf.c to KUnit. More information about KUnit can be found at https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html. KUnit provides a common framework for unit tests in the kernel. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- lib/Kconfig

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

2020-08-09 Thread Arpitha Raghunandan
On 06/08/20 3:35 pm, Andy Shevchenko wrote: > On Thu, Aug 06, 2020 at 03:14:40PM +0530, Arpitha Raghunandan wrote: >> Converts test lib/test_hexdump.c to KUnit. >> More information about KUnit can be found at >> https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html

[PATCH v2] lib: Convert test_hexdump.c to KUnit

2020-08-09 Thread Arpitha Raghunandan
Converts test lib/test_hexdump.c to KUnit. More information about KUnit can be found at https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html. KUnit provides a common framework for unit tests in the kernel. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes

[PATCH] lib: Convert test_hexdump.c to KUnit

2020-08-06 Thread Arpitha Raghunandan
Converts test lib/test_hexdump.c to KUnit. More information about KUnit can be found at https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html. KUnit provides a common framework for unit tests in the kernel. Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- lib/Kconfig

[PATCH v2] lib: Convert test_uuid.c to KUnit

2020-08-02 Thread Arpitha Raghunandan
Converts test lib/test_uuid.c to KUnit. More information about KUnit can be found at https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html. This change is beneficial as KUnit provides a common framework for unit tests in the kernel. KUnit is fast as well. Signed-off-by: Arpitha

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

2020-07-31 Thread Arpitha Raghunandan
On 30/07/20 5:46 pm, Arpitha Raghunandan wrote: > Converts test lib/test_uuid.c to KUnit > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> > --- > lib/Kconfig.debug | 7 +-- > lib/Makefile | 2 +- > lib/{test_u

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

2020-07-31 Thread Arpitha Raghunandan
On 31/07/20 11:20 am, Brendan Higgins wrote: > On Thu, Jul 30, 2020 at 5:18 AM Arpitha Raghunandan <98.a...@gmail.com> wrote: >> >> Converts test lib/test_uuid.c to KUnit > > Can you add some more detail to the commit message? Maybe link to > KUnit and say some

[PATCH] lib: Convert test_uuid.c to KUnit

2020-07-30 Thread Arpitha Raghunandan
Converts test lib/test_uuid.c to KUnit Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- lib/Kconfig.debug | 7 +-- lib/Makefile | 2 +- lib/{test_uuid.c => uuid_kunit.c} | 84 +-- 3 files changed, 28 insertio

[PATCH v3] staging: rtl8188eu: core: fix coding style issues

2020-07-15 Thread Arpitha Raghunandan
Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' in a string in rtw_ioctl_set.c Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v2->v3: - Added information about what changed from previous versions Changes v1-&g

[PATCH v2] staging: rtl8188eu: core: fix coding style issues

2020-07-15 Thread Arpitha Raghunandan
Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' in a string in rtw_ioctl_set.c Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 10 +- 1 file changed, 5 inserti