Oom01 case will modify "/proc/sys/vm/overcommit_memory" to have tests. In most 
systems,
the overcommit_memory's default value is 0. When running oom01, if KSM 
configuration
is not enabled, "tst_brkm(TCONF, NULL, ...)" will be called, in this case, we 
will forget
to execute the restore operation defined in cleanup, 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
index f145a2a..69a9014 100644
--- a/testcases/kernel/mem/lib/mem.c
+++ b/testcases/kernel/mem/lib/mem.c
@@ -146,7 +146,7 @@ void testoom(int mempolicy, int lite)
        oom(MLOCK, lite);
 
        if (access(PATH_KSM, F_OK) == -1)
-               tst_brkm(TCONF, NULL, "KSM configuration is not enabled");
+               tst_brkm(TCONF, cleanup, "KSM configuration is not enabled");
 
        tst_resm(TINFO, "start OOM testing for KSM pages.");
        oom(KSM, lite);
-- 
1.8.2.1


------------------------------------------------------------------------------
"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

Reply via email to