Re: [PATCH v3] lib: Convert test_printf.c to KUnit

From: Greg KH
Date: Fri Nov 06 2020 - 05:41:19 EST


On Fri, Nov 06, 2020 at 11:31:43AM +0100, Rasmus Villemoes wrote:
> On 06/11/2020 05.04, Arpitha Raghunandan wrote:
> >
> > The total number of "atoms" can be printed by maintaining a static variable
> > total_count that can be incremented as is in the original test_printf test.
> > But, the reporting of the random seed currently is done in kselftest and so
> > will not show up with KUnit. I am not really sure which is better in this case.
>
> So my real questions are: Why do we have both kselftest and kunit?

One is testing code within the kernel image testing it within
kernelspace, and one is outside the kernel testing it from userspace.

thanks,

greg k-h