]> git.ipfire.org Git - thirdparty/linux.git/commit
lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 19 May 2026 17:22:58 +0000 (20:22 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:51 +0000 (21:24 -0700)
commit6bba2ae43e8f379d3bed4c3eb258ea6d81baae80
tree034c01038c58e99a1977f2da6e9a5b5ab3278ebf
parenta354b8de9ad607c0a11419a402df46b46503f921
lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()

Add KUnit tests for '__ashldi3()', '__ashrdi3()', and '__lshrdi3()' helper
functions used to implement 64-bit arithmetic shift left, arithmetic shift
right and logical shift right, respectively, on a 32-bit CPUs.

Tested with 'qemu-system-riscv32 -M virt' and 'qemu-system-arm -M virt'.

Link: https://lore.kernel.org/20260519172259.908980-8-dmantipov@yandex.ru
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Tested-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
Assisted-by: Gemini:gemini-3.1-pro-preview sashiko
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/Kconfig.debug
lib/tests/Makefile
lib/tests/shdi3_kunit.c [new file with mode: 0644]