[LTP] [PATCH v4 2/2] swapping01.c: Reporting /proc/meminfo during test

Petr Vorel pvorel@suse.cz
Mon Dec 18 14:47:55 CET 2023


> Hi Wei,

> > Get clear overview memory status during test is good for debug, such as
> > get report before the test and also at the moment of the failure.

> > Signed-off-by: Wei Gao <wegao@suse.com>
> > ---
> >  testcases/kernel/mem/swapping/swapping01.c | 4 ++++
> >  1 file changed, 4 insertions(+)

> > diff --git a/testcases/kernel/mem/swapping/swapping01.c b/testcases/kernel/mem/swapping/swapping01.c
> > index fc225e4a6..025f44363 100644
> > --- a/testcases/kernel/mem/swapping/swapping01.c
> > +++ b/testcases/kernel/mem/swapping/swapping01.c
> > @@ -83,7 +83,9 @@ static void test_swapping(void)

> >  	switch (pid = SAFE_FORK()) {
> >  	case 0:
> > +		TST_PRINT_MEMINFO();
> >  		do_alloc(0);
> > +		TST_PRINT_MEMINFO();
> Developer asked you to print /proc/meminfo "before the test starts and at the
> moment of the failure" Wouldn't be just this second TST_PRINT_MEMINFO() enough?

OK, I merged this. Thank you.

Kind regards,
Petr

> Kind regards,
> Petr

> >  		do_alloc(1);
> >  		exit(0);


More information about the ltp mailing list