[LTP] [RFC PATCH 2/2] hugemmap33: Test to detect bug with migrating gigantic pages

Li Wang liwang@redhat.com
Mon Sep 11 10:25:31 CEST 2023


On Mon, Sep 11, 2023 at 4:11 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > > > +     if (tst_taint_check())
> > > > +             tst_res(TFAIL, "Test resulted in kernel tainted");
> > > > +     else
> > > > +             tst_res(TPASS, "Test completed successfully");
> > >
> > > tst_test.taint_check ?
> > >
> >
> > We have to keep these check sentences otherwise it will
> > complain with no reporting results.
> >
> >   tst_hugepage.c:103: TINFO: 2 hugepage(s) reserved
> >   tst_test.c:1562: TINFO: Timeout per run is 0h 01m 30s
> >   hugemmap34.c:107: TINFO: Runtime exhausted, exiting
> >   tst_test.c:1394: TBROK: Test haven't reported results!
>
> Right the .taint_check only produces TFAIL when kernel taint flags
> change during the duration of the test.
>
> We can as well do the same as we do in most of the CVE tests that have
> this line at the end of the run() function:
>
> tst_res(TPASS, "Nothing bad happened, probably.");
>

+1 this is better, but I have sent out the patch-v2, someone who
merge patch can help improve this.


> Or we can keep the tst_taint_check() in the code, but I guess that we
> are missing tst_taint_init() in the test setup(), or am I mistaken?
>

No need, tst_taint_init() has been invoked in do_setup in tst_test.c.

-- 
Regards,
Li Wang


More information about the ltp mailing list