All of lore.kernel.org
 help / color / mirror / Atom feed
From: Han Pingtian <hanpt@linux.vnet.ibm.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mem/oom: remove non-existent case OVERCOMMIT from oom()
Date: Mon, 28 Dec 2015 15:49:19 +0800	[thread overview]
Message-ID: <20151228074919.GA12782@localhost.localdomain> (raw)

Looks like there is no such a case "OVERCOMMIT" in oom(), so we can just
remove it.

Signed-off-by: Han Pingtian <hanpt@linux.vnet.ibm.com>
---
 testcases/kernel/mem/include/mem.h | 7 +++----
 testcases/kernel/mem/lib/mem.c     | 2 +-
 testcases/kernel/mem/oom/oom01.c   | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/mem/include/mem.h b/testcases/kernel/mem/include/mem.h
index 4a18799..041c437 100644
--- a/testcases/kernel/mem/include/mem.h
+++ b/testcases/kernel/mem/include/mem.h
@@ -32,10 +32,9 @@ static inline void clean_node(unsigned long *array)
 
 #define LENGTH			(3UL<<30)
 #define TESTMEM			(1UL<<30)
-#define OVERCOMMIT		1
-#define NORMAL			2
-#define MLOCK			3
-#define KSM			4
+#define NORMAL			1
+#define MLOCK			2
+#define KSM			3
 
 long overcommit;
 void oom(int testcase, int lite, int retcode, int allow_sigkill);
diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
index cee4e91..56104cb 100644
--- a/testcases/kernel/mem/lib/mem.c
+++ b/testcases/kernel/mem/lib/mem.c
@@ -110,7 +110,7 @@ out:
  * oom - allocates memory according to specified testcase and checks
  *       desired outcome (e.g. child killed, operation failed with ENOMEM)
  * @testcase: selects how child allocates memory
- *            valid choices are: OVERCOMMIT, NORMAL, MLOCK and KSM
+ *            valid choices are: NORMAL, MLOCK and KSM
  * @lite: if non-zero, child makes only single TESTMEM+MB allocation
  *        if zero, child keeps allocating memory until it gets killed
  *        or some operation fails
diff --git a/testcases/kernel/mem/oom/oom01.c b/testcases/kernel/mem/oom/oom01.c
index 712d7b5..e39394b 100644
--- a/testcases/kernel/mem/oom/oom01.c
+++ b/testcases/kernel/mem/oom/oom01.c
@@ -58,12 +58,12 @@ int main(int argc, char *argv[])
 
 		/* we expect mmap to fail before OOM is hit */
 		set_sys_tune("overcommit_memory", 2, 1);
-		oom(OVERCOMMIT, 0, ENOMEM, 0);
+		oom(NORMAL, 0, ENOMEM, 0);
 
 		/* with overcommit_memory set to 0 or 1 there's no
 		 * guarantee that mmap fails before OOM */
 		set_sys_tune("overcommit_memory", 0, 1);
-		oom(OVERCOMMIT, 0, ENOMEM, 1);
+		oom(NORMAL, 0, ENOMEM, 1);
 
 		set_sys_tune("overcommit_memory", 1, 1);
 		testoom(0, 0, ENOMEM, 1);
-- 
1.9.3


             reply	other threads:[~2015-12-28  7:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28  7:49 Han Pingtian [this message]
2016-01-07 11:57 ` [LTP] [PATCH] mem/oom: remove non-existent case OVERCOMMIT from oom() Jan Stancek
2016-01-07 14:54   ` Cyril Hrubis
2016-01-08  6:59   ` Han Pingtian
2016-01-08  7:42     ` Jan Stancek
2016-01-11  6:08       ` Han Pingtian
2016-01-26 14:14 ` Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2015-12-28  7:20 Han Pingtian

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=20151228074919.GA12782@localhost.localdomain \
    --to=hanpt@linux.vnet.ibm.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.