* [LTP] [PATCH] [COMMITTED] lib/tst_test.c: Move parse_opts() up
@ 2017-07-27 9:20 Cyril Hrubis
0 siblings, 0 replies; only message in thread
From: Cyril Hrubis @ 2017-07-27 9:20 UTC (permalink / raw)
To: ltp
Move parse_opts() before check for root, minimal kernel version, etc. So
that -h works regardless of the restrictions for test execution.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
lib/tst_test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 16ea64fe9..51d39438d 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -675,6 +675,8 @@ static void do_setup(int argc, char *argv[])
if (!tst_test->tid)
tst_test->tid = get_tid(argv);
+ parse_opts(argc, argv);
+
if (tst_test->needs_root && geteuid() != 0)
tst_brk(TCONF, "Test needs to be run as root");
@@ -689,8 +691,6 @@ static void do_setup(int argc, char *argv[])
tst_test->format_device = 1;
}
- parse_opts(argc, argv);
-
setup_ipc();
if (needs_tmpdir() && !tst_tmpdir_created())
--
2.13.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-27 9:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27 9:20 [LTP] [PATCH] [COMMITTED] lib/tst_test.c: Move parse_opts() up Cyril Hrubis
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.