<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 20, 2022 at 12:02 PM <a href="mailto:xuyang2018.jy@fujitsu.com">xuyang2018.jy@fujitsu.com</a> <<a href="mailto:xuyang2018.jy@fujitsu.com">xuyang2018.jy@fujitsu.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Li<br>
<br>
> To make kconfig parsing on RHIVOS(Red Hat In-Vehicle Operating System) correctly.<br>
> <br>
> Before:<br>
> # ./sendto03<br>
> tst_kconfig.c:65: TINFO: Couldn't locate kernel config!<br>
> tst_kconfig.c:201: TBROK: Cannot parse kernel .config<br>
> <br>
> After:<br>
> # ./sendto03<br>
> tst_kconfig.c:88: TINFO: Parsing kernel config '/lib/modules/5.14.0-174.137.el9iv.aarch64/config'<br>
> tst_test.c:1526: TINFO: Timeout per run is 0h 00m 30s<br>
> sendto03.c:91: TPASS: setsockopt(PACKET_RESERVE) value is capped: EINVAL (22)<br>
> sendto03.c:197: TPASS: Nothing bad happened, probably<br>
> <br>
> Signed-off-by: Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>><br>
> Cc: Brian Grech <<a href="mailto:bgrech@redhat.com" target="_blank">bgrech@redhat.com</a>><br>
> ---<br>
> lib/tst_kconfig.c | 6 ++++++<br>
> 1 file changed, 6 insertions(+)<br>
> <br>
> diff --git a/lib/tst_kconfig.c b/lib/tst_kconfig.c<br>
> index ac13866e8..a97489564 100644<br>
> --- a/lib/tst_kconfig.c<br>
> +++ b/lib/tst_kconfig.c<br>
> @@ -47,6 +47,12 @@ static const char *kconfig_path(char *path_buf, size_t path_buf_len)<br>
> /* Common install module path */<br>
> snprintf(path_buf, path_buf_len, "/lib/modules/%s/build/.config", un.release);<br>
> <br>
> + if (!access(path_buf, F_OK))<br>
> + return path_buf;<br>
> +<br>
> + /* RHIVOS config path */<br>
> + snprintf(path_buf, path_buf_len, "/lib/modules/%s/config", un.release);<br>
This kconfig path is also common, so<br>
Reviewed-by: Yang Xu <<a href="mailto:xuyang2018.jy@fujitsu.com" target="_blank">xuyang2018.jy@fujitsu.com</a>><br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Thanks!</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
ps: I guess RHIVOS doesn't have kconfig file in /boot directory, so it <br>
can't be parsed. Is it right?<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">That's right. And I would leave this patch one more day for others to review.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>