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

From: Andy Shevchenko
Date: Fri May 31 2024 - 13:40:22 EST


On Fri, May 31, 2024 at 10:43:05PM +0530, Devarsh Thakkar wrote:
> From: Daniel Latypov <dlatypov@xxxxxxxxxx>
>
> Add basic test coverage for files that don't require any config options:
> * part of math.h (what seem to be the most commonly used macros)
> * gcd.c
> * lcm.c
> * int_sqrt.c
> * reciprocal_div.c
> (Ignored int_pow.c since it's a simple textbook algorithm.)
>
> These tests aren't particularly interesting, but they
> * provide short and simple examples of parameterized tests
> * provide a place to add tests for any new files in this dir
> * are written so adding new test cases to cover edge cases should be
> easy
> * looking at code coverage, we hit all the branches in the .c files

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko