blob: 2df385591b1dd47321c7f01c4a8c10f4b68fda23 [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 Bishop316dfdd2018-06-25 12:45:53 -040045@@ -48,13 +48,16 @@ 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 \
54 module \
55
56+ifneq ($(LIBC),musl)
57+SUBDIRS += pty
58+endif
59+
60 ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
61 SUBDIRS += power_management
62 endif
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080063diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
64index 6245ed0..aa4eb7f 100644
65--- a/testcases/kernel/sched/Makefile
66+++ b/testcases/kernel/sched/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050067@@ -23,5 +23,7 @@
68 top_srcdir ?= ../../..
69
70 include $(top_srcdir)/include/mk/env_pre.mk
71-
72+ifeq ($(LIBC),musl)
73+ FILTER_OUT_DIRS += process_stress
74+endif
75 include $(top_srcdir)/include/mk/generic_trunk_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080076diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
77index 8acb395..b749126 100644
78--- a/testcases/kernel/syscalls/Makefile
79+++ b/testcases/kernel/syscalls/Makefile
Brad Bishop316dfdd2018-06-25 12:45:53 -040080@@ -28,6 +28,11 @@ ifeq ($(UCLINUX),1)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050081 FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \
82 mincore mprotect nftw profil remap_file_pages sbrk
83 endif
84+ifeq ($(LIBC),musl)
85+FILTER_OUT_DIRS += confstr fmtmsg getcontext ioctl mallopt profil \
86+ rt_sigsuspend setdomainname sethostname sigsuspend \
87+ ustat
88+endif
89
Brad Bishop316dfdd2018-06-25 12:45:53 -040090 ifeq ($(UCLIBC),1)
91 FILTER_OUT_DIRS += profil
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080092diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
93index 8bc78c2..c36cf50 100644
94--- a/testcases/network/nfsv4/acl/Makefile
95+++ b/testcases/network/nfsv4/acl/Makefile
96@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050097
98 LDLIBS += $(ACL_LIBS)
99
100+ifeq ($(LIBC),musl)
101+FILTER_OUT_MAKE_TARGETS := acl1
102+endif
103+
104 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800105diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
106index 3160813..9bdf5d0 100644
107--- a/testcases/network/rpc/basic_tests/Makefile
108+++ b/testcases/network/rpc/basic_tests/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500109@@ -23,4 +23,9 @@
110 top_srcdir ?= ../../../..
111
112 include $(top_srcdir)/include/mk/env_pre.mk
113+
114+ifeq ($(LIBC),musl)
115+FILTER_OUT_DIRS += rpc01
116+endif
117+
118 include $(top_srcdir)/include/mk/generic_trunk_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800119diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
120index 7a7a57a..5808866 100644
121--- a/testcases/realtime/func/pi-tests/Makefile
122+++ b/testcases/realtime/func/pi-tests/Makefile
123@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500124 include $(abs_srcdir)/../../config.mk
125
126 MAKE_TARGETS := testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
127+ifeq ($(LIBC),musl)
128+FILTER_OUT_MAKE_TARGETS := testpi-5 testpi-6 sbrk_mutex
129+endif
130+
131
132 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800133diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
134index 5edc3b4..aa5987a 100644
135--- a/testcases/realtime/stress/pi-tests/Makefile
136+++ b/testcases/realtime/stress/pi-tests/Makefile
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500137@@ -24,4 +24,9 @@ top_srcdir ?= ../../../..
138
139 include $(top_srcdir)/include/mk/env_pre.mk
140 include $(abs_srcdir)/../../config.mk
141+
142+ifeq ($(LIBC),musl)
143+FILTER_OUT_MAKE_TARGETS := testpi-3
144+endif
145+
146 include $(top_srcdir)/include/mk/generic_leaf_target.mk
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800147--
1482.7.0
149