1 1.80 christos # $NetBSD: Makefile,v 1.80 2025/10/10 15:53:55 christos Exp $ 2 1.1 christos 3 1.1 christos MKMAN= no 4 1.1 christos 5 1.1 christos .include <bsd.own.mk> 6 1.1 christos 7 1.7 jym .include "../arch/Makefile.exec_prot" 8 1.7 jym 9 1.1 christos TESTSDIR= ${TESTSBASE}/lib/libc/sys 10 1.1 christos 11 1.4 jruoho TESTS_C+= t_access 12 1.80 christos TESTS_C+= t_aio_cancel 13 1.80 christos TESTS_C+= t_aio_lio 14 1.80 christos TESTS_C+= t_aio_rw 15 1.80 christos TESTS_C+= t_aio_suspend 16 1.38 martin TESTS_C+= t_bind 17 1.4 jruoho TESTS_C+= t_chroot 18 1.13 jruoho TESTS_C+= t_clock_gettime 19 1.45 njoly TESTS_C+= t_clock_nanosleep 20 1.2 pgoyette TESTS_C+= t_clone 21 1.19 jruoho TESTS_C+= t_connect 22 1.4 jruoho TESTS_C+= t_dup 23 1.69 thorpej TESTS_C+= t_eventfd 24 1.51 kamil TESTS_C+= t_fork 25 1.4 jruoho TESTS_C+= t_fsync 26 1.63 thorpej TESTS_C+= t_futex_ops 27 1.63 thorpej TESTS_C+= t_futex_robust 28 1.5 jruoho TESTS_C+= t_getcontext 29 1.4 jruoho TESTS_C+= t_getgroups 30 1.4 jruoho TESTS_C+= t_getitimer 31 1.4 jruoho TESTS_C+= t_getlogin 32 1.4 jruoho TESTS_C+= t_getpid 33 1.67 riastrad TESTS_C+= t_getrandom 34 1.4 jruoho TESTS_C+= t_getrusage 35 1.4 jruoho TESTS_C+= t_getsid 36 1.43 njoly TESTS_C+= t_getsockname 37 1.4 jruoho TESTS_C+= t_gettimeofday 38 1.4 jruoho TESTS_C+= t_issetugid 39 1.20 christos TESTS_C+= t_kevent 40 1.4 jruoho TESTS_C+= t_kill 41 1.4 jruoho TESTS_C+= t_link 42 1.19 jruoho TESTS_C+= t_listen 43 1.80 christos TESTS_C+= t_lwp_create 44 1.21 jruoho TESTS_C+= t_lwp_ctl 45 1.80 christos TESTS_C+= t_mincore 46 1.36 christos TESTS_C+= t_minherit 47 1.12 jruoho TESTS_C+= t_mkdir 48 1.4 jruoho TESTS_C+= t_mkfifo 49 1.4 jruoho TESTS_C+= t_mknod 50 1.22 jruoho TESTS_C+= t_mlock 51 1.4 jruoho TESTS_C+= t_mmap 52 1.4 jruoho TESTS_C+= t_mprotect 53 1.18 jruoho TESTS_C+= t_msgctl 54 1.18 jruoho TESTS_C+= t_msgget 55 1.18 jruoho TESTS_C+= t_msgrcv 56 1.18 jruoho TESTS_C+= t_msgsnd 57 1.4 jruoho TESTS_C+= t_msync 58 1.4 jruoho TESTS_C+= t_nanosleep 59 1.11 jruoho TESTS_C+= t_pipe 60 1.17 christos TESTS_C+= t_pipe2 61 1.4 jruoho TESTS_C+= t_poll 62 1.66 kamil TESTS_C+= t_pollts 63 1.37 christos TESTS_C+= t_posix_fallocate 64 1.66 kamil TESTS_C+= t_ppoll 65 1.49 kamil TESTS_C+= t_ptrace 66 1.77 christos TESTS_C+= t_ptrace_kill 67 1.61 kamil TESTS_C+= t_ptrace_sigchld 68 1.49 kamil TESTS_C+= t_ptrace_wait 69 1.49 kamil TESTS_C+= t_ptrace_wait3 70 1.49 kamil TESTS_C+= t_ptrace_wait4 71 1.49 kamil TESTS_C+= t_ptrace_wait6 72 1.49 kamil TESTS_C+= t_ptrace_waitid 73 1.49 kamil TESTS_C+= t_ptrace_waitpid 74 1.26 christos TESTS_C+= t_recvmmsg 75 1.4 jruoho TESTS_C+= t_revoke 76 1.4 jruoho TESTS_C+= t_select 77 1.53 christos TESTS_C+= t_sendmmsg 78 1.53 christos TESTS_C+= t_sendrecv 79 1.4 jruoho TESTS_C+= t_setrlimit 80 1.4 jruoho TESTS_C+= t_setuid 81 1.16 jruoho TESTS_C+= t_sigaction 82 1.64 ryo TESTS_C+= t_sigaltstack 83 1.3 pgoyette TESTS_C+= t_sigqueue 84 1.32 martin TESTS_C+= t_sigtimedwait 85 1.19 jruoho TESTS_C+= t_socketpair 86 1.80 christos TESTS_C+= t_stat 87 1.28 manu TESTS_C+= t_swapcontext 88 1.52 martin TESTS_C+= t_syscall 89 1.4 jruoho TESTS_C+= t_timer_create 90 1.69 thorpej TESTS_C+= t_timerfd 91 1.4 jruoho TESTS_C+= t_truncate 92 1.15 jruoho TESTS_C+= t_ucontext 93 1.4 jruoho TESTS_C+= t_umask 94 1.4 jruoho TESTS_C+= t_unlink 95 1.51 kamil TESTS_C+= t_vfork 96 1.42 christos TESTS_C+= t_wait 97 1.44 kamil TESTS_C+= t_wait_noproc 98 1.44 kamil TESTS_C+= t_wait_noproc_wnohang 99 1.14 jruoho TESTS_C+= t_write 100 1.4 jruoho 101 1.62 christos SRCS.t_mprotect= t_mprotect.c ${SRCS_EXEC_PROT} t_mprotect_helper.c 102 1.7 jym 103 1.80 christos LDADD.t_aio_cancel+= -lrt -lpthread 104 1.80 christos LDADD.t_aio_suspend+= -lrt -lpthread 105 1.80 christos LDADD.t_aio_rw+= -lrt -lpthread 106 1.80 christos LDADD.t_aio_lio+= -lrt -lpthread 107 1.80 christos 108 1.69 thorpej LDADD.t_eventfd+= -lpthread 109 1.69 thorpej LDADD.t_getpid+= -lpthread 110 1.78 riastrad LDADD.t_mmap+= -lpthread 111 1.78 riastrad LDADD.t_poll+= -lpthread 112 1.77 christos LDADD.t_ptrace_kill+= -lpthread 113 1.69 thorpej LDADD.t_timerfd+= -lpthread 114 1.27 christos 115 1.61 kamil LDADD.t_ptrace_sigchld+= -pthread -lm 116 1.61 kamil 117 1.57 mgorny LDADD.t_ptrace_wait+= -pthread -lm -lelf 118 1.57 mgorny LDADD.t_ptrace_wait3+= -pthread -lm -lelf 119 1.57 mgorny LDADD.t_ptrace_wait4+= -pthread -lm -lelf 120 1.57 mgorny LDADD.t_ptrace_wait6+= -pthread -lm -lelf 121 1.57 mgorny LDADD.t_ptrace_waitid+= -pthread -lm -lelf 122 1.57 mgorny LDADD.t_ptrace_waitpid+= -pthread -lm -lelf 123 1.54 kamil 124 1.39 matt .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE) 125 1.40 christos CPPFLAGS.t_posix_fadvise.c += -D_KERNTYPES 126 1.27 christos TESTS_C+= t_posix_fadvise 127 1.60 christos LDADD.t_posix_fadvise+= ${LIBRUMPBASE} 128 1.27 christos .endif 129 1.4 jruoho 130 1.63 thorpej CPPFLAGS.t_futex_ops.c += -I${.CURDIR}/../../../../lib 131 1.63 thorpej CPPFLAGS.t_futex_robust.c += -I${.CURDIR}/../../../../lib 132 1.63 thorpej 133 1.70 hannken CPPFLAGS.t_timerfd.c += -I${.CURDIR}/../gen 134 1.70 hannken 135 1.72 kre CPPFLAGE.t_clone.c += -D_NETBSD_SOURCE -D_GNU_SOURCE 136 1.49 kamil CPPFLAGS.t_lwp_create.c += -D_KERNTYPES 137 1.65 rin CPPFLAGS.t_ptrace_sigchld.c += -D__TEST_FENV 138 1.55 kamil CPPFLAGS.t_ptrace_wait.c += -D_KERNTYPES -D__TEST_FENV 139 1.55 kamil CPPFLAGS.t_ptrace_wait3.c += -D_KERNTYPES -D__TEST_FENV 140 1.55 kamil CPPFLAGS.t_ptrace_wait4.c += -D_KERNTYPES -D__TEST_FENV 141 1.55 kamil CPPFLAGS.t_ptrace_wait6.c += -D_KERNTYPES -D__TEST_FENV 142 1.55 kamil CPPFLAGS.t_ptrace_waitid.c += -D_KERNTYPES -D__TEST_FENV 143 1.55 kamil CPPFLAGS.t_ptrace_waitpid.c += -D_KERNTYPES -D__TEST_FENV 144 1.50 kamil CPPFLAGS.t_ucontext.c += -D_KERNTYPES 145 1.41 christos 146 1.58 kamil .if ${MKSANITIZER:Uno} != "yes" && ${MKLIBCSANITIZER:Uno} != "yes" 147 1.58 kamil CPPFLAGS.t_ptrace_wait.c += -DENABLE_TESTS 148 1.58 kamil CPPFLAGS.t_ptrace_wait3.c += -DENABLE_TESTS 149 1.58 kamil CPPFLAGS.t_ptrace_wait4.c += -DENABLE_TESTS 150 1.58 kamil CPPFLAGS.t_ptrace_wait6.c += -DENABLE_TESTS 151 1.58 kamil CPPFLAGS.t_ptrace_waitid.c += -DENABLE_TESTS 152 1.58 kamil CPPFLAGS.t_ptrace_waitpid.c += -DENABLE_TESTS 153 1.58 kamil .endif 154 1.58 kamil 155 1.46 christos FILES= truncate_test.root_owned 156 1.47 pgoyette FILESBUILD= yes 157 1.48 martin FILESDIR_truncate_test.root_owned= ${TESTSDIR} 158 1.48 martin FILESMODE_truncate_test.root_owned= 0600 159 1.48 martin FILESOWNER_truncate_test.root_owned= root 160 1.48 martin FILESGRP_truncate_test.root_owned= wheel 161 1.46 christos 162 1.46 christos CLEANFILES= truncate_test.root_owned 163 1.46 christos truncate_test.root_owned: 164 1.79 riastrad @${_MKTARGET_CREATE} 165 1.79 riastrad touch ${.TARGET} 166 1.46 christos 167 1.4 jruoho WARNS= 4 168 1.1 christos 169 1.73 lukem CWARNFLAGS.gcc+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} \ 170 1.68 mrg ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-error=deprecated :} 171 1.68 mrg 172 1.74 mrg # Explicitly breaks this 173 1.74 mrg COPTS.t_wait.c+= ${CC_WNO_ARRAY_BOUNDS} ${CC_WNO_STRINGOP_OVERFLOW} 174 1.74 mrg 175 1.1 christos .include <bsd.test.mk> 176