diff mbox series

cpuset: disable for UCLIBC

Message ID 1552412679-28694-1-git-send-email-vgupta@synopsys.com
State New
Headers show
Series cpuset: disable for UCLIBC | expand

Commit Message

Vineet Gupta March 12, 2019, 5:44 p.m. UTC
libcpuset.c relies on FTS which is not enabled by default on uClibc.
Instead of needing to reconfigure, rebuild uClibc lets disable this test
for uClibc

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 testcases/kernel/controllers/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Petr Vorel March 14, 2019, 10:01 a.m. UTC | #1
Hi Vineet,

> libcpuset.c relies on FTS which is not enabled by default on uClibc.
> Instead of needing to reconfigure, rebuild uClibc lets disable this test
> for uClibc
Which uClibc version are you using?
Both uClibc and uclibc-ng has it [1] since 2011, version v0.9.32, in commit
a4aa01c12 ("Added fts support for traversing UNIX file hierarchies.")

It's actually MUSL, what is missing it [2]. Although there is some
implementation [3], we should skip it for musl. But the clearest way is really
to check presence of <fts.h>, that's fix it for all libc.

Kind regards,
Petr

[1] https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/tree/include/fts.h
[2] https://wiki.musl-libc.org/faq.html#Q:-Why-is-%3Ccode%3Efts.h%3C/code%3E-not-included?
[3] https://github.com/pullmoll/musl-fts
Vineet Gupta March 18, 2019, 4:41 p.m. UTC | #2
On 3/14/19 3:01 AM, Petr Vorel wrote:
> Hi Vineet,
> 
>> libcpuset.c relies on FTS which is not enabled by default on uClibc.
>> Instead of needing to reconfigure, rebuild uClibc lets disable this test
>> for uClibc
> Which uClibc version are you using?
> Both uClibc and uclibc-ng has it [1] since 2011, version v0.9.32, in commit
> a4aa01c12 ("Added fts support for traversing UNIX file hierarchies.")

Right I'm using bleeding edge as well, and do have the header in sources, its just
not configured/enabled by default hence not available in installation.


> It's actually MUSL, what is missing it [2]. Although there is some
> implementation [3], we should skip it for musl. But the clearest way is really
> to check presence of <fts.h>, that's fix it for all libc.

Spot on, that is indeed the best/ideal way of doing it. Do you know if such a
mechanism already exists in LTP. If you point me to an example I can respin the
patch accordingly.

Thx,
-Vineet
Petr Vorel March 18, 2019, 6:19 p.m. UTC | #3
Hi Vineet,

> >> libcpuset.c relies on FTS which is not enabled by default on uClibc.
> >> Instead of needing to reconfigure, rebuild uClibc lets disable this test
> >> for uClibc
> > Which uClibc version are you using?
> > Both uClibc and uclibc-ng has it [1] since 2011, version v0.9.32, in commit
> > a4aa01c12 ("Added fts support for traversing UNIX file hierarchies.")

> Right I'm using bleeding edge as well, and do have the header in sources, its just
> not configured/enabled by default hence not available in installation.


> > It's actually MUSL, what is missing it [2]. Although there is some
> > implementation [3], we should skip it for musl. But the clearest way is really
> > to check presence of <fts.h>, that's fix it for all libc.

> Spot on, that is indeed the best/ideal way of doing it. Do you know if such a
> mechanism already exists in LTP. If you point me to an example I can respin the
> patch accordingly.
Simple adding fts.h in AC_CHECK_HEADERS + guards in a file #ifdef HAVE_FTS_H
should do the magic :).

Kind regards,
Petr
diff mbox series

Patch

diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile
index 404073947904..9f4abe28bfcf 100644
--- a/testcases/kernel/controllers/Makefile
+++ b/testcases/kernel/controllers/Makefile
@@ -29,6 +29,11 @@  LIBDIR			:= libcontrollers
 LIB			:= $(LIBDIR)/libcontrollers.a
 FILTER_OUT_DIRS		:= $(LIBDIR)
 
+# controllers/cpuset/cpuset_lib/libcpuset.c uses fts
+ifeq ($(UCLIBC),1)
+FILTER_OUT_DIRS	+= cpuset
+endif
+
 $(LIBDIR):
 	mkdir -p "$@"