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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 26, 2024 at 11:39:33PM +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

...

> +#include <kunit/test.h>
> +#include <linux/gcd.h>
> +#include <linux/lcm.h>

+ math.h (where abs()/DIV_ROUND_*()/etc come from?)
I believe I mentioned that.

> +#include <linux/reciprocal_div.h>

...

> +MODULE_LICENSE("GPL");

modpost validator won't be happy about this, i.e. missing MODULE_DESCRIPTION().

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux