* [LTP] [PATCH] lib/tst_test.c: adjust the tst_kconfig_check position
@ 2022-01-05 9:23 Yang Xu
2022-01-05 11:06 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Yang Xu @ 2022-01-05 9:23 UTC (permalink / raw)
To: ltp
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(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 23fc0ebf4..9fea7263a 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -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");
--
2.23.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] lib/tst_test.c: adjust the tst_kconfig_check position
2022-01-05 9:23 [LTP] [PATCH] lib/tst_test.c: adjust the tst_kconfig_check position Yang Xu
@ 2022-01-05 11:06 ` Cyril Hrubis
2022-01-06 2:20 ` xuyang2018.jy
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2022-01-05 11:06 UTC (permalink / raw)
To: Yang Xu; +Cc: ltp
Hi!
Good catch.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] lib/tst_test.c: adjust the tst_kconfig_check position
2022-01-05 11:06 ` Cyril Hrubis
@ 2022-01-06 2:20 ` xuyang2018.jy
0 siblings, 0 replies; 3+ messages in thread
From: xuyang2018.jy @ 2022-01-06 2:20 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril
> Hi!
> Good catch.
>
> Reviewed-by: Cyril Hrubis<chrubis@suse.cz>
Thanks for your review, merged.
Best Regards
Yang Xu
>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-06 2:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 9:23 [LTP] [PATCH] lib/tst_test.c: adjust the tst_kconfig_check position Yang Xu
2022-01-05 11:06 ` Cyril Hrubis
2022-01-06 2:20 ` xuyang2018.jy
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.