Hi! On 04/28/2014 04:26 PM, Xiaoguang Wang wrote: > When kernel KSM configuration is not enabled, we make testcases continue to > run > instead of returning TCONF, e.g. oom01. And if KSM configuration is not > enabled, in > the original code, "tst_brkm(TCONF, NULL, ...)" will be called, in this case, > we > will forget to execute the restore operations defined in cleanup, which will > forget > to restore the /proc/sys/vm/overcommit_memory to 0, and this will impact > other test > cases in LTP, for example, fork14 in RHEL5 will succeed unexpectedly. > > Signed-off-by: Xiaoguang Wang <[email protected]> > --- > testcases/kernel/mem/lib/mem.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c > index 188a5ef..b975c62 100644 > --- a/testcases/kernel/mem/lib/mem.c > +++ b/testcases/kernel/mem/lib/mem.c > @@ -146,11 +146,13 @@ void testoom(int mempolicy, int lite) > tst_resm(TINFO, "start OOM testing for mlocked pages."); > oom(MLOCK, lite); > > - if (access(PATH_KSM, F_OK) == -1) > - tst_brkm(TCONF, NULL, "KSM configuration is not enabled"); > - > - tst_resm(TINFO, "start OOM testing for KSM pages."); > - oom(KSM, lite); > + if (access(PATH_KSM, F_OK) == -1) { > + tst_resm(TINFO, "KSM configuration is not enabled, " > + "skip OOM test for KSM pags"); > + } else { > + tst_resm(TINFO, "start OOM testing for KSM pages."); > + oom(KSM, lite); > + } > } > > /* KSM */ >
Took kernel 3.14.0, compiled without CONFIG_KSM set and booted with 'numa=fake=4' (I have a 4-core Intel desktop). All oom0* tests passed. Acked-by: Stanislav Kholmanskikh <[email protected]> ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
