[LTP] [PATCH v2] autodetect fts support and tests depending on it

Vineet Gupta vineet.gupta1@synopsys.com
Thu Mar 21 00:11:05 CET 2019

Hi Petr,

On 3/20/19 3:37 PM, Petr Vorel wrote:
>> +# controllers/cpuset/cpuset_lib/libcpuset.c uses fts
>> +# which may not be available/configured in the libc build
>> +ifndef HAVE_FTS_H
>> +FILTER_OUT_DIRS	+= cpuset
>> +endif
> Have you tested it? 

Absolutely. I verified again. With this patch reverted locally I see errors due to
it trying to build the file

| make[5]: Leaving directory
| make[5]: Entering directory
| make -C ../cpuset_lib -f
| make[6]: Entering directory '~/ltp/testcases/kernel/controllers/cpuset/cpuset_lib'
| arc-linux-uclibc-gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W
-Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../../include
-I../../../../../include -I../../../../../include/old/  -c -o meminfo.o meminfo.c
| arc-linux-uclibc-gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W
-Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../../include
-I../../../../../include -I../../../../../include/old/  -c -o libbitmask.o
| arc-linux-uclibc-gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W
-Wold-style-definition -D_FORTIFY_SOURCE=2 -I../../../../../include
-I../../../../../include -I../../../../../include/old/  -c -o libcpuset.o libcpuset.c
| libcpuset.c:32:10: fatal error: fts.h: No such file or directory

With my patch the build runs to completion.

This will not work as HAVE_LIBAIO_H is in include/config.h,

You mean HAVE_FTS_H (LIBAIO stuff is for different patch)

> thus only for C. For Makefile it must be done via autotools (search for AC_SUBST
> in m4/). I thought TST_TEST_TCONF usage, but you're right, that problematic
> source is part of libcontrollers.a (i.e. part of a library, not normal C
> binary).
Umm not sure what u mean. Going to read the next msg in thread.

More information about the ltp mailing list