* [PATCH] cpuset: disable for UCLIBC @ 2019-03-12 17:44 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-12 17:44 UTC (permalink / raw) To: linux-snps-arc 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 at synopsys.com> --- testcases/kernel/controllers/Makefile | 5 +++++ 1 file changed, 5 insertions(+) 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 "$@" -- 2.7.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC @ 2019-03-12 17:44 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-12 17:44 UTC (permalink / raw) To: ltp 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(+) 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 "$@" -- 2.7.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC 2019-03-12 17:44 ` [LTP] " Vineet Gupta @ 2019-03-14 10:01 ` Petr Vorel -1 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-14 10:01 UTC (permalink / raw) To: linux-snps-arc 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 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC @ 2019-03-14 10:01 ` Petr Vorel 0 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-14 10:01 UTC (permalink / raw) To: ltp 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 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC 2019-03-14 10:01 ` Petr Vorel @ 2019-03-18 16:41 ` Vineet Gupta -1 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-18 16:41 UTC (permalink / raw) To: linux-snps-arc 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 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC @ 2019-03-18 16:41 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-18 16:41 UTC (permalink / raw) To: ltp 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 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC 2019-03-18 16:41 ` Vineet Gupta @ 2019-03-18 18:19 ` Petr Vorel -1 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-18 18:19 UTC (permalink / raw) To: linux-snps-arc 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 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] cpuset: disable for UCLIBC @ 2019-03-18 18:19 ` Petr Vorel 0 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-18 18:19 UTC (permalink / raw) To: ltp 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 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2] autodetect fts support and tests depending on it 2019-03-18 18:19 ` Petr Vorel @ 2019-03-18 19:52 ` Vineet Gupta -1 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-18 19:52 UTC (permalink / raw) To: linux-snps-arc Signed-off-by: Vineet Gupta <vgupta at synopsys.com> --- configure.ac | 1 + testcases/kernel/controllers/Makefile | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index e002c248eab2..10b2f6b1e43b 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_PROG_YACC AC_PREFIX_DEFAULT(/opt/ltp) AC_CHECK_HEADERS([ \ + fts.h \ ifaddrs.h \ keyutils.h \ linux/can.h \ diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile index 404073947904..a1626ae03695 100644 --- a/testcases/kernel/controllers/Makefile +++ b/testcases/kernel/controllers/Makefile @@ -29,6 +29,12 @@ LIBDIR := libcontrollers LIB := $(LIBDIR)/libcontrollers.a FILTER_OUT_DIRS := $(LIBDIR) +# 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 + $(LIBDIR): mkdir -p "$@" -- 2.7.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it @ 2019-03-18 19:52 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-18 19:52 UTC (permalink / raw) To: ltp Signed-off-by: Vineet Gupta <vgupta@synopsys.com> --- configure.ac | 1 + testcases/kernel/controllers/Makefile | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index e002c248eab2..10b2f6b1e43b 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_PROG_YACC AC_PREFIX_DEFAULT(/opt/ltp) AC_CHECK_HEADERS([ \ + fts.h \ ifaddrs.h \ keyutils.h \ linux/can.h \ diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile index 404073947904..a1626ae03695 100644 --- a/testcases/kernel/controllers/Makefile +++ b/testcases/kernel/controllers/Makefile @@ -29,6 +29,12 @@ LIBDIR := libcontrollers LIB := $(LIBDIR)/libcontrollers.a FILTER_OUT_DIRS := $(LIBDIR) +# 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 + $(LIBDIR): mkdir -p "$@" -- 2.7.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH v2] autodetect fts support and tests depending on it 2019-03-18 19:52 ` [LTP] " Vineet Gupta @ 2019-03-20 22:37 ` Petr Vorel -1 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-20 22:37 UTC (permalink / raw) To: linux-snps-arc Hi Vineet, > Signed-off-by: Vineet Gupta <vgupta at synopsys.com> > --- > configure.ac | 1 + > testcases/kernel/controllers/Makefile | 6 ++++++ > 2 files changed, 7 insertions(+) > diff --git a/configure.ac b/configure.ac > index e002c248eab2..10b2f6b1e43b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -33,6 +33,7 @@ AC_PROG_YACC > AC_PREFIX_DEFAULT(/opt/ltp) > AC_CHECK_HEADERS([ \ > + fts.h \ > ifaddrs.h \ > keyutils.h \ > linux/can.h \ > diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile > index 404073947904..a1626ae03695 100644 > --- a/testcases/kernel/controllers/Makefile > +++ b/testcases/kernel/controllers/Makefile > @@ -29,6 +29,12 @@ LIBDIR := libcontrollers > LIB := $(LIBDIR)/libcontrollers.a > FILTER_OUT_DIRS := $(LIBDIR) > +# 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? This will not work as HAVE_LIBAIO_H is in include/config.h, 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). Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it @ 2019-03-20 22:37 ` Petr Vorel 0 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-20 22:37 UTC (permalink / raw) To: ltp Hi Vineet, > Signed-off-by: Vineet Gupta <vgupta@synopsys.com> > --- > configure.ac | 1 + > testcases/kernel/controllers/Makefile | 6 ++++++ > 2 files changed, 7 insertions(+) > diff --git a/configure.ac b/configure.ac > index e002c248eab2..10b2f6b1e43b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -33,6 +33,7 @@ AC_PROG_YACC > AC_PREFIX_DEFAULT(/opt/ltp) > AC_CHECK_HEADERS([ \ > + fts.h \ > ifaddrs.h \ > keyutils.h \ > linux/can.h \ > diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile > index 404073947904..a1626ae03695 100644 > --- a/testcases/kernel/controllers/Makefile > +++ b/testcases/kernel/controllers/Makefile > @@ -29,6 +29,12 @@ LIBDIR := libcontrollers > LIB := $(LIBDIR)/libcontrollers.a > FILTER_OUT_DIRS := $(LIBDIR) > +# 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? This will not work as HAVE_LIBAIO_H is in include/config.h, 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). Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it 2019-03-20 22:37 ` [LTP] " Petr Vorel @ 2019-03-20 22:47 ` Petr Vorel -1 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-20 22:47 UTC (permalink / raw) To: linux-snps-arc Hi Vineet, > > Signed-off-by: Vineet Gupta <vgupta at synopsys.com> > > --- > > configure.ac | 1 + > > testcases/kernel/controllers/Makefile | 6 ++++++ > > 2 files changed, 7 insertions(+) > > diff --git a/configure.ac b/configure.ac > > index e002c248eab2..10b2f6b1e43b 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -33,6 +33,7 @@ AC_PROG_YACC > > AC_PREFIX_DEFAULT(/opt/ltp) > > AC_CHECK_HEADERS([ \ > > + fts.h \ > > ifaddrs.h \ > > keyutils.h \ > > linux/can.h \ > > diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile > > index 404073947904..a1626ae03695 100644 > > --- a/testcases/kernel/controllers/Makefile > > +++ b/testcases/kernel/controllers/Makefile > > @@ -29,6 +29,12 @@ LIBDIR := libcontrollers > > LIB := $(LIBDIR)/libcontrollers.a > > FILTER_OUT_DIRS := $(LIBDIR) > > +# 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? This will not work as HAVE_LIBAIO_H is in include/config.h, > 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). But when files aren't compiled, they're missing in runtest/controllers (there are commands expected, that's why we use TST_TEST_TCONF, so file is there but exits with warning). There is not an elegant solution, maybe adding these missing binaries into TST_NEEDS_CMDS (one enough to any *.sh). Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it @ 2019-03-20 22:47 ` Petr Vorel 0 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-20 22:47 UTC (permalink / raw) To: ltp Hi Vineet, > > Signed-off-by: Vineet Gupta <vgupta@synopsys.com> > > --- > > configure.ac | 1 + > > testcases/kernel/controllers/Makefile | 6 ++++++ > > 2 files changed, 7 insertions(+) > > diff --git a/configure.ac b/configure.ac > > index e002c248eab2..10b2f6b1e43b 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -33,6 +33,7 @@ AC_PROG_YACC > > AC_PREFIX_DEFAULT(/opt/ltp) > > AC_CHECK_HEADERS([ \ > > + fts.h \ > > ifaddrs.h \ > > keyutils.h \ > > linux/can.h \ > > diff --git a/testcases/kernel/controllers/Makefile b/testcases/kernel/controllers/Makefile > > index 404073947904..a1626ae03695 100644 > > --- a/testcases/kernel/controllers/Makefile > > +++ b/testcases/kernel/controllers/Makefile > > @@ -29,6 +29,12 @@ LIBDIR := libcontrollers > > LIB := $(LIBDIR)/libcontrollers.a > > FILTER_OUT_DIRS := $(LIBDIR) > > +# 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? This will not work as HAVE_LIBAIO_H is in include/config.h, > 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). But when files aren't compiled, they're missing in runtest/controllers (there are commands expected, that's why we use TST_TEST_TCONF, so file is there but exits with warning). There is not an elegant solution, maybe adding these missing binaries into TST_NEEDS_CMDS (one enough to any *.sh). Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2] autodetect fts support and tests depending on it 2019-03-20 22:37 ` [LTP] " Petr Vorel @ 2019-03-20 23:11 ` Vineet Gupta -1 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-20 23:11 UTC (permalink / raw) To: linux-snps-arc 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 '~/ltp/testcases/kernel/controllers/cpuset/cpuset_exclusive_test' | make[5]: Entering directory '~/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test' | make -C ../cpuset_lib -f "~/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/../cpuset_lib/Makefile" all | 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 libbitmask.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 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. ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it @ 2019-03-20 23:11 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-20 23:11 UTC (permalink / raw) To: ltp 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 '~/ltp/testcases/kernel/controllers/cpuset/cpuset_exclusive_test' | make[5]: Entering directory '~/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test' | make -C ../cpuset_lib -f "~/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/../cpuset_lib/Makefile" all | 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 libbitmask.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 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. ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2] autodetect fts support and tests depending on it 2019-03-20 23:11 ` [LTP] " Vineet Gupta @ 2019-03-21 12:06 ` Petr Vorel -1 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-21 12:06 UTC (permalink / raw) To: linux-snps-arc Hi Vineet, > 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 I meant testing with glibc :). Because your patch would bring a regression: ifndef HAVE_FTS_H is always true because HAVE_FTS_H as an autotools check is not visible to make in this form, no matter what it's set to HAVE_FTS_H in include/config.h :(. We could solve previous problem to make HAVE_FTS_H visible with AC_SUBST, while creating proper autotools function check in m4/. Planning to do that? (if not I'll do). My thoughts about dependency problem in shell scripts (TST_TEST_TCONF) was wrong as these tests are also under cpuset 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. See up. Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it @ 2019-03-21 12:06 ` Petr Vorel 0 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-21 12:06 UTC (permalink / raw) To: ltp Hi Vineet, > 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 I meant testing with glibc :). Because your patch would bring a regression: ifndef HAVE_FTS_H is always true because HAVE_FTS_H as an autotools check is not visible to make in this form, no matter what it's set to HAVE_FTS_H in include/config.h :(. We could solve previous problem to make HAVE_FTS_H visible with AC_SUBST, while creating proper autotools function check in m4/. Planning to do that? (if not I'll do). My thoughts about dependency problem in shell scripts (TST_TEST_TCONF) was wrong as these tests are also under cpuset 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. See up. Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v2] autodetect fts support and tests depending on it 2019-03-21 12:06 ` [LTP] " Petr Vorel @ 2019-03-21 15:48 ` Vineet Gupta -1 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-21 15:48 UTC (permalink / raw) To: linux-snps-arc On 3/21/19 5:06 AM, Petr Vorel wrote: > Hi Vineet, > >> 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 > I meant testing with glibc :). No I didn't. Sorry missed that aspect of testing. > Because your patch would bring a regression: > ifndef HAVE_FTS_H is always true because HAVE_FTS_H as an autotools check is not > visible to make in this form, no matter what it's set to HAVE_FTS_H in > include/config.h :(. OK makes sense. > We could solve previous problem to make HAVE_FTS_H visible with AC_SUBST, while > creating proper autotools function check in m4/. Planning to do that? (if not > I'll do). It seems you already have a good grasp of both the problem I was trying to solve and the solution, latter I'll have to dig into myself - not necessarily rocket science but still. So please go ahead and do that if you have spare cycles. > My thoughts about dependency problem in shell scripts (TST_TEST_TCONF) was wrong > as these tests are also under cpuset directory. OK ! Thx, -Vineet ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH v2] autodetect fts support and tests depending on it @ 2019-03-21 15:48 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-21 15:48 UTC (permalink / raw) To: ltp On 3/21/19 5:06 AM, Petr Vorel wrote: > Hi Vineet, > >> 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 > I meant testing with glibc :). No I didn't. Sorry missed that aspect of testing. > Because your patch would bring a regression: > ifndef HAVE_FTS_H is always true because HAVE_FTS_H as an autotools check is not > visible to make in this form, no matter what it's set to HAVE_FTS_H in > include/config.h :(. OK makes sense. > We could solve previous problem to make HAVE_FTS_H visible with AC_SUBST, while > creating proper autotools function check in m4/. Planning to do that? (if not > I'll do). It seems you already have a good grasp of both the problem I was trying to solve and the solution, latter I'll have to dig into myself - not necessarily rocket science but still. So please go ahead and do that if you have spare cycles. > My thoughts about dependency problem in shell scripts (TST_TEST_TCONF) was wrong > as these tests are also under cpuset directory. OK ! Thx, -Vineet ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] auto filter aio tests of libc can't support aio 2019-03-18 18:19 ` Petr Vorel @ 2019-03-18 20:06 ` Vineet Gupta -1 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-18 20:06 UTC (permalink / raw) To: linux-snps-arc uClibc-ng lacks libaio.h and thus LTP UCLIBC=1 builds need to filter out aio tests which it currently doesn't. FWIW the tests sources themselves use a slightly different guard HAVE_LIBAIO (while autotool generate HAVE_LIBAIO_H). Anyhow that seems pointless as aio tests should not even build of libc doesn't support the prerequsute header. Signed-off-by: Vineet Gupta <vgupta at synopsys.com> --- testcases/kernel/io/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testcases/kernel/io/Makefile b/testcases/kernel/io/Makefile index 7db02882a530..3afae3888f63 100644 --- a/testcases/kernel/io/Makefile +++ b/testcases/kernel/io/Makefile @@ -24,4 +24,8 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk +ifndef HAVE_LIBAIO_H +FILTER_OUT_DIRS += aio +endif + include $(top_srcdir)/include/mk/generic_trunk_target.mk -- 2.7.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [LTP] [PATCH] auto filter aio tests of libc can't support aio @ 2019-03-18 20:06 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-18 20:06 UTC (permalink / raw) To: ltp uClibc-ng lacks libaio.h and thus LTP UCLIBC=1 builds need to filter out aio tests which it currently doesn't. FWIW the tests sources themselves use a slightly different guard HAVE_LIBAIO (while autotool generate HAVE_LIBAIO_H). Anyhow that seems pointless as aio tests should not even build of libc doesn't support the prerequsute header. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> --- testcases/kernel/io/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testcases/kernel/io/Makefile b/testcases/kernel/io/Makefile index 7db02882a530..3afae3888f63 100644 --- a/testcases/kernel/io/Makefile +++ b/testcases/kernel/io/Makefile @@ -24,4 +24,8 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk +ifndef HAVE_LIBAIO_H +FILTER_OUT_DIRS += aio +endif + include $(top_srcdir)/include/mk/generic_trunk_target.mk -- 2.7.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH] auto filter aio tests of libc can't support aio 2019-03-18 20:06 ` [LTP] " Vineet Gupta @ 2019-03-20 22:48 ` Petr Vorel -1 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-20 22:48 UTC (permalink / raw) To: linux-snps-arc Hi Vineet, > uClibc-ng lacks libaio.h and thus LTP UCLIBC=1 builds need to filter > out aio tests which it currently doesn't. > FWIW the tests sources themselves use a slightly different guard > HAVE_LIBAIO (while autotool generate HAVE_LIBAIO_H). > Anyhow that seems pointless as aio tests should not even build of libc > doesn't support the prerequsute header. > Signed-off-by: Vineet Gupta <vgupta at synopsys.com> > --- > testcases/kernel/io/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > diff --git a/testcases/kernel/io/Makefile b/testcases/kernel/io/Makefile > index 7db02882a530..3afae3888f63 100644 > --- a/testcases/kernel/io/Makefile > +++ b/testcases/kernel/io/Makefile > @@ -24,4 +24,8 @@ top_srcdir ?= ../../.. > include $(top_srcdir)/include/mk/env_pre.mk > +ifndef HAVE_LIBAIO_H > +FILTER_OUT_DIRS += aio > +endif This is IMHO wrong, as all files using libaio.h are guarded with TST_TEST_TCONF(). Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] auto filter aio tests of libc can't support aio @ 2019-03-20 22:48 ` Petr Vorel 0 siblings, 0 replies; 26+ messages in thread From: Petr Vorel @ 2019-03-20 22:48 UTC (permalink / raw) To: ltp Hi Vineet, > uClibc-ng lacks libaio.h and thus LTP UCLIBC=1 builds need to filter > out aio tests which it currently doesn't. > FWIW the tests sources themselves use a slightly different guard > HAVE_LIBAIO (while autotool generate HAVE_LIBAIO_H). > Anyhow that seems pointless as aio tests should not even build of libc > doesn't support the prerequsute header. > Signed-off-by: Vineet Gupta <vgupta@synopsys.com> > --- > testcases/kernel/io/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > diff --git a/testcases/kernel/io/Makefile b/testcases/kernel/io/Makefile > index 7db02882a530..3afae3888f63 100644 > --- a/testcases/kernel/io/Makefile > +++ b/testcases/kernel/io/Makefile > @@ -24,4 +24,8 @@ top_srcdir ?= ../../.. > include $(top_srcdir)/include/mk/env_pre.mk > +ifndef HAVE_LIBAIO_H > +FILTER_OUT_DIRS += aio > +endif This is IMHO wrong, as all files using libaio.h are guarded with TST_TEST_TCONF(). Kind regards, Petr ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH] auto filter aio tests of libc can't support aio 2019-03-20 22:48 ` [LTP] " Petr Vorel @ 2019-03-21 21:43 ` Vineet Gupta -1 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-21 21:43 UTC (permalink / raw) To: linux-snps-arc On 3/20/19 3:48 PM, Petr Vorel wrote: >> +ifndef HAVE_LIBAIO_H >> +FILTER_OUT_DIRS += aio >> +endif > This is IMHO wrong, as all files using libaio.h are guarded with > TST_TEST_TCONF(). You're right. It seems this ltp tree of mine had stray aio1 and aio2 dir in the io/aio which was actually tripping the build. With a pristine tree that is indeed not needed. Thx, -Vineet ^ permalink raw reply [flat|nested] 26+ messages in thread
* [LTP] [PATCH] auto filter aio tests of libc can't support aio @ 2019-03-21 21:43 ` Vineet Gupta 0 siblings, 0 replies; 26+ messages in thread From: Vineet Gupta @ 2019-03-21 21:43 UTC (permalink / raw) To: ltp On 3/20/19 3:48 PM, Petr Vorel wrote: >> +ifndef HAVE_LIBAIO_H >> +FILTER_OUT_DIRS += aio >> +endif > This is IMHO wrong, as all files using libaio.h are guarded with > TST_TEST_TCONF(). You're right. It seems this ltp tree of mine had stray aio1 and aio2 dir in the io/aio which was actually tripping the build. With a pristine tree that is indeed not needed. Thx, -Vineet ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2019-03-21 21:43 UTC | newest] Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-03-12 17:44 [PATCH] cpuset: disable for UCLIBC Vineet Gupta 2019-03-12 17:44 ` [LTP] " Vineet Gupta 2019-03-14 10:01 ` Petr Vorel 2019-03-14 10:01 ` Petr Vorel 2019-03-18 16:41 ` Vineet Gupta 2019-03-18 16:41 ` Vineet Gupta 2019-03-18 18:19 ` Petr Vorel 2019-03-18 18:19 ` Petr Vorel 2019-03-18 19:52 ` [PATCH v2] autodetect fts support and tests depending on it Vineet Gupta 2019-03-18 19:52 ` [LTP] " Vineet Gupta 2019-03-20 22:37 ` Petr Vorel 2019-03-20 22:37 ` [LTP] " Petr Vorel 2019-03-20 22:47 ` Petr Vorel 2019-03-20 22:47 ` Petr Vorel 2019-03-20 23:11 ` Vineet Gupta 2019-03-20 23:11 ` [LTP] " Vineet Gupta 2019-03-21 12:06 ` Petr Vorel 2019-03-21 12:06 ` [LTP] " Petr Vorel 2019-03-21 15:48 ` Vineet Gupta 2019-03-21 15:48 ` [LTP] " Vineet Gupta 2019-03-18 20:06 ` [PATCH] auto filter aio tests of libc can't support aio Vineet Gupta 2019-03-18 20:06 ` [LTP] " Vineet Gupta 2019-03-20 22:48 ` Petr Vorel 2019-03-20 22:48 ` [LTP] " Petr Vorel 2019-03-21 21:43 ` Vineet Gupta 2019-03-21 21:43 ` [LTP] " Vineet Gupta
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.