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
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
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
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
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
_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
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
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
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
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
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
=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
_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
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
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
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
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
17 matches
Mail list logo