[LTP] [PATCH] madvise06: wait a bit after madvise() call

Li Wang liwang@redhat.com
Thu Jul 21 07:33:12 CEST 2016


On Wed, Jul 20, 2016 at 04:37:42PM +0200, Jan Stancek wrote:
> 
> Attached is a different approach, that watches progress of SwapCached
> from /proc/meminfo and as soon as it sees 128M increase it takes that
> as PASS or gives up after 5 seconds with FAIL.
> 
> GOOD kernel:
> tst_test.c:701: INFO: Timeout per run is 300s
> madvise06.c:98: INFO: SwapCached (before madvise): 53576
> madvise06.c:113: INFO: SwapCached (after madvise): 568080
> madvise06.c:115: PASS: Regression test pass
> 
> BAD kernel:
> # ./madvise06
> tst_test.c:701: INFO: Timeout per run is 300s
> madvise06.c:98: INFO: SwapCached (before madvise): 43712
> madvise06.c:113: INFO: SwapCached (after madvise): 45636
> madvise06.c:117: FAIL: Bug has been reproduced
> 
> If you still have the setup, can you try how reliable is this approach?

Yes, it works for me. the GOOD kernel get PASS, and BAD kernel
always FAIL.

I didn't fully understand this method, could you give more
explanation in the upcoming patch?


Regards,
Li Wang


More information about the ltp mailing list