Re: [PATCH] scsi: core: Make scsi_lib KUnit tests modular for real

From: Bart Van Assche
Date: Tue Mar 19 2024 - 12:04:07 EST


On 3/19/24 05:02, Geert Uytterhoeven wrote:
While SCSI_LIB_KUNIT_TEST is a tristate config symbol, configuring a
modular build of this test does not do anything: as the test code is
just included by the mid layer code, it only works in the built-in case.

Fix this by converting the test to a stand-alone module. This requires
exporting scsi_check_passthrough() and adding a MODULE_LICENSE() tag.

I don't like it that scsi_check_passthrough() is exported so that counts
as a disadvantage of this patch. Why to convert scsi_lib_test into a
kernel module? What are the advantages compared to the current approach?
That information is missing from the patch description.

Thanks,

Bart.