Introduce tst_parse_opts()
The pattern that was used in all testcases is:
const char *msg;
msg = parse_opts(...);
if (msg)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
This change simplifies the steps to just calling:
tst_parse_opts(...);
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
diff --git a/testcases/kernel/mem/oom/oom02.c b/testcases/kernel/mem/oom/oom02.c
index 0d4c7c7..fce0110 100644
--- a/testcases/kernel/mem/oom/oom02.c
+++ b/testcases/kernel/mem/oom/oom02.c
@@ -47,12 +47,9 @@
int main(int argc, char *argv[])
{
- const char *msg;
int lc;
- msg = parse_opts(argc, argv, NULL, NULL);
- if (msg != NULL)
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
+ tst_parse_opts(argc, argv, NULL, NULL);
#if __WORDSIZE == 32
tst_brkm(TCONF, NULL, "test is not designed for 32-bit system.");