blob: 3c66c9436f5a44773b1105f482d5c4fe51881572 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 53acddddf1b324e06af886ee4639b774e5c8c8bc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 7 Jan 2016 18:19:03 +0000
4Subject: [PATCH 04/32] build: Add option to select libc implementation
5
6There are more than glibc for C library implementation available on
7linux now a days, uclibc cloaked like glibc but musl e.g. is very
8different and does not implement all GNU extentions
9
10Disable tests specifically not building _yet_ on musl based systems
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013Upstream-Status: Pending
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050014---
15 Makefile | 5 +++++
16 testcases/kernel/Makefile | 5 ++++-
17 testcases/kernel/sched/Makefile | 4 +++-
18 testcases/kernel/syscalls/Makefile | 5 +++++
19 testcases/network/nfsv4/acl/Makefile | 4 ++++
20 testcases/network/rpc/basic_tests/Makefile | 5 +++++
21 testcases/realtime/func/pi-tests/Makefile | 4 ++++
22 testcases/realtime/stress/pi-tests/Makefile | 5 +++++
23 8 files changed, 35 insertions(+), 2 deletions(-)
24
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025diff --git a/Makefile b/Makefile
26index 297f8e7..906b280 100644
27--- a/Makefile
28+++ b/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029@@ -49,6 +49,11 @@ SKIP_IDCHECK ?= 0
30 UCLINUX ?= 0
31 export UCLINUX
32
33+# System C library implementation (glibc,uclibc,musl etc.)
34+# default to glibc if not set
35+LIBC ?= glibc
36+export LIBC
37+
38 # CLEAN_TARGETS: Targets which exist solely in clean.
39 # COMMON_TARGETS: Targets which exist in all, clean, and install.
40 # INSTALL_TARGETS: Targets which exist in clean and install (contains
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
42index 50a12fa..4f1987f 100644
43--- a/testcases/kernel/Makefile
44+++ b/testcases/kernel/Makefile
Brad Bishop19323692019-04-05 15:28:33 -040045@@ -49,12 +49,15 @@ SUBDIRS += connectors \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046 logging \
47 mem \
48 numa \
49- pty \
50 sched \
51 security \
52 timers \
53 tracing \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050054
55+ifneq ($(LIBC),musl)
56+SUBDIRS += pty
57+endif
58+
59 ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
60 SUBDIRS += power_management
61 endif
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080062diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
63index 6245ed0..aa4eb7f 100644
64--- a/testcases/kernel/sched/Makefile
65+++ b/testcases/kernel/sched/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050066@@ -23,5 +23,7 @@
67 top_srcdir ?= ../../..
68
69 include $(top_srcdir)/include/mk/env_pre.mk
70-
71+ifeq ($(LIBC),musl)
72+ FILTER_OUT_DIRS += process_stress
73+endif
74 include $(top_srcdir)/include/mk/generic_trunk_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080075diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
76index 8acb395..b749126 100644
77--- a/testcases/kernel/syscalls/Makefile
78+++ b/testcases/kernel/syscalls/Makefile
Brad Bishop316dfdd2018-06-25 12:45:53 -040079@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050080 FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
81 mincore mprotect nftw profil remap_file_pages sbrk
82 endif
83+ifeq ($(LIBC),musl)
84+FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
85+ rt_sigsuspend setdomainname sethostname sigsuspend \
86+ ustat
87+endif
88
Brad Bishop316dfdd2018-06-25 12:45:53 -040089 ifeq ($(UCLIBC),1)
90 FILTER_OUT_DIRS += profil
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080091diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
92index 8bc78c2..c36cf50 100644
93--- a/testcases/network/nfsv4/acl/Makefile
94+++ b/testcases/network/nfsv4/acl/Makefile
95@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050096
97 LDLIBS += $(ACL_LIBS)
98
99+ifeq ($(LIBC),musl)
100+FILTER_OUT_MAKE_TARGETS := acl1
101+endif
102+
103 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800104diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
105index 3160813..9bdf5d0 100644
106--- a/testcases/network/rpc/basic_tests/Makefile
107+++ b/testcases/network/rpc/basic_tests/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500108@@ -23,4 +23,9 @@
109 top_srcdir ?= ../../../..
110
111 include $(top_srcdir)/include/mk/env_pre.mk
112+
113+ifeq ($(LIBC),musl)
114+FILTER_OUT_DIRS += rpc01
115+endif
116+
117 include $(top_srcdir)/include/mk/generic_trunk_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800118diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
119index 7a7a57a..5808866 100644
120--- a/testcases/realtime/func/pi-tests/Makefile
121+++ b/testcases/realtime/func/pi-tests/Makefile
122@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500123 include $(abs_srcdir)/../../config.mk
124
125 MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
126+ifeq ($(LIBC),musl)
127+FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex
128+endif
129+
130
131 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800132diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
133index 5edc3b4..aa5987a 100644
134--- a/testcases/realtime/stress/pi-tests/Makefile
135+++ b/testcases/realtime/stress/pi-tests/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500136@@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
137
138 include $(top_srcdir)/include/mk/env_pre.mk
139 include $(abs_srcdir)/../../config.mk
140+
141+ifeq ($(LIBC),musl)
142+FILTER_OUT_MAKE_TARGETS := testpi-3
143+endif
144+
145 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800146--
1472.7.0
148