@@ -1016,9 +1016,6 @@ static void do_setup(int argc, char *argv[])
if (tst_test->tconf_msg)
tst_brk(TCONF, "%s", tst_test->tconf_msg);
- if (tst_test->needs_kconfigs)
- tst_kconfig_check(tst_test->needs_kconfigs);
-
assert_test_fn();
TCID = tid = get_tid(argv);
@@ -1028,6 +1025,9 @@ static void do_setup(int argc, char *argv[])
parse_opts(argc, argv);
+ if (tst_test->needs_kconfigs)
+ tst_kconfig_check(tst_test->needs_kconfigs);
+
if (tst_test->needs_root && geteuid() != 0)
tst_brk(TCONF, "Test needs to be run as root");
Since tst_kconfig_check is front of parse_opts, then running test_kconfig01 -h can not get the print_help info. Fix this by moving tst_kconfig_check behind parse_opts. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> --- lib/tst_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)