1 1.88 riastrad # $NetBSD: Makefile,v 1.88 2025/04/20 22:31:00 riastradh Exp $ 2 1.1 jmmv 3 1.1 jmmv NOMAN= # defined 4 1.1 jmmv 5 1.1 jmmv .include <bsd.own.mk> 6 1.1 jmmv 7 1.1 jmmv TESTSDIR= ${TESTSBASE}/kernel 8 1.1 jmmv 9 1.43 kamil TESTS_SUBDIRS+= kqueue 10 1.83 riastrad TESTS_C+= t_cloexec 11 1.83 riastrad #TESTS_C+= t_epoll 12 1.85 riastrad TESTS_C+= t_execregs 13 1.73 christos TESTS_C+= t_fcntl 14 1.77 rjs .if ${MKRUMP} != "no" 15 1.76 riastrad TESTS_C+= t_fdrestart 16 1.77 rjs .endif 17 1.80 christos TESTS_C+= t_kauth_pr_47598 18 1.80 christos TESTS_C+= t_ksem 19 1.62 christos TESTS_C+= t_lock 20 1.31 pgoyette TESTS_C+= t_lockf 21 1.74 christos TESTS_C+= t_memfd_create 22 1.27 pgoyette TESTS_C+= t_mqueue 23 1.82 kre TESTS_C+= t_nanosleep 24 1.80 christos TESTS_C+= t_open_pr_57260 25 1.59 kamil TESTS_C+= t_proccwd 26 1.80 christos TESTS_C+= t_pty 27 1.80 christos TESTS_C+= t_semtimedop 28 1.78 pho TESTS_C+= t_signal_and_sp 29 1.28 pgoyette TESTS_C+= t_sysv 30 1.22 christos TESTS_C+= t_subr_prf 31 1.35 gson TESTS_C+= t_sysctl 32 1.49 christos TESTS_C+= t_timeleft 33 1.79 bad .if ${MKRUMP} != "no" 34 1.79 bad TESTS_C+= t_unmount 35 1.79 bad .endif 36 1.53 kamil TESTS_C+= t_zombie 37 1.1 jmmv 38 1.81 msaitoh TESTS_SH= t_fexecve 39 1.80 christos TESTS_SH+= t_fpufork 40 1.47 christos TESTS_SH+= t_interp 41 1.68 jruoho TESTS_SH+= t_magic_symlinks 42 1.67 jruoho TESTS_SH+= t_nointerpreter 43 1.60 christos TESTS_SH+= t_origin 44 1.50 christos TESTS_SH+= t_procpath 45 1.80 christos TESTS_SH+= t_ps_strings 46 1.70 martin .if ${MKRUMP} != "no" 47 1.69 yamaguch TESTS_SH+= t_simplehook 48 1.70 martin .endif 49 1.80 christos TESTS_SH+= t_trapsignal 50 1.80 christos TESTS_SH+= t_umountstress 51 1.81 msaitoh TESTS_SH+= t_umount 52 1.10 pgoyette 53 1.10 pgoyette BINDIR= ${TESTSDIR} 54 1.83 riastrad PROGS+= h_cloexec 55 1.85 riastrad PROGS+= h_execregs 56 1.88 riastrad PROGS+= h_execsp_dynamic 57 1.88 riastrad PROGS+= h_execsp_static 58 1.83 riastrad PROGS+= h_fexecve 59 1.80 christos PROGS+= h_fpufork 60 1.80 christos PROGS+= h_getprocpath 61 1.63 christos PROGS+= h_ps_strings1 62 1.10 pgoyette PROGS+= h_ps_strings2 63 1.48 christos PROGS+= h_segv 64 1.52 nakayama 65 1.52 nakayama SCRIPTSDIR= ${TESTSDIR} 66 1.52 nakayama SCRIPTS= h_interpreter.sh 67 1.1 jmmv 68 1.76 riastrad LDADD.t_fdrestart+= -lpthread 69 1.76 riastrad LDADD.t_fdrestart+= -lrumpnet_local 70 1.76 riastrad LDADD.t_fdrestart+= -lrumpnet_net 71 1.76 riastrad LDADD.t_fdrestart+= -lrumpnet_netinet 72 1.76 riastrad LDADD.t_fdrestart+= -lrumpnet 73 1.76 riastrad LDADD.t_fdrestart+= ${LIBRUMPBASE} 74 1.76 riastrad 75 1.29 nakayama LDADD.t_mqueue+= -lrt 76 1.29 nakayama 77 1.79 bad LDADD.t_unmount+= -lrumpfs_tmpfs 78 1.79 bad LDADD.t_unmount+= ${LIBRUMPBASE} 79 1.79 bad 80 1.26 christos 81 1.37 matt .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE) 82 1.26 christos TESTS_SUBDIRS+= tty 83 1.26 christos 84 1.26 christos TESTS_C+= t_extattrctl 85 1.26 christos TESTS_C+= t_filedesc 86 1.26 christos TESTS_C+= t_rnd 87 1.66 christos LDADD.t_extattrctl+= ${LIBRUMPBASE} 88 1.26 christos LDADD.t_filedesc+= ${LDADD.t_rnd} 89 1.66 christos LDADD.t_rnd+= -lrumpdev_rnd -lrumpdev ${LIBRUMPBASE} 90 1.26 christos 91 1.26 christos .endif 92 1.26 christos 93 1.51 christos LDADD.t_timeleft+= -lpthread 94 1.51 christos 95 1.44 kamil CPPFLAGS+= -D_KERNTYPES 96 1.79 bad CPPFLAGS.t_unmount.c+= -D_KMEMUSER -D__EXPOSE_MOUNT 97 1.2 pooka 98 1.88 riastrad ARCHDIR:= ${.PARSEDIR}/arch/${MACHINE_ARCH} 99 1.88 riastrad .PATH: ${ARCHDIR} 100 1.88 riastrad 101 1.88 riastrad .if exists(${ARCHDIR}/stack_pointer.h) 102 1.88 riastrad CPPFLAGS.t_signal_and_sp.c+= -I${ARCHDIR} -DHAVE_STACK_POINTER_H 103 1.88 riastrad .endif 104 1.88 riastrad 105 1.88 riastrad SRCS.t_signal_and_sp+= t_signal_and_sp.c 106 1.88 riastrad .if exists(${ARCHDIR}/signalsphandler.S) 107 1.88 riastrad CPPFLAGS.t_signal_and_sp.c+= -DHAVE_SIGNALSPHANDLER 108 1.88 riastrad SRCS.t_signal_and_sp+= signalsphandler.S 109 1.88 riastrad .endif 110 1.88 riastrad 111 1.88 riastrad SRCS.h_execsp_dynamic+= h_execsp.c 112 1.88 riastrad SRCS.h_execsp_static+= h_execsp.c 113 1.88 riastrad .if exists(${ARCHDIR}/execsp.S) 114 1.88 riastrad CPPFLAGS.t_signal_and_sp.c+= -DHAVE_EXECSP 115 1.88 riastrad SRCS.h_execsp_dynamic+= execsp.S 116 1.88 riastrad SRCS.h_execsp_static+= execsp.S 117 1.88 riastrad LDFLAGS.h_execsp_dynamic+= -Wl,-e,execsp_start 118 1.88 riastrad LDFLAGS.h_execsp_static+= -Wl,-e,execsp_start 119 1.88 riastrad .else 120 1.88 riastrad CPPFLAGS.h_execsp.c+= -Dexecsp_main=main 121 1.78 pho .endif 122 1.88 riastrad LDSTATIC.h_execsp_static= -static 123 1.78 pho 124 1.1 jmmv .PATH: ${NETBSDSRCDIR}/sys/kern 125 1.1 jmmv TESTS_C+= t_extent 126 1.1 jmmv SRCS.t_extent= t_extent.c subr_extent.c 127 1.39 christos CPPFLAGS.t_extent.c= -D_EXTENT_TESTING -D__POOL_EXPOSE -D_KERNTYPES 128 1.39 christos CPPFLAGS.subr_extent.c= -D_EXTENT_TESTING -D__POOL_EXPOSE -D_KERNTYPES 129 1.1 jmmv 130 1.84 riastrad TESTS_C+= t_time_arith 131 1.84 riastrad SRCS.t_time_arith= t_time_arith.c subr_time_arith.c 132 1.84 riastrad CPPFLAGS.t_time_arith.c+= -I${NETBSDSRCDIR}/sys -D_TIME_TESTING 133 1.84 riastrad CPPFLAGS.subr_time_arith.c+= -I${NETBSDSRCDIR}/sys -D_TIME_TESTING 134 1.84 riastrad LDADD.t_time_arith+= -lutil 135 1.84 riastrad 136 1.22 christos t_subr_prf.c: gen_t_subr_prf ${NETBSDSRCDIR}/sys/kern/subr_prf.c 137 1.22 christos ${HOST_SH} ${.ALLSRC} ${.TARGET} 138 1.61 kamil .if ${MKSANITIZER:Uno} == "yes" 139 1.61 kamil # These symbols will be redefined by MKSANITIZER 140 1.61 kamil ${TOOL_SED} -i '/undef .*printf/d' ${.TARGET} 141 1.61 kamil .endif 142 1.61 kamil 143 1.36 tls CPPFLAGS.t_subr_prf.c= -Wno-pointer-sign # XXX platform vs kernel SHA2 144 1.22 christos 145 1.58 mrg # Test explicitly tests failure modes. 146 1.72 lukem CPPFLAGS.t_subr_prf.c+= ${CC_WNO_FORMAT_TRUNCATION} 147 1.58 mrg 148 1.61 kamil SANITIZER_RENAME_CLASSES+= t_subr_prf 149 1.61 kamil SANITIZER_RENAME_FILES.t_subr_prf+= t_subr_prf.c 150 1.61 kamil SANITIZER_RENAME_SYMBOL.t_subr_prf+= snprintf 151 1.61 kamil SANITIZER_RENAME_SYMBOL.t_subr_prf+= vsnprintf 152 1.61 kamil SANITIZER_RENAME_SYMBOL.t_subr_prf+= sprintf 153 1.61 kamil SANITIZER_RENAME_SYMBOL.t_subr_prf+= vsnprintf 154 1.61 kamil SANITIZER_RENAME_SYMBOL.t_subr_prf+= vasprintf 155 1.61 kamil 156 1.22 christos CLEANFILES+= t_subr_prf.c 157 1.22 christos 158 1.54 riastrad LDADD.h_segv+= -lm 159 1.54 riastrad 160 1.85 riastrad .if exists(arch/${MACHINE_ARCH}/execregs.h) 161 1.85 riastrad CPPFLAGS.t_execregs.c+= -I${ARCHDIR} 162 1.86 riastrad CPPFLAGS.t_execregs.c+= -I${.CURDIR}/../lib/libc/gen # isqemu.h 163 1.85 riastrad CPPFLAGS.t_execregs.c+= -DHAVE_EXECREGS_TEST 164 1.85 riastrad SRCS.t_execregs+= t_execregs.c 165 1.85 riastrad SRCS.t_execregs+= execregs.c 166 1.87 riastrad LDSTATIC.h_execregs= -static 167 1.87 riastrad LDFLAGS.h_execregs+= -Wl,-e,execregs_start 168 1.85 riastrad .else 169 1.85 riastrad SRCS.h_execregs= h_execregs_unimpl.c 170 1.85 riastrad .endif 171 1.85 riastrad 172 1.1 jmmv .include <bsd.test.mk> 173