* [LTP] [PATCH] lib/tst_kconfig.c: supplement config path
@ 2021-11-09 3:17 Yang Xu
2021-11-09 11:08 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Yang Xu @ 2021-11-09 3:17 UTC (permalink / raw)
To: ltp
We should add /lib/modules/$(uname -r)/build/.config for parsing.
So we can avoid parsing not-found-error when using our own compiled kernel.
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
lib/tst_kconfig.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/tst_kconfig.c b/lib/tst_kconfig.c
index 5af67b0a5..d433b8cf6 100644
--- a/lib/tst_kconfig.c
+++ b/lib/tst_kconfig.c
@@ -32,6 +32,12 @@ static const char *kconfig_path(char *path_buf, size_t path_buf_len)
uname(&un);
+ /* Common install module path */
+ snprintf(path_buf, path_buf_len, "/lib/modules/%s/build/.config", un.release);
+
+ if (!access(path_buf, F_OK))
+ return path_buf;
+
/* Debian and derivatives */
snprintf(path_buf, path_buf_len, "/boot/config-%s", un.release);
--
2.23.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] lib/tst_kconfig.c: supplement config path
2021-11-09 3:17 [LTP] [PATCH] lib/tst_kconfig.c: supplement config path Yang Xu
@ 2021-11-09 11:08 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-11-09 11:08 UTC (permalink / raw)
To: Yang Xu; +Cc: ltp
Hi!
Applied, good catch, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-09 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-09 3:17 [LTP] [PATCH] lib/tst_kconfig.c: supplement config path Yang Xu
2021-11-09 11:08 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox