Re: [PATCH RFC 7/7] selftests/nolibc: proof of concept for TAP output

From: Thomas Weißschuh
Date: Fri Jul 21 2023 - 09:06:56 EST


On 2023-07-20 23:29:40+0800, Zhangjin Wu wrote:
> The result looks very similar and the change seems not that big, thanks.
>
> I have a generic question: do we need to compile nolibc-test.c
> independently or at least let users easily compile nolibc-test.c in the
> other places no just in kernel source code, for example, the other libcs
> may want to download and compile it directly.
>
> The functions used in this change seems not many, is it able to provide
> our clones for them or only provide the clones when we compile them
> out-of-kernel.
>
> for example:
>
> #ifdef NOLIBC_TEST_IN_KERNEL
> /* -DNOLIBC_TEST_IN_KERNEL from Makefile, for future compatibility */
> #include "../kselftest.h"
> #else
> // our clones of the used functions, for standalone usage
> #endif

I'd rather just disable the functionality instead. Willy also asked to
stick to the current formatting by default and enable KTAP with a
switch.
So everything will be behind generic wrappers anyways, so we can drop
the KTAP functionality from those wrappers easiy.

Thomas