min_free_kbytes: Check panic_on_oom in advance
PATCH v2 1/1 min_free_kbytes: Check panic_on_oom in advance
From: Hoang Nguyen <[email protected]>
Testcase usually trigger reset if panic_on_oom is enabled by default. Add panic_on_oom checking before running.
--- testcases/kernel/mem/tunable/min_free_kbytes.c | 5 +++++ 1 file changed, 5 insertions(+)
testcases/kernel/mem/tunable/min_free_kbytes.c +5 -0
@@ -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 ;
Signature · 1 line
2.7.4
PATCH v2 1/1 min_free_kbytes: Check panic_on_oom in advance
Hi!
Quoted 10 lines
Signed-off-by Hoang Nguyen <[email protected]>--- testcases/kernel/mem/tunable/min_free_kbytes.c | 5 +++++ 1 file changed, 5 insertions(+)testcases/kernel/mem/tunable/min_free_kbytes.c +0
-0
testcases/kernel/mem/tunable/min_free_kbytes.c static void sighandler(int signo LTP_ATTRIBUTE_UNUSED) · line 245
Quoted 7 lines
testcases/kernel/mem/tunable/min_free_kbytes.c +4
-0@@ -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.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 1/1 min_free_kbytes: Check panic_on_oom in advance
Hi Cyril,
Thanks. I'll fix it in new patch.
Best regards,
Hoang
From: Cyril Hrubis <[email protected]>
To: [email protected]
Cc: [email protected]
Sent: Friday, 3 March 2017, 16:45
Subject: Re: [LTP] [PATCH v2] min_free_kbytes: Check panic_on_oom in advance
Hi!
Quoted 10 lines
Signed-off-by Hoang Nguyen <[email protected]>---
testcases/kernel/mem/tunable/min_free_kbytes.c| 5 +++++1 file changed, 5 insertions(+)testcases/kernel/mem/tunable/min_free_kbytes.c +0
-0
testcases/kernel/mem/tunable/min_free_kbytes.c static void sighandler(int signo LTP_ATTRIBUTE_UNUSED) · line 245
Quoted 7 lines
testcases/kernel/mem/tunable/min_free_kbytes.c +4
-0@@ -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.
Signature · 8 lines
Cyril Hrubis [email protected] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20170305/ffe7e7bf/attachment.html>