]> granicus.if.org Git - strace/blob - tests/Makefile.am
tests: add hexquote_strndup function to libtests
[strace] / tests / Makefile.am
1 # Automake input for strace tests.
2 #
3 # Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9 # 1. Redistributions of source code must retain the above copyright
10 #    notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 #    notice, this list of conditions and the following disclaimer in the
13 #    documentation and/or other materials provided with the distribution.
14 # 3. The name of the author may not be used to endorse or promote products
15 #    derived from this software without specific prior written permission.
16 #
17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 OS = linux
29 ARCH = @arch@
30 MPERS_NAME =
31 ARCH_MFLAGS =
32 AM_CFLAGS = $(WARN_CFLAGS)
33 AM_CPPFLAGS = $(ARCH_MFLAGS) \
34               -I$(builddir) \
35               -I$(top_builddir)/$(OS)/$(ARCH) \
36               -I$(top_srcdir)/$(OS)/$(ARCH) \
37               -I$(top_builddir)/$(OS) \
38               -I$(top_srcdir)/$(OS) \
39               -I$(top_builddir) \
40               -I$(top_srcdir)
41 AM_LDFLAGS = $(ARCH_MFLAGS)
42
43 libtests_a_SOURCES = \
44         error_msg.c \
45         get_page_size.c \
46         hexdump_strdup.c \
47         hexquote_strndup.c \
48         inode_of_sockfd.c \
49         tail_alloc.c \
50         tests.h \
51         tprintf.c \
52         # end of libtests_a_SOURCES
53 libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
54 check_LIBRARIES = libtests.a
55 LDADD = libtests.a
56
57 check_PROGRAMS = \
58         _newselect \
59         adjtimex \
60         aio \
61         attach-p-cmd-cmd \
62         attach-p-cmd-p \
63         bpf \
64         caps \
65         clock_nanosleep \
66         clock_xettime \
67         epoll_create1 \
68         eventfd \
69         execve \
70         execveat \
71         fanotify_mark \
72         fcntl \
73         fcntl64 \
74         file_handle \
75         filter-unavailable \
76         fork-f \
77         fstat \
78         fstat64 \
79         fstatat64 \
80         ftruncate \
81         ftruncate64 \
82         getdents \
83         getdents64 \
84         getrandom \
85         getxxid \
86         inet-cmsg \
87         ioctl \
88         ip_mreq \
89         ipc_msg \
90         ipc_msgbuf \
91         ipc_sem \
92         ipc_shm \
93         ksysent \
94         llseek \
95         lseek \
96         lstat \
97         lstat64 \
98         membarrier \
99         memfd_create \
100         mincore \
101         mlock2 \
102         mmap \
103         mmap64 \
104         mmsg \
105         mq \
106         nanosleep \
107         net-accept-connect \
108         net-y-unix \
109         net-yy-inet \
110         net-yy-unix \
111         netlink_inet_diag \
112         netlink_unix_diag \
113         newfstatat \
114         oldselect \
115         pc \
116         personality \
117         pipe \
118         ppoll \
119         pselect6 \
120         readdir \
121         readlink \
122         readlinkat \
123         readv \
124         recvmsg \
125         restart_syscall \
126         rt_sigqueueinfo \
127         sched_xetaffinity \
128         sched_xetattr \
129         scm_rights \
130         seccomp \
131         select \
132         sendfile \
133         sendfile64 \
134         set_ptracer_any \
135         sigaction \
136         sigaltstack \
137         signalfd \
138         sigreturn \
139         stack-fcall \
140         sleep \
141         stat \
142         stat64 \
143         statfs \
144         sysinfo \
145         time \
146         timer_create \
147         timer_xettime \
148         timerfd_xettime \
149         times \
150         times-fail \
151         truncate \
152         truncate64 \
153         uid \
154         uid16 \
155         uid32 \
156         uio \
157         umount \
158         umount2 \
159         umovestr \
160         umovestr2 \
161         unix-pair-send-recv \
162         userfaultfd \
163         utime \
164         utimensat \
165         vfork-f \
166         wait \
167         xattr \
168         xet_robust_list \
169         xetitimer \
170         xettimeofday \
171         # end of check_PROGRAMS
172
173 clock_xettime_LDADD = -lrt $(LDADD)
174 filter_unavailable_LDADD = -lpthread $(LDADD)
175 fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
176 fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
177 ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
178 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
179 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
180 mq_LDADD = -lrt $(LDADD)
181 newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
182 pc_LDADD = $(dl_LIBS) $(LDADD)
183 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
184 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
185 times_LDADD = -lrt $(LDADD)
186 truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
187 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
188 stack_fcall_SOURCES = stack-fcall.c \
189         stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c
190
191 if USE_LIBUNWIND
192 LIBUNWIND_TESTS = strace-k.test
193 else
194 LIBUNWIND_TESTS =
195 endif
196
197 TESTS = \
198         strace-f.test \
199         qual_syscall.test \
200         ksysent.test \
201         \
202         _newselect.test \
203         adjtimex.test \
204         aio.test \
205         bexecve.test \
206         bpf.test \
207         caps.test \
208         clock_nanosleep.test \
209         clock_xettime.test \
210         dumpio.test \
211         epoll_create1.test \
212         eventfd.test \
213         execve.test \
214         execveat.test \
215         fanotify_mark.test \
216         fcntl.test \
217         fcntl64.test \
218         file_handle.test \
219         filter-unavailable.test \
220         fork-f.test \
221         fstat.test \
222         fstat64.test \
223         fstatat64.test \
224         ftruncate.test \
225         ftruncate64.test \
226         getdents.test \
227         getdents64.test \
228         getrandom.test \
229         getxxid.test \
230         inet-cmsg.test \
231         ioctl.test \
232         ip_mreq.test \
233         ipc_msg.test \
234         ipc_msgbuf.test \
235         ipc_sem.test \
236         ipc_shm.test \
237         llseek.test \
238         lseek.test \
239         lstat.test \
240         lstat64.test \
241         membarrier.test \
242         memfd_create.test \
243         mincore.test \
244         mlock2.test \
245         mmap.test \
246         mmap64.test \
247         mmsg.test \
248         mq.test \
249         nanosleep.test \
250         net-y-unix.test \
251         net-yy-inet.test \
252         net-yy-unix.test \
253         net.test \
254         newfstatat.test \
255         oldselect.test \
256         pc.test \
257         personality.test \
258         pipe.test \
259         ppoll.test \
260         pselect6.test \
261         readdir.test \
262         readlink.test \
263         readlinkat.test \
264         readv.test \
265         recvmsg.test \
266         rt_sigqueueinfo.test \
267         sched_xetaffinity.test \
268         sched_xetattr.test \
269         scm_rights-fd.test \
270         seccomp.test \
271         select.test \
272         sendfile.test \
273         sendfile64.test \
274         sigaction.test \
275         sigaltstack.test \
276         signalfd.test \
277         sigreturn.test \
278         stat.test \
279         stat64.test \
280         statfs.test \
281         sun_path.test \
282         sysinfo.test \
283         time.test \
284         timer_create.test \
285         timer_xettime.test \
286         timerfd_xettime.test \
287         times-fail.test \
288         times.test \
289         truncate.test \
290         truncate64.test \
291         uid.test \
292         uid16.test \
293         uid32.test \
294         uio.test \
295         umount.test \
296         umount2.test \
297         umovestr.test \
298         umovestr2.test \
299         userfaultfd.test \
300         utime.test \
301         utimensat.test \
302         vfork-f.test \
303         wait.test \
304         xattr.test \
305         xet_robust_list.test \
306         xetitimer.test \
307         xettimeofday.test \
308         \
309         count.test \
310         attach-p-cmd.test \
311         detach-sleeping.test \
312         detach-stopped.test \
313         detach-running.test \
314         restart_syscall.test \
315         $(LIBUNWIND_TESTS)
316
317 XFAIL_TESTS_ =
318 XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS)
319 XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
320 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME))
321
322 TEST_LOG_COMPILER = env
323 AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh
324
325 EXTRA_DIST = init.sh run.sh match.awk \
326              caps.awk \
327              dumpio.expected \
328              eventfd.expected \
329              execve.expected \
330              execve-v.expected \
331              execveat.expected \
332              execveat-v.expected \
333              fanotify_mark.expected \
334              filter-unavailable.expected \
335              fstatat.c \
336              fstatx.c \
337              ip_mreq.expected \
338              ipc.sh \
339              ipc_msgbuf.expected \
340              ksysent.sed \
341              lstatx.c \
342              memfd_create.expected \
343              mq.expected \
344              net.expected \
345              oldselect.expected \
346              pipe.expected \
347              ppoll.expected \
348              ppoll-v.expected \
349              sigaction.awk \
350              sigaltstack.expected \
351              signalfd.expected \
352              statfs.expected \
353              statx.sh \
354              struct_flock.c \
355              sun_path.expected \
356              uid.awk \
357              uio.expected \
358              umovestr.expected \
359              wait.expected \
360              xattr.expected \
361              xselect.c \
362              xstatx.c \
363              $(TESTS)
364
365 ksysent.h: $(srcdir)/ksysent.sed
366         echo '#include <asm/unistd.h>' | \
367                 $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dD - > $@.t1
368         LC_COLLATE=C sed -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2
369         mv -f $@.t2 $@
370         rm -f $@.t1
371
372 BUILT_SOURCES = ksysent.h
373 CLEANFILES = ksysent.h $(TESTS:=.tmp)