[LTP] [PATCH] kconfig: adding new config path
xuyang2018.jy@fujitsu.com
xuyang2018.jy@fujitsu.com
Thu Oct 20 06:01:26 CEST 2022
Hi Li
> To make kconfig parsing on RHIVOS(Red Hat In-Vehicle Operating System) correctly.
>
> Before:
> # ./sendto03
> tst_kconfig.c:65: TINFO: Couldn't locate kernel config!
> tst_kconfig.c:201: TBROK: Cannot parse kernel .config
>
> After:
> # ./sendto03
> tst_kconfig.c:88: TINFO: Parsing kernel config '/lib/modules/5.14.0-174.137.el9iv.aarch64/config'
> tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s
> sendto03.c:91: TPASS: setsockopt(PACKET_RESERVE) value is capped: EINVAL (22)
> sendto03.c:197: TPASS: Nothing bad happened, probably
>
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Brian Grech <bgrech@redhat.com>
> ---
> lib/tst_kconfig.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/lib/tst_kconfig.c b/lib/tst_kconfig.c
> index ac13866e8..a97489564 100644
> --- a/lib/tst_kconfig.c
> +++ b/lib/tst_kconfig.c
> @@ -47,6 +47,12 @@ static const char *kconfig_path(char *path_buf, size_t path_buf_len)
> /* 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;
> +
> + /* RHIVOS config path */
> + snprintf(path_buf, path_buf_len, "/lib/modules/%s/config", un.release);
This kconfig path is also common, so
Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>
ps: I guess RHIVOS doesn't have kconfig file in /boot directory, so it
can't be parsed. Is it right?
Best Regards
Yang Xu
> +
> if (!access(path_buf, F_OK))
> return path_buf;
>
More information about the ltp
mailing list