| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
subdir := io |
| 22 |
|
| 23 |
include ../Makeconfig |
| 24 |
|
| 25 |
headers := \ |
| 26 |
bits/fcntl.h \ |
| 27 |
bits/fcntl2.h \ |
| 28 |
bits/poll.h \ |
| 29 |
bits/poll2.h \ |
| 30 |
bits/stat.h \ |
| 31 |
bits/statfs.h \ |
| 32 |
bits/statvfs.h \ |
| 33 |
bits/statx-generic.h \ |
| 34 |
bits/statx.h \ |
| 35 |
bits/types/struct_statx.h \ |
| 36 |
bits/types/struct_statx_timestamp.h \ |
| 37 |
fcntl.h \ |
| 38 |
fts.h \ |
| 39 |
ftw.h \ |
| 40 |
poll.h \ |
| 41 |
sys/fcntl.h \ |
| 42 |
sys/poll.h \ |
| 43 |
sys/sendfile.h \ |
| 44 |
sys/stat.h \ |
| 45 |
sys/statfs.h \ |
| 46 |
sys/statvfs.h \ |
| 47 |
sys/vfs.h \ |
| 48 |
utime.h \ |
| 49 |
# headers |
| 50 |
|
| 51 |
routines := \ |
| 52 |
access \ |
| 53 |
chdir \ |
| 54 |
chmod \ |
| 55 |
chown \ |
| 56 |
close \ |
| 57 |
close_range \ |
| 58 |
closefrom \ |
| 59 |
copy_file_range \ |
| 60 |
creat \ |
| 61 |
creat64 \ |
| 62 |
dup \ |
| 63 |
dup2 \ |
| 64 |
dup3 \ |
| 65 |
euidaccess \ |
| 66 |
faccessat \ |
| 67 |
fchdir \ |
| 68 |
fchmod \ |
| 69 |
fchmodat \ |
| 70 |
fchown \ |
| 71 |
fchownat \ |
| 72 |
fcntl \ |
| 73 |
fcntl64 \ |
| 74 |
file_change_detection \ |
| 75 |
flock \ |
| 76 |
fstat \ |
| 77 |
fstat64 \ |
| 78 |
fstatat \ |
| 79 |
fstatat64 \ |
| 80 |
fstatfs \ |
| 81 |
fstatfs64 \ |
| 82 |
fstatvfs \ |
| 83 |
fstatvfs64 \ |
| 84 |
fts \ |
| 85 |
fts64 \ |
| 86 |
fts64-time64 \ |
| 87 |
ftw \ |
| 88 |
ftw64 \ |
| 89 |
ftw64-time64 \ |
| 90 |
futimens \ |
| 91 |
getcwd \ |
| 92 |
getdirname \ |
| 93 |
getwd \ |
| 94 |
lchmod \ |
| 95 |
lchown \ |
| 96 |
link \ |
| 97 |
linkat \ |
| 98 |
lockf \ |
| 99 |
lockf64 \ |
| 100 |
lseek \ |
| 101 |
lseek64 \ |
| 102 |
lstat \ |
| 103 |
lstat64 \ |
| 104 |
mkdir \ |
| 105 |
mkdirat \ |
| 106 |
mkfifo \ |
| 107 |
mkfifoat \ |
| 108 |
mknod \ |
| 109 |
mknodat \ |
| 110 |
open \ |
| 111 |
open64 \ |
| 112 |
open64_2 \ |
| 113 |
open_2 \ |
| 114 |
openat \ |
| 115 |
openat64 \ |
| 116 |
openat64_2 \ |
| 117 |
openat_2 \ |
| 118 |
pipe \ |
| 119 |
pipe2 \ |
| 120 |
poll \ |
| 121 |
posix_fadvise \ |
| 122 |
posix_fadvise64 \ |
| 123 |
posix_fallocate \ |
| 124 |
posix_fallocate64 \ |
| 125 |
ppoll \ |
| 126 |
read \ |
| 127 |
readlink \ |
| 128 |
readlinkat \ |
| 129 |
rmdir \ |
| 130 |
sendfile \ |
| 131 |
sendfile64 \ |
| 132 |
stat \ |
| 133 |
stat64 \ |
| 134 |
statfs \ |
| 135 |
statfs64 \ |
| 136 |
statvfs \ |
| 137 |
statvfs64 \ |
| 138 |
statx \ |
| 139 |
symlink \ |
| 140 |
symlinkat \ |
| 141 |
ttyname \ |
| 142 |
ttyname_r \ |
| 143 |
umask \ |
| 144 |
unlink \ |
| 145 |
unlinkat \ |
| 146 |
utime \ |
| 147 |
utimensat \ |
| 148 |
write \ |
| 149 |
# routines |
| 150 |
|
| 151 |
|
| 152 |
routines_no_fortify += \ |
| 153 |
getcwd \ |
| 154 |
getwd \ |
| 155 |
open \ |
| 156 |
open64 \ |
| 157 |
openat \ |
| 158 |
openat64 \ |
| 159 |
poll \ |
| 160 |
ppoll \ |
| 161 |
read \ |
| 162 |
readlink \ |
| 163 |
readlinkat \ |
| 164 |
ttyname_r \ |
| 165 |
# routines_no_fortify |
| 166 |
|
| 167 |
others := \ |
| 168 |
pwd \ |
| 169 |
# others |
| 170 |
|
| 171 |
test-srcs := \ |
| 172 |
ftwtest \ |
| 173 |
ftwtest-time64 \ |
| 174 |
# test-srcs |
| 175 |
|
| 176 |
tests := \ |
| 177 |
bug-ftw1 \ |
| 178 |
bug-ftw2 \ |
| 179 |
bug-ftw3 \ |
| 180 |
bug-ftw4 \ |
| 181 |
bug-ftw5 \ |
| 182 |
test-lfs \ |
| 183 |
test-stat \ |
| 184 |
test-stat2 \ |
| 185 |
test-utime \ |
| 186 |
tst-close_range \ |
| 187 |
tst-closefrom \ |
| 188 |
tst-copy_file_range \ |
| 189 |
tst-faccessat \ |
| 190 |
tst-faccessat-setuid \ |
| 191 |
tst-fchmod-errors \ |
| 192 |
tst-fchmod-fuse \ |
| 193 |
tst-fchmodat \ |
| 194 |
tst-fchownat \ |
| 195 |
tst-fcntl \ |
| 196 |
tst-fcntl-lock \ |
| 197 |
tst-fcntl-lock-lfs \ |
| 198 |
tst-fstatat \ |
| 199 |
tst-fts \ |
| 200 |
tst-fts-lfs \ |
| 201 |
tst-ftw-bz26353 \ |
| 202 |
tst-ftw-bz28126 \ |
| 203 |
tst-ftw-lnk \ |
| 204 |
tst-futimens \ |
| 205 |
tst-futimes \ |
| 206 |
tst-futimesat \ |
| 207 |
tst-getcwd \ |
| 208 |
tst-getcwd-abspath \ |
| 209 |
tst-lchmod \ |
| 210 |
tst-linkat \ |
| 211 |
tst-lockf \ |
| 212 |
tst-lstat-nofollow \ |
| 213 |
tst-lutimes \ |
| 214 |
tst-mkdirat \ |
| 215 |
tst-mkfifoat \ |
| 216 |
tst-mknodat \ |
| 217 |
tst-open-tmpfile \ |
| 218 |
tst-openat \ |
| 219 |
tst-posix_fallocate \ |
| 220 |
tst-posix_fallocate64 \ |
| 221 |
tst-read-zero \ |
| 222 |
tst-readlinkat \ |
| 223 |
tst-renameat \ |
| 224 |
tst-stat \ |
| 225 |
tst-stat-lfs \ |
| 226 |
tst-statvfs \ |
| 227 |
tst-symlinkat \ |
| 228 |
tst-ttyname_r \ |
| 229 |
tst-unlinkat \ |
| 230 |
tst-utime \ |
| 231 |
tst-utimensat \ |
| 232 |
tst-utimes \ |
| 233 |
# tests |
| 234 |
|
| 235 |
tests-time64 := \ |
| 236 |
tst-fcntl-time64 \ |
| 237 |
tst-fts-time64 \ |
| 238 |
tst-fts-time64-y2038 \ |
| 239 |
tst-futimens-time64 \ |
| 240 |
tst-futimes-time64\ |
| 241 |
tst-futimesat-time64 \ |
| 242 |
tst-lchmod-time64 \ |
| 243 |
tst-lstat-nofollow-time64 \ |
| 244 |
tst-lutimes-time64 \ |
| 245 |
tst-stat-time64 \ |
| 246 |
tst-utime-time64 \ |
| 247 |
tst-utimensat-time64 \ |
| 248 |
tst-utimes-time64 \ |
| 249 |
# tests-time64 |
| 250 |
|
| 251 |
|
| 252 |
tests-internal += \ |
| 253 |
tst-file_change_detection \ |
| 254 |
tst-statx \ |
| 255 |
# tests-internal |
| 256 |
|
| 257 |
tests-static += \ |
| 258 |
tst-statx \ |
| 259 |
# tests-static |
| 260 |
|
| 261 |
ifeq ($(run-built-tests),yes) |
| 262 |
tests-special += \ |
| 263 |
$(objpfx)ftwtest-time64.out \ |
| 264 |
$(objpfx)ftwtest.out \ |
| 265 |
# tests-special |
| 266 |
endif |
| 267 |
|
| 268 |
include ../Rules |
| 269 |
|
| 270 |
CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables |
| 271 |
CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables |
| 272 |
CFLAGS-creat.c += -fexceptions -fasynchronous-unwind-tables |
| 273 |
CFLAGS-creat64.c += -fexceptions -fasynchronous-unwind-tables |
| 274 |
CFLAGS-fcntl.c += -fexceptions -fasynchronous-unwind-tables |
| 275 |
CFLAGS-fcntl64.c += -fexceptions -fasynchronous-unwind-tables |
| 276 |
CFLAGS-poll.c += -fexceptions -fasynchronous-unwind-tables |
| 277 |
CFLAGS-ppoll.c += -fexceptions -fasynchronous-unwind-tables |
| 278 |
CFLAGS-lockf.c += -fexceptions -fasynchronous-unwind-tables |
| 279 |
CFLAGS-lockf64.c += -fexceptions -fasynchronous-unwind-tables |
| 280 |
CFLAGS-statfs.c += -fexceptions |
| 281 |
CFLAGS-fstatfs.c += -fexceptions |
| 282 |
CFLAGS-statvfs.c += -fexceptions |
| 283 |
CFLAGS-fstatvfs.c += -fexceptions |
| 284 |
CFLAGS-fts.c += -Wno-uninitialized $(uses-callbacks) -fexceptions |
| 285 |
CFLAGS-fts64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions |
| 286 |
CFLAGS-fts64-time64.c += -Wno-uninitialized $(uses-callbacks) -fexceptions |
| 287 |
CFLAGS-ftw.c += $(uses-callbacks) -fexceptions |
| 288 |
CFLAGS-ftw64.c += $(uses-callbacks) -fexceptions |
| 289 |
CFLAGS-ftw64-time64.c += $(uses-callbacks) -fexceptions |
| 290 |
CFLAGS-posix_fallocate.c += -fexceptions |
| 291 |
CFLAGS-posix_fallocate64.c += -fexceptions |
| 292 |
CFLAGS-fallocate.c += -fexceptions |
| 293 |
CFLAGS-fallocate64.c += -fexceptions |
| 294 |
CFLAGS-read.c += -fexceptions -fasynchronous-unwind-tables |
| 295 |
CFLAGS-write.c += -fexceptions -fasynchronous-unwind-tables |
| 296 |
CFLAGS-close.c += -fexceptions -fasynchronous-unwind-tables |
| 297 |
CFLAGS-tst-read-zero.c += $(no-fortify-source) -D_FORTIFY_SOURCE=$(supported-fortify) |
| 298 |
|
| 299 |
CFLAGS-test-stat.c += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE |
| 300 |
CFLAGS-test-lfs.c += -D_LARGEFILE64_SOURCE |
| 301 |
CFLAGS-tst-lchmod.c += -D_FILE_OFFSET_BITS=64 |
| 302 |
|
| 303 |
test-stat2-ARGS = Makefile . $(objpfx)test-stat2 |
| 304 |
|
| 305 |
tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp |
| 306 |
|
| 307 |
tst-open-tmpfile-ARGS = --test-dir=$(objpfx) |
| 308 |
|
| 309 |
CFLAGS-ftwtest-time64.c += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 |
| 310 |
|
| 311 |
ifeq ($(run-built-tests),yes) |
| 312 |
$(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest |
| 313 |
$(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \ |
| 314 |
$(evaluate-test) |
| 315 |
|
| 316 |
$(objpfx)ftwtest-time64.out: ftwtest-sh $(objpfx)ftwtest-time64 |
| 317 |
$(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \ |
| 318 |
$(evaluate-test) |
| 319 |
endif |