From: the_hoang0709@yahoo.com <the_hoang0709@yahoo.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
Date: Fri, 3 Mar 2017 08:18:01 +0700 [thread overview]
Message-ID: <1488503881-1954-1-git-send-email-the_hoang0709@yahoo.com> (raw)
From: Hoang Nguyen <the_hoang0709@yahoo.com>
Testcase usually trigger reset if panic_on_oom is enabled by default.
Add panic_on_oom checking before running.
Signed-off-by: Hoang Nguyen <the_hoang0709@yahoo.com>
---
testcases/kernel/mem/tunable/min_free_kbytes.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c
index cb00f40..1f6fc8f 100644
--- a/testcases/kernel/mem/tunable/min_free_kbytes.c
+++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
@@ -239,6 +239,11 @@ static void sighandler(int signo LTP_ATTRIBUTE_UNUSED)
void setup(void)
{
tst_require_root();
+ if (get_sys_tune("panic_on_oom")) {
+ tst_brkm(TCONF, NULL,
+ "panic_on_oom is set, disable it to run these testcases");
+ }
+
tst_sig(FORK, DEF_HANDLER, cleanup);
TEST_PAUSE;
--
2.7.4
next reply other threads:[~2017-03-03 1:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 1:18 the_hoang0709 [this message]
2017-03-03 1:21 ` [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance Hoang Nguyen
2017-03-03 1:20 the_hoang0709
2017-03-03 9:45 ` Cyril Hrubis
2017-03-05 4:02 ` Hoang Nguyen
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=1488503881-1954-1-git-send-email-the_hoang0709@yahoo.com \
--to=the_hoang0709@yahoo.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.