Re: [PATCH v3] lib: Convert test_user_copy to KUnit test

From: Vitor Massaru Iha
Date: Wed Jul 22 2020 - 18:29:21 EST


On Wed, Jul 22, 2020 at 4:45 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> On Wed, Jul 22, 2020 at 03:29:27PM -0300, Vitor Massaru Iha wrote:
> > On Tue, Jul 21, 2020 at 11:12 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> > >
> > > On Tue, Jul 21, 2020 at 07:19:12PM -0300, Vitor Massaru Iha wrote:
> > > > When you talk about end-of-test summary, is it what is written in
> > > > dmesg and not the kunit-tool?
> > >
> > > Right, if I build this as a module and do "modprobe user_copy_kunit",
> > > what will show up in dmesg?
> >
> > No, It doesn't. I'll put the messages again.
>
> Would it be possible to add that behavior to the core KUnit output? Then
> all module-based tests would include a summary line?

Nowadays with modprobe this is shown, is it necessary to add anything else?

root@(none):/# modprobe user_copy_kunit
TAP version 14
# Subtest: user_copy
1..1
random: fast init done
ok 1 - user_copy_test
ok 1 - user_copy
root@(none):/#

>
> --
> Kees Cook