* [LTP] [COMMITTED][PATCH 1/1] cpuset: Detect missing fts.h
@ 2019-03-21 22:36 Petr Vorel
2019-03-22 11:36 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2019-03-21 22:36 UTC (permalink / raw)
To: ltp
This fixes build on uClibc with disabled fts.h support and MUSL, which
does not have fts.h at all.
Reported-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
configure.ac | 1 +
include/mk/config.mk.in | 1 +
m4/ltp-fts.m4 | 7 +++++++
testcases/kernel/controllers/Makefile | 4 ++++
4 files changed, 13 insertions(+)
create mode 100644 m4/ltp-fts.m4
diff --git a/configure.ac b/configure.ac
index e002c248e..f05db9d2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU
LTP_CHECK_PERF_EVENT
LTP_CHECK_SYNCFS
LTP_CHECK_SYNC_FILE_RANGE
+LTP_CHECK_FTS_H
if test "x$with_numa" = xyes; then
LTP_CHECK_SYSCALL_NUMA
diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index 01f178bff..d55fe9602 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -46,6 +46,7 @@ SELINUX_LIBS := @SELINUX_LIBS@
TIRPC_CPPFLAGS := @TIRPC_CPPFLAGS@
TIRPC_LIBS := @TIRPC_LIBS@
KEYUTILS_LIBS := @KEYUTILS_LIBS@
+HAVE_FTS_H := @HAVE_FTS_H@
prefix := @prefix@
diff --git a/m4/ltp-fts.m4 b/m4/ltp-fts.m4
new file mode 100644
index 000000000..0da692f23
--- /dev/null
+++ b/m4/ltp-fts.m4
@@ -0,0 +1,7 @@
+dnl SPDX-License-Identifier: GPL-2.0-or-later
+dnl Copyright (c) 2019 Petr Vorel <petr.vorel@gmail.com>
+
+AC_DEFUN([LTP_CHECK_FTS_H],[
+ AC_CHECK_HEADERS(fts.h, [have_fts=1])
+ AC_SUBST(HAVE_FTS_H, $have_fts)
+])
diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile
index 404073947..548692cb8 100644
--- a/testcases/kernel/controllers/Makefile
+++ b/testcases/kernel/controllers/Makefile
@@ -29,6 +29,10 @@ LIBDIR := libcontrollers
LIB := $(LIBDIR)/libcontrollers.a
FILTER_OUT_DIRS := $(LIBDIR)
+ifneq ($(HAVE_FTS_H),1)
+ FILTER_OUT_DIRS += cpuset
+endif
+
$(LIBDIR):
mkdir -p "$@"
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [COMMITTED][PATCH 1/1] cpuset: Detect missing fts.h
2019-03-21 22:36 [LTP] [COMMITTED][PATCH 1/1] cpuset: Detect missing fts.h Petr Vorel
@ 2019-03-22 11:36 ` Cyril Hrubis
2019-03-24 23:33 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2019-03-22 11:36 UTC (permalink / raw)
To: ltp
Hi!
> diff --git a/configure.ac b/configure.ac
> index e002c248e..f05db9d2e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU
> LTP_CHECK_PERF_EVENT
> LTP_CHECK_SYNCFS
> LTP_CHECK_SYNC_FILE_RANGE
> +LTP_CHECK_FTS_H
Any reason why we couldn't simply put the fts.h at the end of the
AC_CHECK_HEADERS() list in configure.ac?
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [COMMITTED][PATCH 1/1] cpuset: Detect missing fts.h
2019-03-22 11:36 ` Cyril Hrubis
@ 2019-03-24 23:33 ` Petr Vorel
2019-03-26 9:07 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2019-03-24 23:33 UTC (permalink / raw)
To: ltp
Hi Cyril,
> > diff --git a/configure.ac b/configure.ac
> > index e002c248e..f05db9d2e 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU
> > LTP_CHECK_PERF_EVENT
> > LTP_CHECK_SYNCFS
> > LTP_CHECK_SYNC_FILE_RANGE
> > +LTP_CHECK_FTS_H
> Any reason why we couldn't simply put the fts.h at the end of the
> AC_CHECK_HEADERS() list in configure.ac?
Yes, without AC_SUBST the result is not visible to make (it's just in config.h).
Or am I wrong? That was the reason, why I didn't take [1] this patch [2].
Anyway, I'm sorry, I thought it's simple enough not to be reviewed, but next
time I'll send it to ML.
Kind regards,
Petr
[1] http://lists.linux.it/pipermail/ltp/2019-March/011428.html
[2] https://patchwork.ozlabs.org/patch/1058067/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [COMMITTED][PATCH 1/1] cpuset: Detect missing fts.h
2019-03-24 23:33 ` Petr Vorel
@ 2019-03-26 9:07 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2019-03-26 9:07 UTC (permalink / raw)
To: ltp
Hi!
> > > diff --git a/configure.ac b/configure.ac
> > > index e002c248e..f05db9d2e 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -235,6 +235,7 @@ LTP_DETECT_HOST_CPU
> > > LTP_CHECK_PERF_EVENT
> > > LTP_CHECK_SYNCFS
> > > LTP_CHECK_SYNC_FILE_RANGE
> > > +LTP_CHECK_FTS_H
>
> > Any reason why we couldn't simply put the fts.h at the end of the
> > AC_CHECK_HEADERS() list in configure.ac?
> Yes, without AC_SUBST the result is not visible to make (it's just in config.h).
> Or am I wrong? That was the reason, why I didn't take [1] this patch [2].
Ah, my bad, we need AC_SUBST() in this case, I guess that this couldn't
be done simpler then.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-26 9:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-21 22:36 [LTP] [COMMITTED][PATCH 1/1] cpuset: Detect missing fts.h Petr Vorel
2019-03-22 11:36 ` Cyril Hrubis
2019-03-24 23:33 ` Petr Vorel
2019-03-26 9:07 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox