From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Replace the dmabuf custom test framework with kunit Date: Tue, 03 Mar 2026 13:50:31 +1000 Message-ID: In-Reply-To: <0-v1-0a349a394eff+14110-dmabuf_kunit_jgg@nvidia.com> References: <0-v1-0a349a394eff+14110-dmabuf_kunit_jgg@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: Replace the dmabuf custom test framework with kunit Author: Jason Gunthorpe Patches: 9 Reviewed: 2026-03-03T13:50:31.749534 --- This is a well-executed, mechanical conversion of the dma-buf self-test framework from a custom module_init-based test harness to kunit. The series is cleanly structured: patches 1-4 each migrate one test file from the old framework to kunit (moving it from the `dmabuf_selftests` module to `dmabuf_kunit`), and patch 5 removes the now-empty old framework. The conversion patterns described in the cover letter are applied consistently throughout: `KUNIT_ASSERT_NOT_NULL` for fatal allocation failures, `KUNIT_FAIL` + goto for errors needing cleanup, and `KUNIT_EXPECT_EQ` for final result checks. The use of `KUNIT_ARRAY_PARAM_DESC` for the `dma_resv_usage` parameterization in patch 1 is a good fit. The `kunit_skip` for the multi-CPU race test in patch 2 is the right approach. Multiple `kunit_test_suite()` calls across the constituent .o files work correctly because the macro uses `__UNIQUE_ID` and linker section placement rather than `module_init()`. Overall the series is in good shape and I only found minor issues. No functional bugs were identified. **Issues found (all minor):** - One typo introduced in patch 2 ("on HZ" should be "one HZ") - One stray trailing `\n` in a KUNIT_FAIL message in patch 1 - Some dead code (`r = -EINVAL` assignments) left inconsistently across cleanup paths - Unnecessary `suite_init` in patch 2 --- Generated by Claude Code Patch Reviewer