]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dma-buf: Change st-dma-resv.c to use kunit
authorJason Gunthorpe <jgg@nvidia.com>
Sun, 1 Mar 2026 18:57:53 +0000 (14:57 -0400)
committerChristian König <christian.koenig@amd.com>
Thu, 16 Apr 2026 10:34:00 +0000 (12:34 +0200)
commit15b9bde78baddc278aaa8fb99590871efe1b494a
tree81c6d69871eb4b869565e7de92e4093d3002a1c1
parent5b03d4907db93627ef48396f39c3455ce644c946
dma-buf: Change st-dma-resv.c to use kunit

Modernize the open coded test framework by using kunit.

The kunit tool can be used to build a kernel and run it in a VM with:

$ tools/testing/kunit/kunit.py run --build_dir build_kunit_x86_64 --arch x86_64 --kunitconfig ./drivers/dma-buf/.kunitconfig

Along with the other ways to run kunits.

To make the kunit tool work like this the DMABUF_KUNIT_TEST kconfig must
select DMA_SHARED_BUFFER to get it turned on without building a driver
using it.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/1-v1-0a349a394eff+14110-dmabuf_kunit_jgg@nvidia.com
drivers/dma-buf/.kunitconfig [new file with mode: 0644]
drivers/dma-buf/Kconfig
drivers/dma-buf/Makefile
drivers/dma-buf/selftests.h
drivers/dma-buf/st-dma-resv.c