min_free_kbytes : Check panic_on_oom before running
PATCH 1/1 min_free_kbytes : Check panic_on_oom before running
From: Hoang Nguyen <[email protected]>
Check panic_on_oom before running min_free_kbytes testcase.
--- testcases/kernel/mem/tunable/min_free_kbytes.c | 3 +++ 1 file changed, 3 insertions(+)
testcases/kernel/mem/tunable/min_free_kbytes.c +3 -0
@@ -71,6 +71,9 @@ int main(int argc, char *argv[])tst_parse_opts (argc, argv,NULL ,NULL ); +if (get_sys_tune ("panic_on_oom" )) +tst_brkm (TCONF ,NULL , +"panic_on_oom is set, disable it to run these testcases" ); sa.sa_handler = sighandler;if (sigemptyset (&sa.sa_mask) <0 )tst_brkm (TBROK |TERRNO , cleanup,"sigemptyset" );
Signature · 1 line
2.10.1.windows.1
PATCH 1/1 min_free_kbytes : Check panic_on_oom before running
Hi,
Just a friendly ping.
Best regards,
Hoang
On Mon, Feb 6, 2017 at 20:24, [email protected]<[email protected]> wrote: From: Hoang Nguyen <[email protected]>
Check panic_on_oom before running min_free_kbytes testcase.
--- testcases/kernel/mem/tunable/min_free_kbytes.c | 3 +++ 1 file changed, 3 insertions(+)
testcases/kernel/mem/tunable/min_free_kbytes.c +3 -0
@@ -71,6 +71,9 @@ int main(int argc, char *argv[]) tst_parse_opts(argc, argv, NULL, NULL); + if (get_sys_tune("panic_on_oom")) + tst_brkm(TCONF, NULL, + "panic_on_oom is set, disable it to run these testcases"); sa.sa_handler = sighandler; if (sigemptyset(&sa.sa_mask) < 0) tst_brkm(TBROK | TERRNO, cleanup, "sigemptyset");
Signature · 6 lines
2.10.1.windows.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20170302/0ce1d4ca/attachment.html>
PATCH 1/1 min_free_kbytes : Check panic_on_oom before running
In reply to [email protected]Hi!
testcases/kernel/mem/tunable/min_free_kbytes.c int main(int argc, char *argv[]) · line 76
Quoted 11 lines
testcases/kernel/mem/tunable/min_free_kbytes.c +3
-0@@ -71,6 +71,9 @@ int main(int argc, char *argv[])tst_parse_opts (argc, argv,NULL ,NULL ); +if (get_sys_tune ("panic_on_oom" )) +tst_brkm (TCONF ,NULL , +"panic_on_oom is set, disable it to run these testcases" );
This check should be put into the test setup() and LKML coding style prefers curly braces around multiline statemets like this.
Otherwise it looks fine.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 min_free_kbytes : Check panic_on_oom before running
Hi Cyril,
Thanks. I was thought it's one line (same as some other lines in this file eg. 109), so I tried to put them similiarBut agreed, I also prefer curly braces when coding :D I will send new patch, with moving it to setup() also.
Thanks for your review
Best regards,
Hoang
From: Cyril Hrubis <[email protected]>
To: [email protected]
Cc: [email protected]
Sent: Thursday, 2 March 2017, 23:10
Subject: Re: [LTP] [PATCH] min_free_kbytes : Check panic_on_oom before running
Hi!
Quoted 11 lines
testcases/kernel/mem/tunable/min_free_kbytes.c +0
-0@@ -71,6 +71,9 @@ int main(int argc, char *argv[])
tst_parse_opts(argc, argv, NULL, NULL);
+ if (get_sys_tune("panic_on_oom"))
+ tst_brkm(TCONF, NULL,
+ "panic_on_oomis set, disable it to run these testcases");
This check should be put into the test setup() and LKML coding style prefers curly braces around multiline statemets like this.
Otherwise it looks fine.
Signature · 8 lines
Cyril Hrubis [email protected] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20170303/cf0ad653/attachment.html>