All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP]  [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
@ 2017-03-03  1:20 the_hoang0709
  2017-03-03  9:45 ` Cyril Hrubis
  0 siblings, 1 reply; 5+ messages in thread
From: the_hoang0709 @ 2017-03-03  1:20 UTC (permalink / raw)
  To: ltp

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
  2017-03-03  1:20 [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance the_hoang0709
@ 2017-03-03  9:45 ` Cyril Hrubis
  2017-03-05  4:02   ` Hoang Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2017-03-03  9:45 UTC (permalink / raw)
  To: ltp

Hi!
> 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");
> +    }

Now the indentation is wrong, please make sure to use tabs. FYI you can
use checkpatch.pl from kernel git repo to check patches before sending
them for review.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
  2017-03-03  9:45 ` Cyril Hrubis
@ 2017-03-05  4:02   ` Hoang Nguyen
  0 siblings, 0 replies; 5+ messages in thread
From: Hoang Nguyen @ 2017-03-05  4:02 UTC (permalink / raw)
  To: ltp

Hi Cyril,
Thanks. I'll fix it in new patch.
Best regards,
Hoang

      From: Cyril Hrubis <chrubis@suse.cz>
 To: the_hoang0709@yahoo.com 
Cc: ltp@lists.linux.it
 Sent: Friday, 3 March 2017, 16:45
 Subject: Re: [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
   
Hi!
> 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");
> +    }

Now the indentation is wrong, please make sure to use tabs. FYI you can
use checkpatch.pl from kernel git repo to check patches before sending
them for review.

-- 
Cyril Hrubis
chrubis@suse.cz


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170305/ffe7e7bf/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
  2017-03-03  1:18 the_hoang0709
@ 2017-03-03  1:21 ` Hoang Nguyen
  0 siblings, 0 replies; 5+ messages in thread
From: Hoang Nguyen @ 2017-03-03  1:21 UTC (permalink / raw)
  To: ltp

Hi,
Sorry I for spam. I missed LTP in the subject. Please ignore this. I sent another mail.
Best regards,
Hoang      From: "the_hoang0709@yahoo.com" <the_hoang0709@yahoo.com>
 To: ltp@lists.linux.it 
Cc: the_hoang0709@yahoo.com
 Sent: Friday, 3 March 2017, 8:18
 Subject: [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
   
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 part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20170303/b2f44d97/attachment.html>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
@ 2017-03-03  1:18 the_hoang0709
  2017-03-03  1:21 ` Hoang Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: the_hoang0709 @ 2017-03-03  1:18 UTC (permalink / raw)
  To: ltp

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-05  4:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03  1:20 [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance the_hoang0709
2017-03-03  9:45 ` Cyril Hrubis
2017-03-05  4:02   ` Hoang Nguyen
  -- strict thread matches above, loose matches on Subject: below --
2017-03-03  1:18 the_hoang0709
2017-03-03  1:21 ` Hoang Nguyen

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.