]> git.ipfire.org Git - thirdparty/linux.git/commit
test_bits: add tests for GENMASK_U*()
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 25 Mar 2025 16:00:00 +0000 (01:00 +0900)
committerYury Norov <yury.norov@gmail.com>
Tue, 29 Apr 2025 19:58:38 +0000 (15:58 -0400)
commit0405eef6c3bc7d3322f8ceb11a25ad2bea5559f9
treef3f227895565dd59d893d5294e402a22c9a25807
parent4fd225f7adbce0cc9204e918758158fa8eb07b33
test_bits: add tests for GENMASK_U*()

Add some additional tests in lib/tests/test_bits.c to cover the
expected/non-expected values of the fixed-type GENMASK_U*() macros.

Also check that the result value matches the expected type. Since
those are known at build time, use static_assert() instead of normal
kunit tests.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
lib/tests/test_bits.c