[PATCH] lib/math: Add int_pow test suite

2024-08-14 Thread Luis Felipe Hernandez
Adds test suite for integer based power function. Signed-off-by: Luis Felipe Hernandez --- lib/math/Makefile | 1 + lib/math/test_int_pow.c | 70 + 2 files changed, 71 insertions(+) create mode 100644 lib/math/test_int_pow.c diff --git a/lib/math

[PATCH v2] lib/math: Add int_pow test suite

2024-08-18 Thread Luis Felipe Hernandez
Adds test suite for integer based power function. Signed-off-by: Luis Felipe Hernandez --- lib/Kconfig.debug | 9 ++ lib/math/Makefile | 1 + lib/math/tests/Makefile| 3 ++ lib/math/tests/int_pow_kunit.c | 52 ++ 4 files

[PATCH v3] lib/math: Add int_pow test suite

2024-08-19 Thread Luis Felipe Hernandez
Adds test suite for integer based power function. Signed-off-by: Luis Felipe Hernandez --- Changes in v3: - Fix compiler warning: explicitly define constant as unsigned int - Add changes in patch revisions Changes in v2: - Address review feedback - Add kconfig entry - Use correct dir and

[PATCH v4] lib/math: Add int_pow test suite

2024-09-08 Thread Luis Felipe Hernandez
Adds test suite for integer based power function. Signed-off-by: Luis Felipe Hernandez --- Changes in v4: - Address checkpatch warning and make kconfig description longer - Use GPL-2.0-only for consistency - Spelling fix fith -> fifth Changes in v3: - Fix compiler warning: explici

[PATCH v5] lib/math: Add int_pow test suite

2024-09-09 Thread Luis Felipe Hernandez
Adds test suite for integer based power function. Signed-off-by: Luis Felipe Hernandez --- Changes in v5: - Fix kernel test bot warning - Rebase with latest Changes in v4: - Address checkpatch warning and make kconfig description longer - Use GPL-2.0-only for consistency - Spelling fix

[PATCH v3] lib: math: Move kunit tests into tests/ subdir

2024-10-05 Thread Luis Felipe Hernandez
_kunit.c and kconfig entries CONFIG__KUNIT_TEST. Link: https://lore.kernel.org/all/CABVgOS=-vh5TqHFCq_jo=ffq8v_nggr6jspnozag3e6+19y...@mail.gmail.com/ [1] Link: https://docs.kernel.org/dev-tools/kunit/style.html [2] Signed-off-by: Luis Felipe Hernandez --- Changes in v2: Fix cc recipient list

[PATCH v2] lib/math: Add int_sqrt test suite

2024-10-24 Thread Luis Felipe Hernandez
Adds test suite for integer based square root function. The test suite is designed to verify the correctness of the int_sqrt math library function. Signed-off-by: Luis Felipe Hernandez --- lib/Kconfig.debug | 16 +++ lib/math/Makefile | 1 + lib/math/tests

[PATCH v3] lib/math: Add int_sqrt test suite

2024-10-30 Thread Luis Felipe Hernandez
Adds test suite for integer based square root function. The test suite is designed to verify the correctness of the int_sqrt() math library function. Signed-off-by: Luis Felipe Hernandez --- Changes in v2 - Add new line at the end of int_sqrt_kunit.c - Add explicit header includes for

Re: [PATCH v3] lib/math: Add int_sqrt test suite

2024-11-01 Thread Luis Felipe Hernandez
On Thu, Oct 31, 2024 at 05:39:41PM -0700, Andrew Morton wrote: > > > --- a/lib/math/Makefile > > > +++ b/lib/math/Makefile > > > @@ -9,3 +9,4 @@ obj-$(CONFIG_INT_POW_TEST) += tests/int_pow_kunit.o > > > obj-$(CONFIG_TEST_DIV64)+= test_div64.o > > > obj-$(CONFIG_TEST_MULDIV64) += te

Re: [PATCH v3] lib/math: Add int_sqrt test suite

2024-11-10 Thread Luis Felipe Hernandez
Hi David, I wanted to follow up on this patch to check if any additional fixes are needed. Additionally, I would like to address Andy Shevchenko's feedback in v2 regarding moving the lib/math/test/* Kunit test Kconfig entries from lib/Kconfig.debug to lib/tests/Kconfig? > > > > --- a/lib/Kconfi

[PATCH] lib/math: Add int_sqrt test suite

2024-10-24 Thread Luis Felipe Hernandez
Adds test suite for integer based square root function. The test suite is designed to verify the correctness of the int_sqrt math library function. Signed-off-by: Luis Felipe Hernandez --- lib/Kconfig.debug | 17 lib/math/Makefile | 1 + lib/math/tests

[PATCH] lib: math: Move kunit tests into tests/ subdir

2024-09-23 Thread Luis Felipe Hernandez
=ffq8v_nggr6jspnozag3e6+19y...@mail.gmail.com/ [1] Link: https://docs.kernel.org/dev-tools/kunit/style.html [2] Signed-off-by: Luis Felipe Hernandez --- arch/m68k/configs/amiga_defconfig | 2 +- arch/m68k/configs/apollo_defconfig | 2 +- arch/m68k

[PATCH v2] lib: math: Move kunit tests into tests/ subdir

2024-09-23 Thread Luis Felipe Hernandez
_kunit.c and kconfig entries CONFIG__KUNIT_TEST. Link: https://lore.kernel.org/all/CABVgOS=-vh5TqHFCq_jo=ffq8v_nggr6jspnozag3e6+19y...@mail.gmail.com/ [1] Link: https://docs.kernel.org/dev-tools/kunit/style.html [2] Signed-off-by: Luis Felipe Hernandez --- Changes in v2: Fix cc recipient list

Re: [PATCH v2] lib/math: Add int_sqrt test suite

2024-10-25 Thread Luis Felipe Hernandez
Thank you for your feedback and patience Andy. I apologize about the hastiness of the v2 patch. I've addressed the feedback and would like to wait for any additional reviews before sending out a v3. In the meantime I wanted to answer the questions posed to the best of my ability. > Shouldn't the

Re: [PATCH v4] lib/math: Add int_sqrt test suite

2024-12-10 Thread Luis Felipe Hernandez
On Tue, Dec 10, 2024 at 02:59:12PM -0500, Nicolas Pitre wrote: > This will fail on a 32-bit system where sizeof(long) == 32 and > ULONG_MAX == 4294967295. (meaning the result would be 65535). Thank you for taking the time to review my patch and for pointing out the issue with the ULONG_MAX test

Re: [PATCH v4] lib/math: Add int_sqrt test suite

2024-12-10 Thread Luis Felipe Hernandez
On Tue, Dec 10, 2024 at 10:58:02PM -0500, Nicolas Pitre wrote: > And for such kind of test, more values to test is not a bad thing. So > I'd suggest keeping { 4294967295, 65535 ] as well in the set as this > represents a nice > edge case. > > It wouldn't hurt adding the entire set from 0 to 9

[PATCH v4] lib/math: Add int_sqrt test suite

2024-12-10 Thread Luis Felipe Hernandez
Adds test suite for integer based square root function. The test suite is designed to verify the correctness of the int_sqrt() math library function. Signed-off-by: Luis Felipe Hernandez --- Changes in v2 - Add new line at the end of int_sqrt_kunit.c - Add explicit header includes for