* [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled
@ 2014-04-28 12:26 Xiaoguang Wang
2014-04-29 7:31 ` Stanislav Kholmanskikh
2014-05-05 6:13 ` Wanlong Gao
0 siblings, 2 replies; 3+ messages in thread
From: Xiaoguang Wang @ 2014-04-28 12:26 UTC (permalink / raw)
To: ltp-list
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 <wangxg.fnst@cn.fujitsu.com>
---
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 */
--
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled
2014-04-28 12:26 [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled Xiaoguang Wang
@ 2014-04-29 7:31 ` Stanislav Kholmanskikh
2014-05-05 6:13 ` Wanlong Gao
1 sibling, 0 replies; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2014-04-29 7:31 UTC (permalink / raw)
To: Xiaoguang Wang, ltp-list
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 <wangxg.fnst@cn.fujitsu.com>
> ---
> 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 <stanislav.kholmanskikh@oracle.com>
------------------------------------------------------------------------------
"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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled
2014-04-28 12:26 [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled Xiaoguang Wang
2014-04-29 7:31 ` Stanislav Kholmanskikh
@ 2014-05-05 6:13 ` Wanlong Gao
1 sibling, 0 replies; 3+ messages in thread
From: Wanlong Gao @ 2014-05-05 6:13 UTC (permalink / raw)
To: Xiaoguang Wang; +Cc: ltp-list
On 04/28/2014 08: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 <wangxg.fnst@cn.fujitsu.com>
> ---
> testcases/kernel/mem/lib/mem.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
Applied, thank you.
Wanlong Gao
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-05 6:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 12:26 [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled Xiaoguang Wang
2014-04-29 7:31 ` Stanislav Kholmanskikh
2014-05-05 6:13 ` Wanlong Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox