From: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>,
ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v2] kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled
Date: Tue, 29 Apr 2014 11:31:06 +0400 [thread overview]
Message-ID: <535F553A.2070900@oracle.com> (raw)
In-Reply-To: <1398687969-16853-1-git-send-email-wangxg.fnst@cn.fujitsu.com>
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
next prev parent reply other threads:[~2014-04-29 7:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-05-05 6:13 ` Wanlong Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=535F553A.2070900@oracle.com \
--to=stanislav.kholmanskikh@oracle.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=wangxg.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox