[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWzD1OR8qj8oHfUgQ9GMtrD8y69G+A+ONdVm0vTCvYe=w@mail.gmail.com>
Date: Tue, 19 Mar 2024 17:10:59 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Bart Van Assche <bvanassche@....org>
Cc: Mike Christie <michael.christie@...cle.com>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>, "Martin K . Petersen" <martin.petersen@...cle.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: core: Make scsi_lib KUnit tests modular for real
Hoi Bart,
On Tue, Mar 19, 2024 at 5:03 PM Bart Van Assche <bvanassche@....org> wrote:
> 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
Perhaps the exported symbol should be __scsi_check_passthrough(),
to make it clearer this is not meant for general use?
> kernel module? What are the advantages compared to the current approach?
> That information is missing from the patch description.
SCSI_LIB_KUNIT_TEST is already tristate, so the original author must
have meant it to be modular. Or perhaps he just copied it from
(most/all) other tests ;-)
Anyway, I find it very useful to be able to do "modprobe kunit" and
"modprobe <test>" to run a test when I feel the need to do so.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists