All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH V2 04/32] build: Add option to select libc implementation
@ 2016-01-08  8:54 Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-01-08  8:54 UTC (permalink / raw)
  To: ltp

There are more than glibc for C library implementation available on
linux now a days, uclibc cloaked like glibc but musl e.g. is very
different and does not implement all GNU extentions

Disable tests specifically not building _yet_ on musl based systems

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 Makefile                                    | 5 +++++
 testcases/kernel/Makefile                   | 5 ++++-
 testcases/kernel/sched/Makefile             | 4 +++-
 testcases/kernel/syscalls/Makefile          | 5 +++++
 testcases/network/nfsv4/acl/Makefile        | 4 ++++
 testcases/network/rpc/basic_tests/Makefile  | 5 +++++
 testcases/realtime/func/pi-tests/Makefile   | 4 ++++
 testcases/realtime/stress/pi-tests/Makefile | 5 +++++
 8 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 297f8e7..906b280 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,11 @@ SKIP_IDCHECK		?= 0
 UCLINUX			?= 0
 export UCLINUX
 
+# System C library implementation (glibc,uclibc,musl etc.)
+# default to glibc if not set
+LIBC			?= glibc
+export LIBC
+
 # CLEAN_TARGETS:	Targets which exist solely in clean.
 # COMMON_TARGETS:	Targets which exist in all, clean, and install.
 # INSTALL_TARGETS:	Targets which exist in clean and install (contains
diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
index 50a12fa..4f1987f 100644
--- a/testcases/kernel/Makefile
+++ b/testcases/kernel/Makefile
@@ -47,13 +47,16 @@ SUBDIRS			+= connectors \
 			   logging \
 			   mem \
 			   numa \
-			   pty \
 			   sched \
 			   security \
 			   timers \
 			   tracing \
 			   module \
 
+ifneq ($(LIBC),musl)
+SUBDIRS			+= pty
+endif
+
 ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
 SUBDIRS			+= power_management
 endif
diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
index 6245ed0..aa4eb7f 100644
--- a/testcases/kernel/sched/Makefile
+++ b/testcases/kernel/sched/Makefile
@@ -23,5 +23,7 @@
 top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
-
+ifeq ($(LIBC),musl)
+	FILTER_OUT_DIRS += process_stress
+endif
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
index 8acb395..b749126 100644
--- a/testcases/kernel/syscalls/Makefile
+++ b/testcases/kernel/syscalls/Makefile
@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
 FILTER_OUT_DIRS	+= capget capset chmod chown clone fork getcontext llseek \
 		   mincore mprotect nftw profil remap_file_pages sbrk
 endif
+ifeq ($(LIBC),musl)
+FILTER_OUT_DIRS	+= confstr fmtmsg getcontext ioctl mallopt profil \
+		   rt_sigsuspend setdomainname sethostname sigsuspend \
+		   ustat
+endif
 
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
index 8bc78c2..c36cf50 100644
--- a/testcases/network/nfsv4/acl/Makefile
+++ b/testcases/network/nfsv4/acl/Makefile
@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
 
 LDLIBS			+= $(ACL_LIBS)
 
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= acl1
+endif
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
index 3160813..9bdf5d0 100644
--- a/testcases/network/rpc/basic_tests/Makefile
+++ b/testcases/network/rpc/basic_tests/Makefile
@@ -23,4 +23,9 @@
 top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
+
+ifeq ($(LIBC),musl)
+FILTER_OUT_DIRS += rpc01
+endif
+
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
index 7a7a57a..5808866 100644
--- a/testcases/realtime/func/pi-tests/Makefile
+++ b/testcases/realtime/func/pi-tests/Makefile
@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
 
 MAKE_TARGETS		:= testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= testpi-5 testpi-6 sbrk_mutex
+endif
+
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
index 5edc3b4..aa5987a 100644
--- a/testcases/realtime/stress/pi-tests/Makefile
+++ b/testcases/realtime/stress/pi-tests/Makefile
@@ -24,4 +24,9 @@ top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
+
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= testpi-3
+endif
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH V2 04/32] build: Add option to select libc implementation
  2016-01-09  1:13 ` [LTP] [PATCH V2 04/32] build: Add option to select libc implementation Khem Raj
@ 2016-02-02 15:45   ` Cyril Hrubis
  0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2016-02-02 15:45 UTC (permalink / raw)
  To: ltp

Hi!
> There are more than glibc for C library implementation available on
> linux now a days, uclibc cloaked like glibc but musl e.g. is very
> different and does not implement all GNU extentions
> 
> Disable tests specifically not building _yet_ on musl based systems

What should be done, instead of this musl specific hacks, is to add
configure checks for the features that are not supported on musl and
uses these as criteria for disabling the testcases. This will work
correctly for any libc implementaion and the testcases will be enabled
automatically if musl decides to actually implement anything that is not
supported at the moment.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH V2 04/32] build: Add option to select libc implementation
  2016-01-09  1:13 [LTP] [PATCH V2 01/32] ltp: Don't link against libfl Khem Raj
@ 2016-01-09  1:13 ` Khem Raj
  2016-02-02 15:45   ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2016-01-09  1:13 UTC (permalink / raw)
  To: ltp

There are more than glibc for C library implementation available on
linux now a days, uclibc cloaked like glibc but musl e.g. is very
different and does not implement all GNU extentions

Disable tests specifically not building _yet_ on musl based systems

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 Makefile                                    | 5 +++++
 testcases/kernel/Makefile                   | 5 ++++-
 testcases/kernel/sched/Makefile             | 4 +++-
 testcases/kernel/syscalls/Makefile          | 5 +++++
 testcases/network/nfsv4/acl/Makefile        | 4 ++++
 testcases/network/rpc/basic_tests/Makefile  | 5 +++++
 testcases/realtime/func/pi-tests/Makefile   | 4 ++++
 testcases/realtime/stress/pi-tests/Makefile | 5 +++++
 8 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 297f8e7..906b280 100644
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,11 @@ SKIP_IDCHECK		?= 0
 UCLINUX			?= 0
 export UCLINUX
 
+# System C library implementation (glibc,uclibc,musl etc.)
+# default to glibc if not set
+LIBC			?= glibc
+export LIBC
+
 # CLEAN_TARGETS:	Targets which exist solely in clean.
 # COMMON_TARGETS:	Targets which exist in all, clean, and install.
 # INSTALL_TARGETS:	Targets which exist in clean and install (contains
diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
index 50a12fa..4f1987f 100644
--- a/testcases/kernel/Makefile
+++ b/testcases/kernel/Makefile
@@ -47,13 +47,16 @@ SUBDIRS			+= connectors \
 			   logging \
 			   mem \
 			   numa \
-			   pty \
 			   sched \
 			   security \
 			   timers \
 			   tracing \
 			   module \
 
+ifneq ($(LIBC),musl)
+SUBDIRS			+= pty
+endif
+
 ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
 SUBDIRS			+= power_management
 endif
diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
index 6245ed0..aa4eb7f 100644
--- a/testcases/kernel/sched/Makefile
+++ b/testcases/kernel/sched/Makefile
@@ -23,5 +23,7 @@
 top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
-
+ifeq ($(LIBC),musl)
+	FILTER_OUT_DIRS += process_stress
+endif
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
index 8acb395..b749126 100644
--- a/testcases/kernel/syscalls/Makefile
+++ b/testcases/kernel/syscalls/Makefile
@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
 FILTER_OUT_DIRS	+= capget capset chmod chown clone fork getcontext llseek \
 		   mincore mprotect nftw profil remap_file_pages sbrk
 endif
+ifeq ($(LIBC),musl)
+FILTER_OUT_DIRS	+= confstr fmtmsg getcontext ioctl mallopt profil \
+		   rt_sigsuspend setdomainname sethostname sigsuspend \
+		   ustat
+endif
 
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
index 8bc78c2..c36cf50 100644
--- a/testcases/network/nfsv4/acl/Makefile
+++ b/testcases/network/nfsv4/acl/Makefile
@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
 
 LDLIBS			+= $(ACL_LIBS)
 
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= acl1
+endif
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
index 3160813..9bdf5d0 100644
--- a/testcases/network/rpc/basic_tests/Makefile
+++ b/testcases/network/rpc/basic_tests/Makefile
@@ -23,4 +23,9 @@
 top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
+
+ifeq ($(LIBC),musl)
+FILTER_OUT_DIRS += rpc01
+endif
+
 include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
index 7a7a57a..5808866 100644
--- a/testcases/realtime/func/pi-tests/Makefile
+++ b/testcases/realtime/func/pi-tests/Makefile
@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
 
 MAKE_TARGETS		:= testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= testpi-5 testpi-6 sbrk_mutex
+endif
+
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
index 5edc3b4..aa5987a 100644
--- a/testcases/realtime/stress/pi-tests/Makefile
+++ b/testcases/realtime/stress/pi-tests/Makefile
@@ -24,4 +24,9 @@ top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/env_pre.mk
 include $(abs_srcdir)/../../config.mk
+
+ifeq ($(LIBC),musl)
+FILTER_OUT_MAKE_TARGETS	:= testpi-3
+endif
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-02 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08  8:54 [LTP] [PATCH V2 04/32] build: Add option to select libc implementation Khem Raj
2016-01-09  1:13 [LTP] [PATCH V2 01/32] ltp: Don't link against libfl Khem Raj
2016-01-09  1:13 ` [LTP] [PATCH V2 04/32] build: Add option to select libc implementation Khem Raj
2016-02-02 15:45   ` Cyril Hrubis

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.