From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH V2 3/3] mm/oom: enable ksm before OOM-KSM testing
Date: Thu, 31 Mar 2016 15:52:05 +0200 [thread overview]
Message-ID: <20160331135204.GD21298@rei.lan> (raw)
In-Reply-To: <1458707157-31233-3-git-send-email-liwang@redhat.com>
Hi!
> void testoom(int mempolicy, int lite, int retcode, int allow_sigkill)
> {
> + int ksm_run_orig;
> +
> set_global_mempolicy(mempolicy);
>
> tst_resm(TINFO, "start normal OOM testing.");
> @@ -224,7 +226,10 @@ void testoom(int mempolicy, int lite, int retcode, int allow_sigkill)
> "skip OOM test for KSM pags");
> } else {
> tst_resm(TINFO, "start OOM testing for KSM pages.");
> + SAFE_FILE_SCANF(cleanup, PATH_KSM "run", "%d", &ksm_run_orig);
> + SAFE_FILE_PRINTF(cleanup, PATH_KSM "run", "1");
> oom(KSM, lite, retcode, allow_sigkill);
> + SAFE_FILE_PRINTF(cleanup,PATH_KSM "run", "%d", ksm_run_orig);
^
missing space
Technically the oom() can actually exit the test execution (calls
tst_brkm()) so it would be a bit better if the value was restored in the
test cleanup. But I guess that it's unlikely to happen and we can
proceed with this patch.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-03-31 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 4:25 [LTP] [PATCH V2 1/3] mm/ksm: taking use of SAFE_FILE_ macro for ksm05.c Li Wang
2016-03-23 4:25 ` [LTP] [PATCH V2 2/3] mm/ksm: extend 'max_page_sharing' before ksm testing Li Wang
2016-03-23 4:25 ` [LTP] [PATCH V2 3/3] mm/oom: enable ksm before OOM-KSM testing Li Wang
2016-03-31 13:52 ` Cyril Hrubis [this message]
2016-04-01 9:45 ` Li Wang
2016-03-31 13:31 ` [LTP] [PATCH V2 2/3] mm/ksm: extend 'max_page_sharing' before ksm testing Cyril Hrubis
2016-04-01 6:18 ` Li Wang
2016-04-07 13:38 ` Cyril Hrubis
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=20160331135204.GD21298@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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