Bug 480706 - Unhandled syscall 325 (mlock2)
[valgrind.git] / memcheck / tests / linux / Makefile.am
blob9a950d84817b2bcf2582e76410a7d917f0e1eb25
2 include $(top_srcdir)/Makefile.tool-tests.am
4 dist_noinst_SCRIPTS = filter_stderr
6 EXTRA_DIST = \
7         aligned_alloc.vgtest aligned_alloc.stderr.exp \
8                 aligned_alloc.stderr.exp-musl \
9                 aligned_alloc.stderr.exp-glibc238 \
10         brk.stderr.exp brk.vgtest \
11         bug480706.stderr.exp bug480706.vgtest \
12         capget.vgtest capget.stderr.exp capget.stderr.exp2 capget.stderr.exp3 \
13         debuginfod-check.stderr.exp debuginfod-check.vgtest.in \
14         debuginfod-check.pl \
15         dlclose_leak-no-keep.stderr.exp dlclose_leak-no-keep.stdout.exp \
16             dlclose_leak-no-keep.vgtest \
17         dlclose_leak.stderr.exp dlclose_leak.stdout.exp \
18             dlclose_leak.vgtest \
19         ioctl-tiocsig.vgtest ioctl-tiocsig.stderr.exp \
20         lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \
21         lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \
22         memfd_create.vgtest memfd_create.stderr.exp \
23                 memfd_create.stderr.exp-fcntl64 \
24         rfcomm.vgtest rfcomm.stderr.exp \
25         sigqueue.vgtest sigqueue.stderr.exp \
26         stack_changes.stderr.exp stack_changes.stdout.exp \
27             stack_changes.stdout.exp2 stack_changes.vgtest \
28         stack_switch.stderr.exp stack_switch.vgtest \
29         syscalls-2007.vgtest syscalls-2007.stderr.exp \
30         syslog-syscall.vgtest syslog-syscall.stderr.exp \
31         sys-copy_file_range.vgtest sys-copy_file_range.stderr.exp \
32         sys-openat.vgtest sys-openat.stderr.exp sys-openat.stdout.exp \
33         sys-statx.vgtest sys-statx.stderr.exp \
34         timerfd-syscall.vgtest timerfd-syscall.stderr.exp \
35         with-space.stderr.exp with-space.stdout.exp with-space.vgtest \
36         proc-auxv.vgtest proc-auxv.stderr.exp getregset.vgtest \
37         getregset.stderr.exp getregset.stdout.exp \
38         strlcat_strlcpy.vgtest strlcat_strlcpy.stderr.exp \
39         sys-preadv_pwritev.vgtest sys-preadv_pwritev.stderr.exp \
40         sys-preadv2_pwritev2.vgtest sys-preadv2_pwritev2.stderr.exp \
41         sys-execveat.vgtest sys-execveat.stderr.exp sys-execveat.stdout.exp \
42         enomem.vgtest enomem.stderr.exp enomem.stdout.exp \
43         memalign.vgtest memalign.stderr.exp \
44                 memalign.stderr.exp-musl
46 check_PROGRAMS = \
47         aligned_alloc \
48         brk \
49         capget \
50         check_preadv2_pwritev2 \
51         debuginfod-check \
52         dlclose_leak dlclose_leak_so.so \
53         ioctl-tiocsig \
54         getregset \
55         lsframe1 \
56         lsframe2 \
57         rfcomm \
58         sigqueue \
59         stack_switch \
60         syscalls-2007 \
61         syslog-syscall \
62         sys-statx \
63         timerfd-syscall \
64         proc-auxv \
65         sys-execveat \
66         check_execveat \
67         enomem \
68         memalign
70 if HAVE_OPENSSL
71 check_PROGRAMS += bug480706
72 endif
74 if HAVE_AT_FDCWD
75 check_PROGRAMS += sys-openat
76 endif
78 if HAVE_MEMFD_CREATE
79 check_PROGRAMS += memfd_create
80 endif
82 if HAVE_COPY_FILE_RANGE
83         check_PROGRAMS += sys-copy_file_range
84 endif
86 if HAVE_PREADV_PWRITEV
87         check_PROGRAMS += sys-preadv_pwritev
88 endif
90 if HAVE_PREADV2_PWRITEV2
91         check_PROGRAMS += sys-preadv2_pwritev2
92 endif
94 if HAVE_SETCONTEXT
95         check_PROGRAMS += stack_changes
96 endif
98 if HAVE_STRLCAT
99         check_PROGRAMS += strlcat_strlcpy
100 endif
102 AM_CFLAGS   += $(AM_FLAG_M3264_PRI)
103 AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
105 stack_switch_LDADD    = -lpthread
106 timerfd_syscall_LDADD = -lrt
108 if HAVE_OPENSSL
109 bug480706_LDFLAGS             = ${AM_LDFLAGS} -lcrypto
110 endif
112 # Build shared object for dlclose_leak
113 dlclose_leak_so_so_SOURCES    = dlclose_leak_so.c
114 dlclose_leak_so_so_CFLAGS     = $(AM_CFLAGS) -fpic -g -O0
115 dlclose_leak_so_so_LDFLAGS    = -fpic $(AM_FLAG_M3264_PRI) -shared -Wl,-soname \
116                               -Wl,dlclose_leak_so.so
118 dlclose_leak_SOURCES          = dlclose_leak.c
119 dlclose_leak_DEPENDENCIES     = dlclose_leak_so.so
120 # Do NOT uncomment the below line: we must not link with the .so,
121 # in order to properly test a 'fully dynamic' use of dlopen/dlclose
122 # dlclose_leak_LDADD            = dlclose_leak_so.so
123 dlclose_leak_LDADD            = -ldl
124 dlclose_leak_LDFLAGS          = $(AM_FLAG_M3264_PRI) \
125                                 -Wl,-rpath,$(top_builddir)/memcheck/tests/linux
127 enomem_CFLAGS                 = $(AM_CFLAGS) @FLAG_W_NO_USE_AFTER_FREE@
128 if HAVE_STRLCAT
129 strlcat_strlcpy_CFLAGS        = $(AM_CFLAGS) @FLAG_W_NO_STRINGOP_OVERFLOW@
130 endif
131 sys_preadv_pwritev_CFLAGS     = $(AM_CFLAGS) @FLAG_W_NO_STRINGOP_OVERFLOW@ @FLAG_W_NO_STRINGOP_OVERREAD@ \
132                                 @FLAG_W_NO_NONNULL@
133 sys_preadv2_pwritev2_CFLAGS   = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ @FLAG_W_NO_STRINGOP_OVERREAD@ \
134                                 @FLAG_W_NO_STRINGOP_OVERFLOW@