Re: [PATCH v2] Documentation: KUnit: Update the instructions on how to test static functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 9 Jan 2024 at 04:24, Arthur Grillo <arthurgrillo@xxxxxxxxxx> wrote:
>
> Now that we have the VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT macros,
> update the instructions to stop recommending including .c files.
>
> Signed-off-by: Arthur Grillo <arthurgrillo@xxxxxxxxxx>
> ---
> Changes in v2:
> - Fix #if condition
> - Link to v1: https://lore.kernel.org/r/20240108-kunit-doc-export-v1-1-119368df0d96@xxxxxxxxxx
> ---

Thanks very much: I think we definitely should be recommending
VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT more.

I do wonder, though, whether we should also keep the conditional
``#include`` example. There are some tests already using it, and it
can be more convenient than exporting lots of symbols in some cases. I
still think we should encourage the
VISIBLE_IF_KUNIT/EXPORT_SYMBOL_IF_KUNIT features more, but maybe we
leave the existing documentation there underneath. (e.g.
"Alternatively, we can conditionally…")

Otherwise, this looks good, and if people think that we should avoid
recommending the conditional-#include method (which _is_ ugly), then
I'm happy to accept this as-is.

Thoughts?

-- David

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux