[LTP] [PATCH] kconfig: adding new config path

Li Wang liwang@redhat.com
Thu Oct 20 07:52:26 CEST 2022


On Thu, Oct 20, 2022 at 12:02 PM xuyang2018.jy@fujitsu.com <
xuyang2018.jy@fujitsu.com> wrote:

> 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>
>

Thanks!


> ps: I guess  RHIVOS doesn't have kconfig file in /boot directory, so it
> can't be parsed. Is it right?
>

That's right. And I would leave this patch one more day for others to
review.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20221020/1a709899/attachment.htm>


More information about the ltp mailing list