[LTP] [RFC PATCH v2 1/7] m4: Fix libkeyutils detection on 32-bit cross build

Petr Vorel pvorel@suse.cz
Mon Oct 9 19:04:01 CEST 2017


Hi Cyril,

thanks for your review, all the suggestions and finding typos for this patch-set.
I'll put them into v3.

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> >  configure.ac       | 1 +
> >  m4/ltp-keyutils.m4 | 6 +++---
> >  2 files changed, 4 insertions(+), 3 deletions(-)

> > diff --git a/configure.ac b/configure.ac
> > index 458a5b13f..0bae6ce3f 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -36,6 +36,7 @@ AC_CHECK_HEADERS([ \
> >      mm.h \
> >      pthread.h \
> >      sys/xattr.h \
> > +    keyutils.h \
> >      linux/genetlink.h \
> >      linux/mempolicy.h \
> >      linux/module.h \
> > diff --git a/m4/ltp-keyutils.m4 b/m4/ltp-keyutils.m4
> > index 74b7d3249..1434ca823 100644
> > --- a/m4/ltp-keyutils.m4
> > +++ b/m4/ltp-keyutils.m4
> > @@ -18,7 +18,7 @@ dnl
> >  dnl LTP_CHECK_KEYUTILS_SUPPORT
> >  dnl ----------------------------
> >  dnl
> > -AC_DEFUN([LTP_CHECK_KEYUTILS_SUPPORT],[
> > -AC_CHECK_HEADERS([keyutils.h], [keyutils_libs="-lkeyutils"])
> > -AC_SUBST([KEYUTILS_LIBS], [$keyutils_libs])
> > +AC_DEFUN([LTP_CHECK_KEYUTILS_SUPPORT], [
> > +	AC_CHECK_LIB([keyutils], [add_key], [keyutils_libs="-lkeyutils"])
> > +	AC_SUBST([KEYUTILS_LIBS], [$keyutils_libs])
> >  ])

> Okay, this fixes most of the problems, but the request_key tests are
> still broken as far as I can tell. Since these use #ifdef
> HAVE_KEYUTILS_H, which will still fail if 64bit library is present but
> not the 32bit one, right? I suppose that it fails with missing symbols
> for add_key() and request_key().
Yep, you're right :-(.

> Afaik these should be converted to make use of the lapi/keyctl.h header
> just like the add_key tests, right? Or did I miss something?
Sure. I've noticed that, but today after firing v2.


Kind regards,
Petr


More information about the ltp mailing list