summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue2069
-rw-r--r--contrib/netbsd-tests/dev/cgd/t_cgd_3des.c4
-rw-r--r--contrib/netbsd-tests/dev/cgd/t_cgd_aes.c4
-rw-r--r--contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c4
-rwxr-xr-xcontrib/netbsd-tests/dev/clock_subr/clock_subr_test_data_gen.sh25
-rw-r--r--contrib/netbsd-tests/dev/clock_subr/t_clock_subr.c309
-rw-r--r--contrib/netbsd-tests/dev/scsipi/t_cd.c4
-rw-r--r--contrib/netbsd-tests/dev/sysmon/t_swwdog.c4
-rw-r--r--contrib/netbsd-tests/fs/common/h_fsmacros.h4
-rw-r--r--contrib/netbsd-tests/fs/ffs/h_quota2_tests.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_fifos.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_mount.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_quota2_1.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_quota2_remount.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_snapshot.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_snapshot_log.c4
-rw-r--r--contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c4
-rw-r--r--contrib/netbsd-tests/fs/hfs/t_pathconvert.c4
-rw-r--r--contrib/netbsd-tests/fs/kernfs/t_basic.c4
-rw-r--r--contrib/netbsd-tests/fs/lfs/t_pr.c4
-rw-r--r--contrib/netbsd-tests/fs/msdosfs/t_snapshot.c4
-rw-r--r--contrib/netbsd-tests/fs/nfs/t_mountd.c4
-rw-r--r--contrib/netbsd-tests/fs/nullfs/t_basic.c4
-rw-r--r--contrib/netbsd-tests/fs/ptyfs/t_nullpts.c4
-rw-r--r--contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c4
-rw-r--r--contrib/netbsd-tests/fs/puffs/t_basic.c4
-rw-r--r--contrib/netbsd-tests/fs/puffs/t_fuzz.c4
-rw-r--r--contrib/netbsd-tests/fs/puffs/t_io.c4
-rwxr-xr-xcontrib/netbsd-tests/fs/tmpfs/t_mknod.sh16
-rwxr-xr-xcontrib/netbsd-tests/fs/tmpfs/t_readdir.sh8
-rw-r--r--contrib/netbsd-tests/fs/tmpfs/t_renamerace.c4
-rw-r--r--contrib/netbsd-tests/fs/umapfs/t_basic.c4
-rw-r--r--contrib/netbsd-tests/fs/union/t_pr.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_full.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_io.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c86
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_renamerace.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_ro.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_rwtoro.c233
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_union.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_unpriv.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_vfsops.c4
-rw-r--r--contrib/netbsd-tests/fs/vfs/t_vnops.c4
-rw-r--r--contrib/netbsd-tests/include/sys/t_socket.c4
-rw-r--r--contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait.c1606
-rw-r--r--contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait3.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait4.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait6.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitid.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitpid.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait.c141
-rw-r--r--contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait3.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait4.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait6.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitid.c30
-rw-r--r--contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitpid.c30
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/read/t_file.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/read/t_file2.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_ioctl.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_proc1.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_proc2.c9
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_proc3.c9
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_sig.c9
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/t_vnode.c3
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c6
-rw-r--r--contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c6
-rw-r--r--contrib/netbsd-tests/kernel/t_extent.c6
-rw-r--r--contrib/netbsd-tests/kernel/t_filedesc.c6
-rw-r--r--contrib/netbsd-tests/kernel/t_lock.c6
-rw-r--r--contrib/netbsd-tests/kernel/t_mqueue.c17
-rw-r--r--contrib/netbsd-tests/kernel/t_ptrace.c6
-rw-r--r--contrib/netbsd-tests/kernel/t_ptrace_wait.c1636
-rw-r--r--contrib/netbsd-tests/kernel/t_pty.c6
-rw-r--r--contrib/netbsd-tests/kernel/t_rnd.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c17
-rwxr-xr-xcontrib/netbsd-tests/lib/libc/db/t_db.sh8
-rw-r--r--contrib/netbsd-tests/lib/libc/gen/exect/t_exect.c90
-rw-r--r--contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c1
-rw-r--r--contrib/netbsd-tests/lib/libc/gen/t_glob.c18
-rw-r--r--contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/gen/t_sleep.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/hash/h_hash.c20
-rw-r--r--contrib/netbsd-tests/lib/libc/hash/t_hmac.c127
-rw-r--r--contrib/netbsd-tests/lib/libc/hash/t_sha2.c14
-rw-r--r--contrib/netbsd-tests/lib/libc/locale/t_io.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c1
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/debug.c7
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/t_exhaust.c24
-rw-r--r--contrib/netbsd-tests/lib/libc/regex/t_regex_att.c23
-rw-r--r--contrib/netbsd-tests/lib/libc/rpc/t_rpc.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/ssp/h_memset.c8
-rw-r--r--contrib/netbsd-tests/lib/libc/ssp/h_read.c21
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c21
-rw-r--r--contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c4
-rw-r--r--contrib/netbsd-tests/lib/libc/string/t_strlen.c10
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c15
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_connect.c11
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_dup.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_getcontext.c23
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_getrusage.c8
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_kevent.c29
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_link.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_listen.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_mincore.c10
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_mlock.c2
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_mmap.c13
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_msgctl.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c9
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_msync.c29
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c8
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_pipe.c8
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_pipe2.c17
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_revoke.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_select.c18
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_sigaction.c16
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c36
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_socketpair.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_stat.c13
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_timer_create.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_truncate.c15
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_umask.c6
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_unlink.c11
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_wait.c11
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c3
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_write.c16
-rw-r--r--contrib/netbsd-tests/lib/libm/t_ilogb.c12
-rw-r--r--contrib/netbsd-tests/lib/libm/t_pow.c22
-rw-r--r--contrib/netbsd-tests/lib/libm/t_precision.c5
-rw-r--r--contrib/netbsd-tests/lib/libm/t_scalbn.c10
-rw-r--r--contrib/netbsd-tests/lib/libposix/t_rename.c6
-rw-r--r--contrib/netbsd-tests/lib/libpthread/h_common.h8
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_condwait.c14
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_detach.c21
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_fork.c12
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_fpu.c27
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_join.c4
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_mutex.c10
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_once.c7
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_sem.c9
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_swapcontext.c16
-rw-r--r--contrib/netbsd-tests/lib/libpthread_dbg/h_common.h128
-rw-r--r--contrib/netbsd-tests/lib/libpthread_dbg/t_dummy.c131
-rw-r--r--contrib/netbsd-tests/lib/libpthread_dbg/t_threads.c719
-rw-r--r--contrib/netbsd-tests/lib/librefuse/t_refuse_opt.c418
-rw-r--r--contrib/netbsd-tests/lib/librt/t_sem.c24
-rw-r--r--contrib/netbsd-tests/lib/librumpclient/t_fd.c4
-rw-r--r--contrib/netbsd-tests/lib/semaphore/sem.c4
-rw-r--r--contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c4
-rw-r--r--contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c4
-rw-r--r--contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c4
-rw-r--r--contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c4
-rw-r--r--contrib/netbsd-tests/modules/t_builtin.c4
-rw-r--r--contrib/netbsd-tests/net/bpf/t_bpf.c40
-rw-r--r--contrib/netbsd-tests/net/bpf/t_mbuf.c6
-rw-r--r--contrib/netbsd-tests/net/bpfilter/t_bpfilter.c6
-rw-r--r--contrib/netbsd-tests/net/bpfjit/t_bpfjit.c6
-rw-r--r--contrib/netbsd-tests/net/bpfjit/t_cop.c6
-rw-r--r--contrib/netbsd-tests/net/bpfjit/t_extmem.c6
-rw-r--r--contrib/netbsd-tests/net/bpfjit/t_mbuf.c6
-rw-r--r--contrib/netbsd-tests/net/carp/t_basic.c221
-rwxr-xr-xcontrib/netbsd-tests/net/carp/t_basic.sh165
-rw-r--r--contrib/netbsd-tests/net/config/netconfig.c6
-rw-r--r--contrib/netbsd-tests/net/icmp/t_forward.c6
-rw-r--r--contrib/netbsd-tests/net/icmp/t_ping.c6
-rwxr-xr-xcontrib/netbsd-tests/net/if/t_ifconfig.sh4
-rw-r--r--contrib/netbsd-tests/net/if_loop/t_pr.c6
-rwxr-xr-xcontrib/netbsd-tests/net/if_tun/t_tun.sh138
-rwxr-xr-xcontrib/netbsd-tests/net/if_vlan/t_vlan.sh115
-rwxr-xr-xcontrib/netbsd-tests/net/ndp/t_ra.sh80
-rw-r--r--contrib/netbsd-tests/net/net/t_raw.c4
-rw-r--r--contrib/netbsd-tests/rump/modautoload/t_modautoload.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_kern.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_lwproc.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_modcmd.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_signals.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_threads.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_tsleep.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpkern/t_vm.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpvfs/t_basic.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpvfs/t_etfs.c4
-rw-r--r--contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c4
-rw-r--r--contrib/netbsd-tests/sys/uvm/t_uvm_physseg.c2377
-rw-r--r--contrib/netbsd-tests/sys/uvm/t_uvm_physseg_load.c740
-rwxr-xr-xcontrib/netbsd-tests/usr.bin/grep/t_grep.sh23
-rwxr-xr-xcontrib/netbsd-tests/usr.bin/mixerctl/t_mixerctl.sh51
-rw-r--r--contrib/netbsd-tests/usr.bin/uniq/d_basic.in4
-rw-r--r--contrib/netbsd-tests/usr.bin/uniq/d_basic.out3
-rw-r--r--contrib/netbsd-tests/usr.bin/uniq/d_counts.out6
-rw-r--r--contrib/netbsd-tests/usr.bin/uniq/d_input.in7
-rw-r--r--contrib/netbsd-tests/usr.bin/uniq/d_show_duplicates.out1
-rw-r--r--contrib/netbsd-tests/usr.bin/uniq/d_show_uniques.out5
-rwxr-xr-xcontrib/netbsd-tests/usr.bin/uniq/t_uniq.sh97
-rwxr-xr-xcontrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh2
-rw-r--r--etc/mtree/BSD.tests.dist2
-rw-r--r--lib/libc/tests/hash/Makefile3
-rw-r--r--lib/libc/tests/regex/Makefile3
-rw-r--r--tests/sys/fs/tmpfs/Makefile5
-rw-r--r--usr.bin/uniq/Makefile6
-rw-r--r--usr.bin/uniq/tests/Makefile16
-rw-r--r--usr.bin/uniq/tests/Makefile.depend11
212 files changed, 11271 insertions, 2170 deletions
diff --git a/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue b/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue
index 969ad9c..e0cbf52 100644
--- a/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue
+++ b/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue
@@ -1,1040 +1,1035 @@
begin 644 t_pad_output.bz2
-M0EIH.3%!629360S39&D`<XA_____________________________________
-M________X)S;?=A%%?,RM9MH`$E-`-;8#;;8#6E)9>>;SS,K;%2@`2::%N=I
-MVR86:*KOO>O99MMM-XP&76N]W/6T=[SW@<[G'3H:Z'K1F?=WON]WO>]S=WN^
-ML]W>^WN[[W;V\VW>[OMN^WW;;3+3/=TK*Y5E4LVE#-E5H:"S530#1IB5LS:V
-MJHK6!JVA2M9LR*V:MFUJ55JBM:Q4*EL,5$`50)L6M11:P55:V%+55:U5C!I3
-M1L,BU5-5JV-%F55-5EL;:@5:K+%5:S--;5-;:M5MJVZZ[:V]>[:7NTN>][;>
-M[O/MO-M[NYOM]WN^[K69ON\^][WO(Q/N8ZZ![N''=O3VP[V/>RCRX[0VJ7FW
-M-FQJ%7-G0R;9MB*N\G'>PTM*5H%``-LF2NKF=-LQFU*50444`446P`&FV06V
-MUE17-HDJB[#--!MBC$-1L#;!MF@JALFIM-IE3-30"JH#2D`$`!,F$R83(830
-M--,AD!H&AH`R#$9`:&AHR`Q-`,":8)D8C`3)@FF":8@P"9,$,"&)D#0)@$&D
-MD$TPF@`)@```````-`"8`)@"8F$R8`F3$`)@`:&F@),R83":8$Q---,"8"8(
-M,:1D#!,H--)2:$$VF##`"#329,1A-!,Q$:F)A-#$-3TT4>F4]">IZ0&U#3:@
-MVC4#`-(/4#3T@#30&@/1/1#0#1D``#$-!HR:-!)I2E$H&3TVPVH\BE/QIHC1
-M3,34T4]IE-I0WD4?IJ33T0`R:&T0`9!IM0&CRC(`!HT&AZ@`&@``````````
-M``TI$#1IHIFU,F`T:F*>"G@$F:3TP"-3T9&"&FT*/3"3R,33)I/":&C(T&(T
-M4\T-`GIDR-,$T:GIJ>1B831II/(&D\C4S(::8F)HU-02:E)*!#5/%/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-&2C?GU8O)+<?EYA*1`,3UN*#8.LXK,'
+MSS"VJ/C+D%P*X0C_GO0<?=-O?5O_7CX/VW24`$KV^69,;6U&EYSKR-Y/A(8&
+M:U4X7.@G,RS:DZ1$N.F5<*8VE!?!X&@06^5.MQFH&%XO1*12_,O7;_<M)3)[
+ME-.&T^'E=Y#JSGS+Z+4KJV?ZQRPKMS`A9R(@U&,#?8X"O;K;+=%RB!Y^CL'?
+M*Y:3@'DEU84+R:3Y<19NOD(1+-C;8V2V*V.THJ_/U_"5/H5PJ&)7*L[30_CX
+M=YYO]+U+ZVXW:\=.P)"MXVVQ_J:AF<923F?X'PF6N4J6H97$<2ZP$9C5?;?)
+AOE[3]=PE4E9R<92Z_X:N7V3I;?Y7_XNY(IPH2$BTXA\`
`
end
diff --git a/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c b/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c
index 91e81f4..a79ac74 100644
--- a/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c
+++ b/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cgd_3des.c,v 1.1 2016/11/11 07:39:58 alnsn Exp $ */
+/* $NetBSD: t_cgd_3des.c,v 1.2 2017/01/13 21:30:39 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -48,7 +48,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define SECSIZE 512
diff --git a/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c b/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c
index 9416333..edda1eb 100644
--- a/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c
+++ b/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cgd_aes.c,v 1.5 2016/12/11 00:23:44 alnsn Exp $ */
+/* $NetBSD: t_cgd_aes.c,v 1.6 2017/01/13 21:30:39 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
* Copyright (c) 2007 The Institute of Electrical and Electronics Engineers, Inc
@@ -49,7 +49,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define SECSIZE 512
diff --git a/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c b/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c
index 958ebac..93aa834 100644
--- a/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c
+++ b/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cgd_blowfish.c,v 1.1 2016/11/10 23:44:36 alnsn Exp $ */
+/* $NetBSD: t_cgd_blowfish.c,v 1.2 2017/01/13 21:30:39 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -48,7 +48,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define SECSIZE 512
diff --git a/contrib/netbsd-tests/dev/clock_subr/clock_subr_test_data_gen.sh b/contrib/netbsd-tests/dev/clock_subr/clock_subr_test_data_gen.sh
new file mode 100755
index 0000000..2da21a8
--- /dev/null
+++ b/contrib/netbsd-tests/dev/clock_subr/clock_subr_test_data_gen.sh
@@ -0,0 +1,25 @@
+#!/bin/ksh
+
+export TZ=Etc/Universal
+
+datesub() {
+ gdate "$@" '+ FILL(%_11s,%_4Y,%_m,%_d,%w,%_H,%_M,%_S), // %a %b %e %H:%M:%S %Z %Y'
+}
+
+(
+ datesub -d '1970/01/01 00:00:00'
+ datesub -d '1981/04/12 12:00:03'
+ datesub -d '2011/07/21 09:57:00'
+ datesub -d @2147483647
+ datesub -d @2147483648
+ datesub -d '2063/04/05 00:00:00'
+ for year in `seq 1970 1 2030`; do
+ datesub -d "${year}/01/01 00:00:00"
+ datesub -d "${year}/07/01 00:00:00"
+ done
+ for year in `seq 2000 25 2600`; do
+ datesub -d "$((${year} - 1))/12/31 23:59:59"
+ datesub -d "$((${year} + 0))/01/01 00:00:00"
+ datesub -d "$((${year} + 1))/01/01 00:00:00"
+ done
+)|sort -u
diff --git a/contrib/netbsd-tests/dev/clock_subr/t_clock_subr.c b/contrib/netbsd-tests/dev/clock_subr/t_clock_subr.c
new file mode 100644
index 0000000..bb03c68
--- /dev/null
+++ b/contrib/netbsd-tests/dev/clock_subr/t_clock_subr.c
@@ -0,0 +1,309 @@
+/* $NetBSD: t_clock_subr.c,v 1.3 2017/01/13 21:30:39 christos Exp $ */
+
+/*
+ * Copyright (c) 2016 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__COPYRIGHT("@(#) Copyright (c) 2016\
+ Jonathan A. Kollasch. All rights reserved.");
+__RCSID("$NetBSD: t_clock_subr.c,v 1.3 2017/01/13 21:30:39 christos Exp $");
+
+#include <sys/types.h>
+#include <dev/clock_subr.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <atf-c.h>
+
+#include "h_macros.h"
+
+#define FILL(ti,ye,mo,da,wd,ho,mi,se) \
+{ .time = (ti), .clock = { .dt_year = (ye), .dt_mon = (mo), .dt_day = (da), \
+ .dt_wday = (wd), .dt_hour = (ho), .dt_min = (mi), .dt_sec = (se), } }
+
+static struct clock_test {
+ time_t time;
+ struct clock_ymdhms clock;
+} const clock_tests[] = {
+ FILL( 0,1970, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1970
+ FILL( 15638400,1970, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1970
+ FILL( 31536000,1971, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1971
+ FILL( 47174400,1971, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1971
+ FILL( 63072000,1972, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1972
+ FILL( 78796800,1972, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1972
+ FILL( 94694400,1973, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1973
+ FILL( 110332800,1973, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1973
+ FILL( 126230400,1974, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1974
+ FILL( 141868800,1974, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1974
+ FILL( 157766400,1975, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1975
+ FILL( 173404800,1975, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1975
+ FILL( 189302400,1976, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1976
+ FILL( 205027200,1976, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1976
+ FILL( 220924800,1977, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1977
+ FILL( 236563200,1977, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1977
+ FILL( 252460800,1978, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1978
+ FILL( 268099200,1978, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1978
+ FILL( 283996800,1979, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1979
+ FILL( 299635200,1979, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1979
+ FILL( 315532800,1980, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1980
+ FILL( 331257600,1980, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1980
+ FILL( 347155200,1981, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1981
+ FILL( 355924803,1981, 4,12,0,12, 0, 3), // Sun Apr 12 12:00:03 UTC 1981
+ FILL( 362793600,1981, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1981
+ FILL( 378691200,1982, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1982
+ FILL( 394329600,1982, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1982
+ FILL( 410227200,1983, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1983
+ FILL( 425865600,1983, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1983
+ FILL( 441763200,1984, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1984
+ FILL( 457488000,1984, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1984
+ FILL( 473385600,1985, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1985
+ FILL( 489024000,1985, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1985
+ FILL( 504921600,1986, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1986
+ FILL( 520560000,1986, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1986
+ FILL( 536457600,1987, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1987
+ FILL( 552096000,1987, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1987
+ FILL( 567993600,1988, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1988
+ FILL( 583718400,1988, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1988
+ FILL( 599616000,1989, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1989
+ FILL( 615254400,1989, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1989
+ FILL( 631152000,1990, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1990
+ FILL( 646790400,1990, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1990
+ FILL( 662688000,1991, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1991
+ FILL( 678326400,1991, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1991
+ FILL( 694224000,1992, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1992
+ FILL( 709948800,1992, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1992
+ FILL( 725846400,1993, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1993
+ FILL( 741484800,1993, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1993
+ FILL( 757382400,1994, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1994
+ FILL( 773020800,1994, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1994
+ FILL( 788918400,1995, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1995
+ FILL( 804556800,1995, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1995
+ FILL( 820454400,1996, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1996
+ FILL( 836179200,1996, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1996
+ FILL( 852076800,1997, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1997
+ FILL( 867715200,1997, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1997
+ FILL( 883612800,1998, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1998
+ FILL( 899251200,1998, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1998
+ FILL( 915148800,1999, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1999
+ FILL( 930787200,1999, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1999
+ FILL( 946684799,1999,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 1999
+ FILL( 946684800,2000, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2000
+ FILL( 962409600,2000, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2000
+ FILL( 978307200,2001, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2001
+ FILL( 993945600,2001, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2001
+ FILL( 1009843200,2002, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2002
+ FILL( 1025481600,2002, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2002
+ FILL( 1041379200,2003, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2003
+ FILL( 1057017600,2003, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2003
+ FILL( 1072915200,2004, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2004
+ FILL( 1088640000,2004, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2004
+ FILL( 1104537600,2005, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2005
+ FILL( 1120176000,2005, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2005
+ FILL( 1136073600,2006, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2006
+ FILL( 1151712000,2006, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2006
+ FILL( 1167609600,2007, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2007
+ FILL( 1183248000,2007, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2007
+ FILL( 1199145600,2008, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2008
+ FILL( 1214870400,2008, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2008
+ FILL( 1230768000,2009, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2009
+ FILL( 1246406400,2009, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2009
+ FILL( 1262304000,2010, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2010
+ FILL( 1277942400,2010, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2010
+ FILL( 1293840000,2011, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2011
+ FILL( 1309478400,2011, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2011
+ FILL( 1311242220,2011, 7,21,4, 9,57, 0), // Thu Jul 21 09:57:00 UTC 2011
+ FILL( 1325376000,2012, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2012
+ FILL( 1341100800,2012, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2012
+ FILL( 1356998400,2013, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2013
+ FILL( 1372636800,2013, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2013
+ FILL( 1388534400,2014, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2014
+ FILL( 1404172800,2014, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2014
+ FILL( 1420070400,2015, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2015
+ FILL( 1435708800,2015, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2015
+ FILL( 1451606400,2016, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2016
+ FILL( 1467331200,2016, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2016
+ FILL( 1483228800,2017, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2017
+ FILL( 1498867200,2017, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2017
+ FILL( 1514764800,2018, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2018
+ FILL( 1530403200,2018, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2018
+ FILL( 1546300800,2019, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2019
+ FILL( 1561939200,2019, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2019
+ FILL( 1577836800,2020, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2020
+ FILL( 1593561600,2020, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2020
+ FILL( 1609459200,2021, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2021
+ FILL( 1625097600,2021, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2021
+ FILL( 1640995200,2022, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2022
+ FILL( 1656633600,2022, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2022
+ FILL( 1672531200,2023, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2023
+ FILL( 1688169600,2023, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2023
+ FILL( 1704067200,2024, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2024
+ FILL( 1719792000,2024, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2024
+ FILL( 1735689599,2024,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2024
+ FILL( 1735689600,2025, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2025
+ FILL( 1751328000,2025, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2025
+ FILL( 1767225600,2026, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2026
+ FILL( 1782864000,2026, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2026
+ FILL( 1798761600,2027, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2027
+ FILL( 1814400000,2027, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2027
+ FILL( 1830297600,2028, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2028
+ FILL( 1846022400,2028, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2028
+ FILL( 1861920000,2029, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2029
+ FILL( 1877558400,2029, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2029
+ FILL( 1893456000,2030, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2030
+ FILL( 1909094400,2030, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2030
+ FILL( 2147483647,2038, 1,19,2, 3,14, 7), // Tue Jan 19 03:14:07 UTC 2038
+ FILL( 2147483648,2038, 1,19,2, 3,14, 8), // Tue Jan 19 03:14:08 UTC 2038
+ FILL( 2524607999,2049,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2049
+ FILL( 2524608000,2050, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2050
+ FILL( 2556144000,2051, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2051
+ FILL( 2942956800,2063, 4, 5,4, 0, 0, 0), // Thu Apr 5 00:00:00 UTC 2063
+ FILL( 3313526399,2074,12,31,1,23,59,59), // Mon Dec 31 23:59:59 UTC 2074
+ FILL( 3313526400,2075, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2075
+ FILL( 3345062400,2076, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2076
+ FILL( 4102444799,2099,12,31,4,23,59,59), // Thu Dec 31 23:59:59 UTC 2099
+ FILL( 4102444800,2100, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2100
+ FILL( 4133980800,2101, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2101
+ FILL( 4891363199,2124,12,31,0,23,59,59), // Sun Dec 31 23:59:59 UTC 2124
+ FILL( 4891363200,2125, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2125
+ FILL( 4922899200,2126, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2126
+ FILL( 5680281599,2149,12,31,3,23,59,59), // Wed Dec 31 23:59:59 UTC 2149
+ FILL( 5680281600,2150, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2150
+ FILL( 5711817600,2151, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2151
+ FILL( 6469199999,2174,12,31,6,23,59,59), // Sat Dec 31 23:59:59 UTC 2174
+ FILL( 6469200000,2175, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2175
+ FILL( 6500736000,2176, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2176
+ FILL( 7258118399,2199,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2199
+ FILL( 7258118400,2200, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2200
+ FILL( 7289654400,2201, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2201
+ FILL( 8047036799,2224,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2224
+ FILL( 8047036800,2225, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2225
+ FILL( 8078572800,2226, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2226
+ FILL( 8835955199,2249,12,31,1,23,59,59), // Mon Dec 31 23:59:59 UTC 2249
+ FILL( 8835955200,2250, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2250
+ FILL( 8867491200,2251, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2251
+ FILL( 9624873599,2274,12,31,4,23,59,59), // Thu Dec 31 23:59:59 UTC 2274
+ FILL( 9624873600,2275, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2275
+ FILL( 9656409600,2276, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2276
+ FILL(10413791999,2299,12,31,0,23,59,59), // Sun Dec 31 23:59:59 UTC 2299
+ FILL(10413792000,2300, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2300
+ FILL(10445328000,2301, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2301
+ FILL(11202710399,2324,12,31,3,23,59,59), // Wed Dec 31 23:59:59 UTC 2324
+ FILL(11202710400,2325, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2325
+ FILL(11234246400,2326, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2326
+ FILL(11991628799,2349,12,31,6,23,59,59), // Sat Dec 31 23:59:59 UTC 2349
+ FILL(11991628800,2350, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2350
+ FILL(12023164800,2351, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2351
+ FILL(12780547199,2374,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2374
+ FILL(12780547200,2375, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2375
+ FILL(12812083200,2376, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2376
+ FILL(13569465599,2399,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2399
+ FILL(13569465600,2400, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2400
+ FILL(13601088000,2401, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2401
+ FILL(14358470399,2424,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2424
+ FILL(14358470400,2425, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2425
+ FILL(14390006400,2426, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2426
+ FILL(15147388799,2449,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2449
+ FILL(15147388800,2450, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2450
+ FILL(15178924800,2451, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2451
+ FILL(15936307199,2474,12,31,1,23,59,59), // Mon Dec 31 23:59:59 UTC 2474
+ FILL(15936307200,2475, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2475
+ FILL(15967843200,2476, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2476
+ FILL(16725225599,2499,12,31,4,23,59,59), // Thu Dec 31 23:59:59 UTC 2499
+ FILL(16725225600,2500, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2500
+ FILL(16756761600,2501, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2501
+ FILL(17514143999,2524,12,31,0,23,59,59), // Sun Dec 31 23:59:59 UTC 2524
+ FILL(17514144000,2525, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2525
+ FILL(17545680000,2526, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2526
+ FILL(18303062399,2549,12,31,3,23,59,59), // Wed Dec 31 23:59:59 UTC 2549
+ FILL(18303062400,2550, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2550
+ FILL(18334598400,2551, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2551
+ FILL(19091980799,2574,12,31,6,23,59,59), // Sat Dec 31 23:59:59 UTC 2574
+ FILL(19091980800,2575, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2575
+ FILL(19123516800,2576, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2576
+ FILL(19880899199,2599,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2599
+ FILL(19880899200,2600, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2600
+ FILL(19912435200,2601, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2601
+};
+#undef FILL
+
+ATF_TC(ymdhms_to_secs);
+ATF_TC_HEAD(ymdhms_to_secs, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr", "check clock_ymdhms_to_secs");
+}
+ATF_TC_BODY(ymdhms_to_secs, tc)
+{
+ time_t secs;
+ size_t i;
+
+ for (i = 0; i < __arraycount(clock_tests); i++) {
+ secs = clock_ymdhms_to_secs(__UNCONST(&clock_tests[i].clock));
+ ATF_CHECK_EQ_MSG(clock_tests[i].time, secs, "%jd != %jd",
+ (intmax_t)clock_tests[i].time, (intmax_t)secs);
+ }
+}
+
+ATF_TC(secs_to_ymdhms);
+ATF_TC_HEAD(secs_to_ymdhms, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr", "check clock_secs_to_ymdhms");
+}
+ATF_TC_BODY(secs_to_ymdhms, tc)
+{
+ struct clock_ymdhms ymdhms;
+ size_t i;
+
+#define CHECK_FIELD(f) \
+ ATF_CHECK_EQ_MSG(ymdhms.dt_##f, clock_tests[i].clock.dt_##f, \
+ "%jd != %jd for %jd", (intmax_t)ymdhms.dt_##f, \
+ (intmax_t)clock_tests[i].clock.dt_##f, \
+ (intmax_t)clock_tests[i].time)
+
+ for (i = 0; i < __arraycount(clock_tests); i++) {
+ clock_secs_to_ymdhms(clock_tests[i].time, &ymdhms);
+ CHECK_FIELD(year);
+ CHECK_FIELD(mon);
+ CHECK_FIELD(day);
+ CHECK_FIELD(wday);
+ CHECK_FIELD(hour);
+ CHECK_FIELD(min);
+ CHECK_FIELD(sec);
+ }
+#undef CHECK_FIELD
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+ ATF_TP_ADD_TC(tp, ymdhms_to_secs);
+ ATF_TP_ADD_TC(tp, secs_to_ymdhms);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/dev/scsipi/t_cd.c b/contrib/netbsd-tests/dev/scsipi/t_cd.c
index 58e61a5..6e856de 100644
--- a/contrib/netbsd-tests/dev/scsipi/t_cd.c
+++ b/contrib/netbsd-tests/dev/scsipi/t_cd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cd.c,v 1.7 2014/04/25 00:24:39 pooka Exp $ */
+/* $NetBSD: t_cd.c,v 1.8 2017/01/13 21:30:39 christos Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -39,7 +39,7 @@
#include "scsitest.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(noisyeject);
ATF_TC_HEAD(noisyeject, tc)
diff --git a/contrib/netbsd-tests/dev/sysmon/t_swwdog.c b/contrib/netbsd-tests/dev/sysmon/t_swwdog.c
index 1635884..5e5fd99 100644
--- a/contrib/netbsd-tests/dev/sysmon/t_swwdog.c
+++ b/contrib/netbsd-tests/dev/sysmon/t_swwdog.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_swwdog.c,v 1.6 2015/04/23 04:49:37 pgoyette Exp $ */
+/* $NetBSD: t_swwdog.c,v 1.7 2017/01/13 21:30:39 christos Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -43,7 +43,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static volatile sig_atomic_t tcount;
diff --git a/contrib/netbsd-tests/fs/common/h_fsmacros.h b/contrib/netbsd-tests/fs/common/h_fsmacros.h
index b295cf2..eb83768 100644
--- a/contrib/netbsd-tests/fs/common/h_fsmacros.h
+++ b/contrib/netbsd-tests/fs/common/h_fsmacros.h
@@ -1,4 +1,4 @@
-/* $NetBSD: h_fsmacros.h,v 1.40 2015/08/29 19:19:43 dholland Exp $ */
+/* $NetBSD: h_fsmacros.h,v 1.41 2017/01/13 21:30:39 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <rump/rump.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define FSPROTOS(_fs_) \
int _fs_##_fstest_newfs(const atf_tc_t *, void **, const char *, \
diff --git a/contrib/netbsd-tests/fs/ffs/h_quota2_tests.c b/contrib/netbsd-tests/fs/ffs/h_quota2_tests.c
index 59f3ea3..71cf3b4 100644
--- a/contrib/netbsd-tests/fs/ffs/h_quota2_tests.c
+++ b/contrib/netbsd-tests/fs/ffs/h_quota2_tests.c
@@ -1,4 +1,4 @@
-/* $NetBSD: h_quota2_tests.c,v 1.4 2012/09/30 21:26:57 bouyer Exp $ */
+/* $NetBSD: h_quota2_tests.c,v 1.5 2017/01/13 21:30:39 christos Exp $ */
/*
* rump server for advanced quota tests
@@ -22,7 +22,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
int background = 0;
diff --git a/contrib/netbsd-tests/fs/ffs/t_fifos.c b/contrib/netbsd-tests/fs/ffs/t_fifos.c
index fe1d425..10b50bb 100644
--- a/contrib/netbsd-tests/fs/ffs/t_fifos.c
+++ b/contrib/netbsd-tests/fs/ffs/t_fifos.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fifos.c,v 1.5 2010/11/07 17:51:17 jmmv Exp $ */
+/* $NetBSD: t_fifos.c,v 1.6 2017/01/13 21:30:39 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -17,7 +17,7 @@
#include <ufs/ufs/ufsmount.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC_WITH_CLEANUP(fifos);
ATF_TC_HEAD(fifos, tc)
diff --git a/contrib/netbsd-tests/fs/ffs/t_mount.c b/contrib/netbsd-tests/fs/ffs/t_mount.c
index 6a8f74f..2096095 100644
--- a/contrib/netbsd-tests/fs/ffs/t_mount.c
+++ b/contrib/netbsd-tests/fs/ffs/t_mount.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mount.c,v 1.13 2012/11/27 16:01:49 jakllsch Exp $ */
+/* $NetBSD: t_mount.c,v 1.14 2017/01/13 21:30:39 christos Exp $ */
/*
* Basic tests for mounting
@@ -25,7 +25,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(48Kimage);
ATF_TC_HEAD(48Kimage, tc)
diff --git a/contrib/netbsd-tests/fs/ffs/t_quota2_1.c b/contrib/netbsd-tests/fs/ffs/t_quota2_1.c
index 333f3c7..22cd5d2 100644
--- a/contrib/netbsd-tests/fs/ffs/t_quota2_1.c
+++ b/contrib/netbsd-tests/fs/ffs/t_quota2_1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_quota2_1.c,v 1.4 2012/03/15 02:02:22 joerg Exp $ */
+/* $NetBSD: t_quota2_1.c,v 1.5 2017/01/13 21:30:39 christos Exp $ */
/*
* Basic tests for quota2
@@ -18,7 +18,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static void
do_quota(const atf_tc_t *tc, int n, const char *newfs_opts, int log)
diff --git a/contrib/netbsd-tests/fs/ffs/t_quota2_remount.c b/contrib/netbsd-tests/fs/ffs/t_quota2_remount.c
index f648856..d843cf8 100644
--- a/contrib/netbsd-tests/fs/ffs/t_quota2_remount.c
+++ b/contrib/netbsd-tests/fs/ffs/t_quota2_remount.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_quota2_remount.c,v 1.4 2012/03/15 02:02:22 joerg Exp $ */
+/* $NetBSD: t_quota2_remount.c,v 1.5 2017/01/13 21:30:39 christos Exp $ */
/*
* Basic tests for quota2
@@ -19,7 +19,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static void
do_quota(const atf_tc_t *tc, int n, const char *newfs_opts, int log)
diff --git a/contrib/netbsd-tests/fs/ffs/t_snapshot.c b/contrib/netbsd-tests/fs/ffs/t_snapshot.c
index 180a8cc..f661bec 100644
--- a/contrib/netbsd-tests/fs/ffs/t_snapshot.c
+++ b/contrib/netbsd-tests/fs/ffs/t_snapshot.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_snapshot.c,v 1.6 2013/02/06 09:05:01 hannken Exp $ */
+/* $NetBSD: t_snapshot.c,v 1.7 2017/01/13 21:30:39 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -15,7 +15,7 @@
#include <string.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define IMGNAME "ffs.img"
#define NEWFS "newfs -F -s 10000 " IMGNAME
diff --git a/contrib/netbsd-tests/fs/ffs/t_snapshot_log.c b/contrib/netbsd-tests/fs/ffs/t_snapshot_log.c
index e1ce17e..31b28e5 100644
--- a/contrib/netbsd-tests/fs/ffs/t_snapshot_log.c
+++ b/contrib/netbsd-tests/fs/ffs/t_snapshot_log.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_snapshot_log.c,v 1.2 2013/02/06 09:05:01 hannken Exp $ */
+/* $NetBSD: t_snapshot_log.c,v 1.3 2017/01/13 21:30:39 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -15,7 +15,7 @@
#include <string.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define IMGNAME "ffs.img"
#define NEWFS "newfs -F -s 10000 " IMGNAME
diff --git a/contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c b/contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c
index 393f3d4..b27929c 100644
--- a/contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c
+++ b/contrib/netbsd-tests/fs/ffs/t_snapshot_v2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_snapshot_v2.c,v 1.2 2013/02/06 09:05:01 hannken Exp $ */
+/* $NetBSD: t_snapshot_v2.c,v 1.3 2017/01/13 21:30:39 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -15,7 +15,7 @@
#include <string.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define IMGNAME "ffs.img"
#define NEWFS "newfs -F -s 10000 -O 2 " IMGNAME
diff --git a/contrib/netbsd-tests/fs/hfs/t_pathconvert.c b/contrib/netbsd-tests/fs/hfs/t_pathconvert.c
index 307de70..056726a 100644
--- a/contrib/netbsd-tests/fs/hfs/t_pathconvert.c
+++ b/contrib/netbsd-tests/fs/hfs/t_pathconvert.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pathconvert.c,v 1.5 2011/02/25 20:54:18 martin Exp $ */
+/* $NetBSD: t_pathconvert.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -18,7 +18,7 @@
#include <fs/hfs/hfs.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(colonslash);
ATF_TC_HEAD(colonslash, tc)
diff --git a/contrib/netbsd-tests/fs/kernfs/t_basic.c b/contrib/netbsd-tests/fs/kernfs/t_basic.c
index e5ba4a7..77acd11 100644
--- a/contrib/netbsd-tests/fs/kernfs/t_basic.c
+++ b/contrib/netbsd-tests/fs/kernfs/t_basic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.3 2010/05/31 23:44:54 pooka Exp $ */
+/* $NetBSD: t_basic.c,v 1.4 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -20,7 +20,7 @@
#include <miscfs/kernfs/kernfs.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(getdents);
ATF_TC_HEAD(getdents, tc)
diff --git a/contrib/netbsd-tests/fs/lfs/t_pr.c b/contrib/netbsd-tests/fs/lfs/t_pr.c
index 97cb1db..ed676d8 100644
--- a/contrib/netbsd-tests/fs/lfs/t_pr.c
+++ b/contrib/netbsd-tests/fs/lfs/t_pr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pr.c,v 1.6 2011/02/22 18:41:05 pooka Exp $ */
+/* $NetBSD: t_pr.c,v 1.7 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -17,7 +17,7 @@
#include <ufs/ufs/ufsmount.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(mknod);
ATF_TC_HEAD(mknod, tc)
diff --git a/contrib/netbsd-tests/fs/msdosfs/t_snapshot.c b/contrib/netbsd-tests/fs/msdosfs/t_snapshot.c
index 8b5708f..449e625 100644
--- a/contrib/netbsd-tests/fs/msdosfs/t_snapshot.c
+++ b/contrib/netbsd-tests/fs/msdosfs/t_snapshot.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_snapshot.c,v 1.3 2014/06/10 13:15:18 martin Exp $ */
+/* $NetBSD: t_snapshot.c,v 1.4 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -17,7 +17,7 @@
#include <string.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define IMGNAME "msdosfs.img"
#define NEWFS "newfs_msdos -C 5M " IMGNAME
diff --git a/contrib/netbsd-tests/fs/nfs/t_mountd.c b/contrib/netbsd-tests/fs/nfs/t_mountd.c
index b6c1528..6272587 100644
--- a/contrib/netbsd-tests/fs/nfs/t_mountd.c
+++ b/contrib/netbsd-tests/fs/nfs/t_mountd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mountd.c,v 1.5 2012/02/24 13:53:46 joerg Exp $ */
+/* $NetBSD: t_mountd.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../common/h_fsmacros.h"
ATF_TC(mountdhup);
diff --git a/contrib/netbsd-tests/fs/nullfs/t_basic.c b/contrib/netbsd-tests/fs/nullfs/t_basic.c
index 21dfccd..d54f773 100644
--- a/contrib/netbsd-tests/fs/nullfs/t_basic.c
+++ b/contrib/netbsd-tests/fs/nullfs/t_basic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.3 2010/06/09 08:37:16 pooka Exp $ */
+/* $NetBSD: t_basic.c,v 1.4 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -18,7 +18,7 @@
#include <miscfs/nullfs/null.h>
#include <fs/tmpfs/tmpfs_args.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(basic);
ATF_TC_HEAD(basic, tc)
diff --git a/contrib/netbsd-tests/fs/ptyfs/t_nullpts.c b/contrib/netbsd-tests/fs/ptyfs/t_nullpts.c
index 9265f32..fcc7e47 100644
--- a/contrib/netbsd-tests/fs/ptyfs/t_nullpts.c
+++ b/contrib/netbsd-tests/fs/ptyfs/t_nullpts.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_nullpts.c,v 1.5 2011/01/10 11:11:04 hannken Exp $ */
+/* $NetBSD: t_nullpts.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -19,7 +19,7 @@
#include <fs/ptyfs/ptyfs.h>
#include <miscfs/nullfs/null.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static void
mountptyfs(const char *mp, int flags)
diff --git a/contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c b/contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c
index 90001b9..108c344 100644
--- a/contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c
+++ b/contrib/netbsd-tests/fs/ptyfs/t_ptyfs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptyfs.c,v 1.1 2010/06/11 23:52:38 pooka Exp $ */
+/* $NetBSD: t_ptyfs.c,v 1.2 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -17,7 +17,7 @@
#include <fs/ptyfs/ptyfs.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static void
mountptyfs(const char *mp, int flags)
diff --git a/contrib/netbsd-tests/fs/puffs/t_basic.c b/contrib/netbsd-tests/fs/puffs/t_basic.c
index 735108d..4b5b7b8 100644
--- a/contrib/netbsd-tests/fs/puffs/t_basic.c
+++ b/contrib/netbsd-tests/fs/puffs/t_basic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.13 2016/12/01 14:49:04 hannken Exp $ */
+/* $NetBSD: t_basic.c,v 1.14 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -20,7 +20,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../common/h_fsmacros.h"
/*
diff --git a/contrib/netbsd-tests/fs/puffs/t_fuzz.c b/contrib/netbsd-tests/fs/puffs/t_fuzz.c
index 1d249c0..b2e000d 100644
--- a/contrib/netbsd-tests/fs/puffs/t_fuzz.c
+++ b/contrib/netbsd-tests/fs/puffs/t_fuzz.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fuzz.c,v 1.5 2012/04/21 01:03:46 manu Exp $ */
+/* $NetBSD: t_fuzz.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define ITERATIONS 100
diff --git a/contrib/netbsd-tests/fs/puffs/t_io.c b/contrib/netbsd-tests/fs/puffs/t_io.c
index 37c386c..72b5d85 100644
--- a/contrib/netbsd-tests/fs/puffs/t_io.c
+++ b/contrib/netbsd-tests/fs/puffs/t_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_io.c,v 1.1 2010/11/12 17:33:28 pooka Exp $ */
+/* $NetBSD: t_io.c,v 1.2 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -20,7 +20,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../common/h_fsmacros.h"
#define MAKEOPTS(...) \
diff --git a/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh b/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh
index 037dc16..62c7cce 100755
--- a/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh
+++ b/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh
@@ -106,15 +106,7 @@ pipe_body() {
test_mount
umask 022
- # Begin FreeBSD
- if true; then
- atf_check -s eq:0 -o empty -e empty mkfifo pipe
- else
- # End FreeBSD
atf_check -s eq:0 -o empty -e empty mknod pipe p
- # Begin FreeBSD
- fi
- # End FreeBSD
eval $(stat -s pipe)
[ ${st_mode} = 010644 ] || atf_fail "Invalid mode"
@@ -132,15 +124,7 @@ pipe_kqueue_body() {
umask 022
atf_check -s eq:0 -o empty -e empty mkdir dir
- # Begin FreeBSD
- if true; then
- echo 'mkfifo dir/pipe' | kqueue_monitor 1 dir
- else
- # End FreeBSD
echo 'mknod dir/pipe p' | kqueue_monitor 1 dir
- # Begin FreeBSD
- fi
- # End FreeBSD
kqueue_check dir NOTE_WRITE
test_unmount
diff --git a/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh b/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh
index 272c749..6f5dc3e 100755
--- a/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh
+++ b/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh
@@ -59,15 +59,7 @@ types_body() {
atf_check -s eq:0 -o empty -e empty ln -s reg lnk
atf_check -s eq:0 -o empty -e empty mknod blk b 0 0
atf_check -s eq:0 -o empty -e empty mknod chr c 0 0
- # Begin FreeBSD
- if true; then
- atf_check -s eq:0 -o empty -e empty mkfifo fifo
- else
- # End FreeBSD
atf_check -s eq:0 -o empty -e empty mknod fifo p
- # Begin FreeBSD
- fi
- # End FreeBSD
atf_check -s eq:0 -o empty -e empty \
$(atf_get_srcdir)/h_tools sockets sock
diff --git a/contrib/netbsd-tests/fs/tmpfs/t_renamerace.c b/contrib/netbsd-tests/fs/tmpfs/t_renamerace.c
index 044937a..d7c10e4 100644
--- a/contrib/netbsd-tests/fs/tmpfs/t_renamerace.c
+++ b/contrib/netbsd-tests/fs/tmpfs/t_renamerace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_renamerace.c,v 1.13 2011/08/18 21:44:55 riastradh Exp $ */
+/* $NetBSD: t_renamerace.c,v 1.14 2017/01/13 21:30:40 christos Exp $ */
/*
* Modified for rump and atf from a program supplied
@@ -23,7 +23,7 @@
#include <fs/tmpfs/tmpfs_args.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(renamerace2);
ATF_TC_HEAD(renamerace2, tc)
diff --git a/contrib/netbsd-tests/fs/umapfs/t_basic.c b/contrib/netbsd-tests/fs/umapfs/t_basic.c
index 259f6fe..c9b2d9b 100644
--- a/contrib/netbsd-tests/fs/umapfs/t_basic.c
+++ b/contrib/netbsd-tests/fs/umapfs/t_basic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.4 2010/07/19 15:35:39 pooka Exp $ */
+/* $NetBSD: t_basic.c,v 1.5 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/param.h>
@@ -20,7 +20,7 @@
#include <fs/tmpfs/tmpfs_args.h>
#include <miscfs/umapfs/umap.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(basic);
ATF_TC_HEAD(basic, tc)
diff --git a/contrib/netbsd-tests/fs/union/t_pr.c b/contrib/netbsd-tests/fs/union/t_pr.c
index 2d0c0c8..fc70bca 100644
--- a/contrib/netbsd-tests/fs/union/t_pr.c
+++ b/contrib/netbsd-tests/fs/union/t_pr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pr.c,v 1.8 2011/08/10 06:27:02 hannken Exp $ */
+/* $NetBSD: t_pr.c,v 1.9 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -17,7 +17,7 @@
#include <miscfs/union/union.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(multilayer);
ATF_TC_HEAD(multilayer, tc)
diff --git a/contrib/netbsd-tests/fs/vfs/t_full.c b/contrib/netbsd-tests/fs/vfs/t_full.c
index f338a02..51347de 100644
--- a/contrib/netbsd-tests/fs/vfs/t_full.c
+++ b/contrib/netbsd-tests/fs/vfs/t_full.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_full.c,v 1.8 2013/03/16 05:45:37 jmmv Exp $ */
+/* $NetBSD: t_full.c,v 1.9 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <rump/rump.h>
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
/*
* Write this much over the image size. This is to force an NFS commit,
diff --git a/contrib/netbsd-tests/fs/vfs/t_io.c b/contrib/netbsd-tests/fs/vfs/t_io.c
index 23c3a15..b7f6529 100644
--- a/contrib/netbsd-tests/fs/vfs/t_io.c
+++ b/contrib/netbsd-tests/fs/vfs/t_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_io.c,v 1.16 2015/04/04 12:34:44 riastradh Exp $ */
+/* $NetBSD: t_io.c,v 1.17 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <rump/rump.h>
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
#define TESTSTR "this is a string. collect enough and you'll have Em"
#define TESTSZ sizeof(TESTSTR)
diff --git a/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c b/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c
new file mode 100644
index 0000000..bb07609
--- /dev/null
+++ b/contrib/netbsd-tests/fs/vfs/t_mtime_otrunc.c
@@ -0,0 +1,86 @@
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__COPYRIGHT("@(#) Copyright (c) 2013\
+ The NetBSD Foundation, inc. All rights reserved.");
+__RCSID("$NetBSD: t_mtime_otrunc.c,v 1.1 2017/02/02 22:07:05 martin Exp $");
+
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <atf-c.h>
+
+#include <rump/rump_syscalls.h>
+#include <rump/rump.h>
+
+#include "../common/h_fsmacros.h"
+
+#define LOCKFILE "lock"
+
+static time_t
+lock_it(void)
+{
+ struct stat st;
+
+ if (rump_sys_stat(LOCKFILE, &st) != 0)
+ st.st_mtime = 0;
+
+ int f = rump_sys_open(LOCKFILE, O_WRONLY|O_CREAT|O_TRUNC, 0666);
+ if (f == -1) return 0;
+ rump_sys_close(f);
+
+ return st.st_mtime;
+}
+
+static void
+otrunc_mtime_update(const atf_tc_t *tc, const char *path)
+{
+ time_t last_ts = 0;
+ int res;
+
+ /* atf_tc_expect_fail("PR kern/51762"); */
+
+ res = rump_sys_chdir(path);
+ if (res == -1)
+ atf_tc_fail("chdir failed");
+
+ for (int i = 0; i < 5; i++) {
+ time_t l = lock_it();
+ printf("last lock: %ld\n", (long)l);
+ ATF_REQUIRE_MSG(i == 0 || l > last_ts,
+ "iteration %d: lock time did not increase, old time %lu, "
+ "new time %lu", i,
+ (unsigned long)last_ts, (unsigned long)l);
+ last_ts = l;
+ sleep(2);
+ }
+ rump_sys_chdir("/");
+}
+
+ATF_FSAPPLY(otrunc_mtime_update, "Checks for mtime updates by open(O_TRUNC) (PR kern/51762)");
diff --git a/contrib/netbsd-tests/fs/vfs/t_renamerace.c b/contrib/netbsd-tests/fs/vfs/t_renamerace.c
index 809c380..63cfb44 100644
--- a/contrib/netbsd-tests/fs/vfs/t_renamerace.c
+++ b/contrib/netbsd-tests/fs/vfs/t_renamerace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_renamerace.c,v 1.33 2016/05/04 08:30:22 dholland Exp $ */
+/* $NetBSD: t_renamerace.c,v 1.34 2017/01/13 21:30:40 christos Exp $ */
/*
* Modified for rump and atf from a program supplied
@@ -34,7 +34,7 @@
#define FSTEST_IMGSIZE (50000 * 512)
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
static volatile int quittingtime;
pid_t wrkpid;
diff --git a/contrib/netbsd-tests/fs/vfs/t_ro.c b/contrib/netbsd-tests/fs/vfs/t_ro.c
index b1e1179..f7f4581 100644
--- a/contrib/netbsd-tests/fs/vfs/t_ro.c
+++ b/contrib/netbsd-tests/fs/vfs/t_ro.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ro.c,v 1.5 2011/02/22 21:23:19 yamt Exp $ */
+/* $NetBSD: t_ro.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <rump/rump.h>
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
#define AFILE "testfile"
#define ADIR "testdir"
diff --git a/contrib/netbsd-tests/fs/vfs/t_rwtoro.c b/contrib/netbsd-tests/fs/vfs/t_rwtoro.c
new file mode 100644
index 0000000..ca8af07
--- /dev/null
+++ b/contrib/netbsd-tests/fs/vfs/t_rwtoro.c
@@ -0,0 +1,233 @@
+/* $NetBSD: t_rwtoro.c,v 1.1 2017/01/27 10:45:11 hannken Exp $ */
+
+/*-
+ * Copyright (c) 2017 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/stat.h>
+#include <sys/statvfs.h>
+
+#include <atf-c.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <rump/rump_syscalls.h>
+#include <rump/rump.h>
+
+#include <miscfs/nullfs/null.h>
+#include <fs/tmpfs/tmpfs_args.h>
+
+#include "../common/h_fsmacros.h"
+#include "../../h_macros.h"
+
+static const char *unsupported = "fs does not support r/o remount";
+static char file_path[MAXPATHLEN];
+static int file_fd;
+
+/*
+ * Remount the filesystem read-only and test errno.
+ * Skip filesystems that don't implement read-write -> read-only.
+ */
+static void
+remount_ro(const atf_tc_t *tc, const char *mp, int expected_errno)
+{
+ int error;
+ union {
+ struct tmpfs_args tmpfs;
+ char data[4095];
+ } mount_args;
+ int mount_args_length;
+ struct statvfs sbuf;
+
+ if (FSTYPE_ZFS(tc))
+ atf_tc_skip("%s", unsupported);
+
+ /* Prepare mount arguments. */
+ RL(rump_sys_statvfs1(mp, &sbuf, ST_WAIT));
+ mount_args_length = sizeof(mount_args);
+ memset(&mount_args, 0, mount_args_length);
+ if (FSTYPE_TMPFS(tc))
+ mount_args.tmpfs.ta_version = TMPFS_ARGS_VERSION;
+ mount_args_length = rump_sys_mount(sbuf.f_fstypename, mp, MNT_GETARGS,
+ &mount_args, mount_args_length);
+ ATF_CHECK(mount_args_length >= 0);
+
+ /* Remount and test result. */
+ error = rump_sys_mount(sbuf.f_fstypename, mp, MNT_UPDATE | MNT_RDONLY,
+ &mount_args, mount_args_length);
+ if (errno == EOPNOTSUPP)
+ atf_tc_skip("%s", unsupported);
+ if (expected_errno == 0)
+ ATF_CHECK(error == 0);
+ else
+ ATF_CHECK_ERRNO(expected_errno, error == -1);
+}
+
+static void
+open_file_ro(const char *prefix)
+{
+
+ snprintf(file_path, sizeof(file_path), "%s/file", prefix);
+ RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777));
+ RL(rump_sys_close(file_fd));
+ RL(file_fd = rump_sys_open(file_path, O_RDONLY));
+}
+
+static void
+open_file_ro_unlink(const char *prefix)
+{
+
+ snprintf(file_path, sizeof(file_path), "%s/file", prefix);
+ RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777));
+ RL(rump_sys_close(file_fd));
+ RL(file_fd = rump_sys_open(file_path, O_RDONLY));
+ RL(rump_sys_unlink(file_path));
+}
+
+static void
+open_file_rw(const char *prefix)
+{
+
+ snprintf(file_path, sizeof(file_path), "%s/file", prefix);
+ RL(file_fd = rump_sys_open(file_path, O_CREAT | O_RDWR, 0777));
+}
+
+static void
+close_file(const char *unused)
+{
+
+ RL(rump_sys_close(file_fd));
+}
+
+static void
+basic_test(const atf_tc_t *tc, const char *mp, int expected_errno,
+ bool use_layer, void (*pre)(const char *), void (*post)(const char *))
+{
+ const char *null_mount = "/nullm";
+ struct null_args nargs;
+
+ if (use_layer) {
+ RL(rump_sys_mkdir(null_mount, 0777));
+ memset(&nargs, 0, sizeof(nargs));
+ nargs.nulla_target = __UNCONST(mp);;
+ RL(rump_sys_mount(MOUNT_NULL, null_mount, 0,
+ &nargs, sizeof(nargs)));
+ }
+ if (pre)
+ (*pre)(use_layer ? null_mount : mp);
+ remount_ro(tc, mp, expected_errno);
+ if (post)
+ (*post)(use_layer ? null_mount : mp);
+ if (use_layer)
+ RL(rump_sys_unmount(null_mount, 0));
+}
+
+static void
+noneopen(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, 0, false, NULL, NULL);
+}
+
+static void
+readopen(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, 0, false, open_file_ro, close_file);
+}
+
+static void
+writeopen(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, EBUSY, false, open_file_rw, close_file);
+}
+
+static void
+read_unlinked(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, EBUSY, false, open_file_ro_unlink, close_file);
+}
+
+static void
+layer_noneopen(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, 0, true, NULL, NULL);
+}
+
+static void
+layer_readopen(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, 0, true, open_file_ro, close_file);
+}
+
+static void
+layer_writeopen(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, EBUSY, true, open_file_rw, close_file);
+}
+
+static void
+layer_read_unlinked(const atf_tc_t *tc, const char *mp)
+{
+
+ basic_test(tc, mp, EBUSY, true, open_file_ro_unlink, close_file);
+}
+
+ATF_TC_FSAPPLY(noneopen, "remount r/o with no file open");
+ATF_TC_FSAPPLY(readopen, "remount r/o with file open for reading");
+ATF_TC_FSAPPLY(writeopen, "remount r/o with file open for writing");
+ATF_TC_FSAPPLY(read_unlinked,
+ "remount r/o with unlinked file open for reading");
+ATF_TC_FSAPPLY(layer_noneopen, "remount r/o with no file open on layer");
+ATF_TC_FSAPPLY(layer_readopen,
+ "remount r/o with file open for reading on layer");
+ATF_TC_FSAPPLY(layer_writeopen,
+ "remount r/o with file open for writing on layer");
+ATF_TC_FSAPPLY(layer_read_unlinked,
+ "remount r/o with unlinked file open for reading on layer");
+
+ATF_TP_ADD_TCS(tp)
+{
+
+ ATF_TP_FSAPPLY(noneopen);
+ ATF_TP_FSAPPLY(readopen);
+ ATF_TP_FSAPPLY(writeopen);
+ ATF_TP_FSAPPLY(read_unlinked);
+ ATF_TP_FSAPPLY(layer_noneopen);
+ ATF_TP_FSAPPLY(layer_readopen);
+ ATF_TP_FSAPPLY(layer_writeopen);
+ ATF_TP_FSAPPLY(layer_read_unlinked);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/fs/vfs/t_union.c b/contrib/netbsd-tests/fs/vfs/t_union.c
index bdcef93..5da1ea1 100644
--- a/contrib/netbsd-tests/fs/vfs/t_union.c
+++ b/contrib/netbsd-tests/fs/vfs/t_union.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_union.c,v 1.8 2011/08/07 06:01:51 hannken Exp $ */
+/* $NetBSD: t_union.c,v 1.9 2017/01/13 21:30:40 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -17,7 +17,7 @@
#include <miscfs/union/union.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../common/h_fsmacros.h"
#define MSTR "magic bus"
diff --git a/contrib/netbsd-tests/fs/vfs/t_unpriv.c b/contrib/netbsd-tests/fs/vfs/t_unpriv.c
index 6da771b4..6536c21 100644
--- a/contrib/netbsd-tests/fs/vfs/t_unpriv.c
+++ b/contrib/netbsd-tests/fs/vfs/t_unpriv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_unpriv.c,v 1.12 2015/04/09 19:51:13 riastradh Exp $ */
+/* $NetBSD: t_unpriv.c,v 1.13 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <rump/rump.h>
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
#define USES_OWNER \
if (FSTYPE_MSDOS(tc)) \
diff --git a/contrib/netbsd-tests/fs/vfs/t_vfsops.c b/contrib/netbsd-tests/fs/vfs/t_vfsops.c
index 1bcee89..bbed9f9 100644
--- a/contrib/netbsd-tests/fs/vfs/t_vfsops.c
+++ b/contrib/netbsd-tests/fs/vfs/t_vfsops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vfsops.c,v 1.11 2011/04/04 19:16:58 hannken Exp $ */
+/* $NetBSD: t_vfsops.c,v 1.12 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <rump/rump.h>
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
static void
tmount(const atf_tc_t *tc, const char *path)
diff --git a/contrib/netbsd-tests/fs/vfs/t_vnops.c b/contrib/netbsd-tests/fs/vfs/t_vnops.c
index 978fadb..7da53c8 100644
--- a/contrib/netbsd-tests/fs/vfs/t_vnops.c
+++ b/contrib/netbsd-tests/fs/vfs/t_vnops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vnops.c,v 1.58 2016/08/29 02:31:46 kre Exp $ */
+/* $NetBSD: t_vnops.c,v 1.59 2017/01/13 21:30:40 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#include <rump/rump.h>
#include "../common/h_fsmacros.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
#define TESTFILE "afile"
diff --git a/contrib/netbsd-tests/include/sys/t_socket.c b/contrib/netbsd-tests/include/sys/t_socket.c
index f60941c..9db2247 100644
--- a/contrib/netbsd-tests/include/sys/t_socket.c
+++ b/contrib/netbsd-tests/include/sys/t_socket.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_socket.c,v 1.4 2015/02/27 08:30:30 martin Exp $ */
+/* $NetBSD: t_socket.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -18,7 +18,7 @@
#include <unistd.h>
#include <util.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(cmsg_sendfd_bounds);
ATF_TC_HEAD(cmsg_sendfd_bounds, tc)
diff --git a/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait.c b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait.c
new file mode 100644
index 0000000..09c17e1
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait.c
@@ -0,0 +1,1606 @@
+/* $NetBSD: t_ptrace_wait.c,v 1.11 2017/01/18 05:14:34 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.11 2017/01/18 05:14:34 kamil Exp $");
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/resource.h>
+#include <sys/stat.h>
+#include <sys/sysctl.h>
+#include <sys/wait.h>
+#include <machine/reg.h>
+#include <x86/dbregs.h>
+#include <err.h>
+#include <errno.h>
+#include <sched.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+#include <unistd.h>
+
+#include <atf-c.h>
+
+#include "h_macros.h"
+
+#include "../../t_ptrace_wait.h"
+
+
+#if defined(HAVE_GPREGS)
+ATF_TC(regs1);
+ATF_TC_HEAD(regs1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_GETREGS and iterate over General Purpose registers");
+}
+
+ATF_TC_BODY(regs1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ struct reg r;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Call GETREGS for the child process\n");
+ ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1);
+
+ printf("RAX=%#" PRIxREGISTER "\n", r.regs[_REG_RAX]);
+ printf("RBX=%#" PRIxREGISTER "\n", r.regs[_REG_RBX]);
+ printf("RCX=%#" PRIxREGISTER "\n", r.regs[_REG_RCX]);
+ printf("RDX=%#" PRIxREGISTER "\n", r.regs[_REG_RDX]);
+
+ printf("RDI=%#" PRIxREGISTER "\n", r.regs[_REG_RDI]);
+ printf("RSI=%#" PRIxREGISTER "\n", r.regs[_REG_RSI]);
+
+ printf("GS=%#" PRIxREGISTER "\n", r.regs[_REG_GS]);
+ printf("FS=%#" PRIxREGISTER "\n", r.regs[_REG_FS]);
+ printf("ES=%#" PRIxREGISTER "\n", r.regs[_REG_ES]);
+ printf("DS=%#" PRIxREGISTER "\n", r.regs[_REG_DS]);
+ printf("CS=%#" PRIxREGISTER "\n", r.regs[_REG_CS]);
+ printf("SS=%#" PRIxREGISTER "\n", r.regs[_REG_SS]);
+
+ printf("RSP=%#" PRIxREGISTER "\n", r.regs[_REG_RSP]);
+ printf("RIP=%#" PRIxREGISTER "\n", r.regs[_REG_RIP]);
+
+ printf("RFLAGS=%#" PRIxREGISTER "\n", r.regs[_REG_RFLAGS]);
+
+ printf("R8=%#" PRIxREGISTER "\n", r.regs[_REG_R8]);
+ printf("R9=%#" PRIxREGISTER "\n", r.regs[_REG_R9]);
+ printf("R10=%#" PRIxREGISTER "\n", r.regs[_REG_R10]);
+ printf("R11=%#" PRIxREGISTER "\n", r.regs[_REG_R11]);
+ printf("R12=%#" PRIxREGISTER "\n", r.regs[_REG_R12]);
+ printf("R13=%#" PRIxREGISTER "\n", r.regs[_REG_R13]);
+ printf("R14=%#" PRIxREGISTER "\n", r.regs[_REG_R14]);
+ printf("R15=%#" PRIxREGISTER "\n", r.regs[_REG_R15]);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_count);
+ATF_TC_HEAD(watchpoint_count, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and assert four available watchpoints");
+}
+
+ATF_TC_BODY(watchpoint_count, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ int N;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Call GETREGS for the child process\n");
+ ATF_REQUIRE((N = ptrace(PT_COUNT_WATCHPOINTS, child, NULL, 0)) != -1);
+ printf("Reported %d watchpoints\n", N);
+
+ ATF_REQUIRE_EQ_MSG(N, 4, "Expected 4 hw watchpoints - got %d", N);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_read);
+ATF_TC_HEAD(watchpoint_read, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and assert four available watchpoints");
+}
+
+ATF_TC_BODY(watchpoint_read, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ int i, N;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Call GETREGS for the child process\n");
+ ATF_REQUIRE((N = ptrace(PT_COUNT_WATCHPOINTS, child, NULL, 0)) != -1);
+
+ ATF_REQUIRE_EQ_MSG(N, 4, "Expected 4 hw watchpoints - got %d", N);
+
+ for (i = 0; i < N; i++) {
+ printf("Before reading watchpoint %d\n", i);
+ pw.pw_index = i;
+ ATF_REQUIRE(ptrace(PT_READ_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+ }
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_write_unmodified);
+ATF_TC_HEAD(watchpoint_write_unmodified, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and assert functional write of "
+ "unmodified data");
+}
+
+ATF_TC_BODY(watchpoint_write_unmodified, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ int i, N;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Call GETREGS for the child process\n");
+ ATF_REQUIRE((N = ptrace(PT_COUNT_WATCHPOINTS, child, NULL, 0)) != -1);
+
+ ATF_REQUIRE_EQ_MSG(N, 4, "Expected 4 hw watchpoints - got %d", N);
+
+ for (i = 0; i < N; i++) {
+ printf("Before reading watchpoint %d\n", i);
+ pw.pw_index = i;
+ ATF_REQUIRE(ptrace(PT_READ_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d (unmodified)\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len)
+ != -1);
+ }
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_code0);
+ATF_TC_HEAD(watchpoint_trap_code0, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 0");
+}
+
+ATF_TC_BODY(watchpoint_trap_code0, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 0;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("check_happy(%d)=%d\n", watchme, check_happy(watchme));
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_lwpid = 0;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = (void *)check_happy;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 0);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ pw.pw_md.md_address = NULL;
+ printf("Before writing watchpoint %d (disable it)\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_code1);
+ATF_TC_HEAD(watchpoint_trap_code1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 1");
+}
+
+ATF_TC_BODY(watchpoint_trap_code1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 1;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("check_happy(%d)=%d\n", watchme, check_happy(watchme));
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_lwpid = 0;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = (void *)check_happy;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%d\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 1);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ pw.pw_md.md_address = NULL;
+ printf("Before writing watchpoint %d (disable it)\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_code2);
+ATF_TC_HEAD(watchpoint_trap_code2, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 2");
+}
+
+ATF_TC_BODY(watchpoint_trap_code2, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 2;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("check_happy(%d)=%d\n", watchme, check_happy(watchme));
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_lwpid = 0;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = (void *)check_happy;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 2);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ pw.pw_md.md_address = NULL;
+ printf("Before writing watchpoint %d (disable it)\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_code3);
+ATF_TC_HEAD(watchpoint_trap_code3, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 3");
+}
+
+ATF_TC_BODY(watchpoint_trap_code3, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 3;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("check_happy(%d)=%d\n", watchme, check_happy(watchme));
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_lwpid = 0;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = (void *)check_happy;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 3);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ pw.pw_md.md_address = NULL;
+ printf("Before writing watchpoint %d (disable it)\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_write0);
+ATF_TC_HEAD(watchpoint_trap_data_write0, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 0");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_write0, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 0;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ ++watchme;
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = 0;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_WRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 0);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_write1);
+ATF_TC_HEAD(watchpoint_trap_data_write1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 1");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_write1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 1;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ ++watchme;
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_WRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 1);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_write2);
+ATF_TC_HEAD(watchpoint_trap_data_write2, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 2");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_write2, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 2;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ ++watchme;
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_WRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 2);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_write3);
+ATF_TC_HEAD(watchpoint_trap_data_write3, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 3");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_write3, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 3;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ ++watchme;
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_WRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 3);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_rw0);
+ATF_TC_HEAD(watchpoint_trap_data_rw0, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 0");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_rw0, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 0;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("watchme=%d\n", watchme);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_READWRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 0);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_rw1);
+ATF_TC_HEAD(watchpoint_trap_data_rw1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 1");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_rw1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 1;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("watchme=%d\n", watchme);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_READWRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 1);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_rw2);
+ATF_TC_HEAD(watchpoint_trap_data_rw2, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 2");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_rw2, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 2;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("watchme=%d\n", watchme);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_READWRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 2);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(__HAVE_PTRACE_WATCHPOINTS)
+ATF_TC(watchpoint_trap_data_rw3);
+ATF_TC_HEAD(watchpoint_trap_data_rw3, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_COUNT_WATCHPOINTS and test write trap with watchpoint 3");
+}
+
+ATF_TC_BODY(watchpoint_trap_data_rw3, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ const int i = 3;
+ struct ptrace_watchpoint pw;
+ int len = sizeof(pw);
+ int watchme = 1234;
+ struct ptrace_siginfo info;
+ memset(&info, 0, sizeof(info));
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("watchme=%d\n", watchme);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Preparing code watchpoint trap %d\n", i);
+
+ pw.pw_index = i;
+ pw.pw_type = PTRACE_PW_TYPE_DBREGS;
+ pw.pw_md.md_address = &watchme;
+ pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_DATA_READWRITE;
+ pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE;
+
+ printf("struct ptrace {\n");
+ printf("\t.pw_index=%d\n", pw.pw_index);
+ printf("\t.pw_lwpid=%d\n", pw.pw_lwpid);
+ printf("\t.pw_type=%#x\n", pw.pw_type);
+ printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address);
+ printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition);
+ printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length);
+ printf("}\n");
+
+ printf("Before writing watchpoint %d\n", i);
+ ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1);
+
+ printf("Before resuming the child process where it left off "
+ "and without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n");
+ ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1);
+
+ printf("Signal traced to lwpid=%d\n", info.psi_lwpid);
+ printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n",
+ info.psi_siginfo.si_signo, info.psi_siginfo.si_code,
+ info.psi_siginfo.si_errno);
+
+ printf("Before checking siginfo_t\n");
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_HWWPT);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap2, 3);
+ ATF_REQUIRE_EQ(info.psi_siginfo.si_trap3, X86_HW_WATCHPOINT_EVENT_FIRED);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+ATF_TP_ADD_TCS(tp)
+{
+ setvbuf(stdout, NULL, _IONBF, 0);
+ setvbuf(stderr, NULL, _IONBF, 0);
+
+ ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs1);
+
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_count);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_read);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_write_unmodified);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_code0);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_code1);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_code2);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_code3);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_write0);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_write1);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_write2);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_write3);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_rw0);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_rw1);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_rw2);
+ ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(tp, watchpoint_trap_data_rw3);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait3.c b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait3.c
new file mode 100644
index 0000000..c5dfe73
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait3.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_wait3.c,v 1.1 2016/12/02 05:54:15 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAIT3
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait4.c b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait4.c
new file mode 100644
index 0000000..7e1fed9
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait4.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_wait4.c,v 1.1 2016/12/02 05:54:15 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAIT4
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait6.c b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait6.c
new file mode 100644
index 0000000..601efe3
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_wait6.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_wait6.c,v 1.1 2016/12/02 05:54:15 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAIT6
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitid.c b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitid.c
new file mode 100644
index 0000000..5ec17a9
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitid.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_waitid.c,v 1.1 2016/12/02 05:54:15 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAITID
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitpid.c b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitpid.c
new file mode 100644
index 0000000..78b341c
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/amd64/t_ptrace_waitpid.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_waitpid.c,v 1.1 2016/12/02 05:54:15 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAITPID
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait.c b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait.c
new file mode 100644
index 0000000..698573b
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait.c
@@ -0,0 +1,141 @@
+/* $NetBSD: t_ptrace_wait.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/resource.h>
+#include <sys/stat.h>
+#include <sys/sysctl.h>
+#include <sys/wait.h>
+#include <machine/reg.h>
+#include <err.h>
+#include <errno.h>
+#include <sched.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+#include <unistd.h>
+
+#include <atf-c.h>
+
+#include "h_macros.h"
+
+#include "../../t_ptrace_wait.h"
+
+
+#if defined(HAVE_GPREGS)
+ATF_TC(regs1);
+ATF_TC_HEAD(regs1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Call PT_GETREGS and iterate over General Purpose registers");
+}
+
+ATF_TC_BODY(regs1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ struct reg r;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Call GETREGS for the child process\n");
+ ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1);
+
+ printf("EAX=%#" PRIxREGISTER "\n", r.r_eax);
+ printf("EBX=%#" PRIxREGISTER "\n", r.r_ebx);
+ printf("ECX=%#" PRIxREGISTER "\n", r.r_ecx);
+ printf("EDX=%#" PRIxREGISTER "\n", r.r_edx);
+
+ printf("ESP=%#" PRIxREGISTER "\n", r.r_esp);
+ printf("EBP=%#" PRIxREGISTER "\n", r.r_ebp);
+
+ printf("ESI=%#" PRIxREGISTER "\n", r.r_esi);
+ printf("EDI=%#" PRIxREGISTER "\n", r.r_edi);
+
+ printf("EIP=%#" PRIxREGISTER "\n", r.r_eip);
+
+ printf("EFLAGS=%#" PRIxREGISTER "\n", r.r_eflags);
+
+ printf("CS=%#" PRIxREGISTER "\n", r.r_cs);
+ printf("SS=%#" PRIxREGISTER "\n", r.r_ss);
+ printf("DS=%#" PRIxREGISTER "\n", r.r_ds);
+ printf("ES=%#" PRIxREGISTER "\n", r.r_es);
+ printf("FS=%#" PRIxREGISTER "\n", r.r_fs);
+ printf("GS=%#" PRIxREGISTER "\n", r.r_gs);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+ATF_TP_ADD_TCS(tp)
+{
+ setvbuf(stdout, NULL, _IONBF, 0);
+ setvbuf(stderr, NULL, _IONBF, 0);
+
+ ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs1);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait3.c b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait3.c
new file mode 100644
index 0000000..56dda8e
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait3.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_wait3.c,v 1.1 2016/12/13 18:00:10 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAIT3
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait4.c b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait4.c
new file mode 100644
index 0000000..5fbdb53
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait4.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_wait4.c,v 1.1 2016/12/13 18:00:10 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAIT4
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait6.c b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait6.c
new file mode 100644
index 0000000..117c844
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_wait6.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_wait6.c,v 1.1 2016/12/13 18:00:10 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAIT6
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitid.c b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitid.c
new file mode 100644
index 0000000..274e8bd
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitid.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_waitid.c,v 1.1 2016/12/13 18:00:10 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAITID
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitpid.c b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitpid.c
new file mode 100644
index 0000000..2fe5c57
--- /dev/null
+++ b/contrib/netbsd-tests/kernel/arch/i386/t_ptrace_waitpid.c
@@ -0,0 +1,30 @@
+/* $NetBSD: t_ptrace_waitpid.c,v 1.1 2016/12/13 18:00:10 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define TWAIT_WAITPID
+#include "t_ptrace_wait.c"
diff --git a/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c b/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c
index 19c7b02..1f40ada 100644
--- a/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c
+++ b/contrib/netbsd-tests/kernel/kqueue/read/t_fifo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */
+/* $NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
+__RCSID("$NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
#include <sys/stat.h>
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#define FIFONAME "fifo"
diff --git a/contrib/netbsd-tests/kernel/kqueue/read/t_file.c b/contrib/netbsd-tests/kernel/kqueue/read/t_file.c
index 80479af..f4669d2 100644
--- a/contrib/netbsd-tests/kernel/kqueue/read/t_file.c
+++ b/contrib/netbsd-tests/kernel/kqueue/read/t_file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_file.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */
+/* $NetBSD: t_file.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_file.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
+__RCSID("$NetBSD: t_file.c,v 1.4 2017/01/13 21:30:41 christos Exp $");
#include <sys/param.h>
#include <sys/event.h>
@@ -50,7 +50,7 @@ __RCSID("$NetBSD: t_file.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#define FILENAME "file"
#define NLINES 5
diff --git a/contrib/netbsd-tests/kernel/kqueue/read/t_file2.c b/contrib/netbsd-tests/kernel/kqueue/read/t_file2.c
index c77d283..733caeb 100644
--- a/contrib/netbsd-tests/kernel/kqueue/read/t_file2.c
+++ b/contrib/netbsd-tests/kernel/kqueue/read/t_file2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_file2.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */
+/* $NetBSD: t_file2.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_file2.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
+__RCSID("$NetBSD: t_file2.c,v 1.4 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
@@ -41,7 +41,7 @@ __RCSID("$NetBSD: t_file2.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
ATF_TC(file2);
ATF_TC_HEAD(file2, tc)
diff --git a/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c b/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c
index 2cdd015..56cb037 100644
--- a/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c
+++ b/contrib/netbsd-tests/kernel/kqueue/read/t_pipe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */
+/* $NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
+__RCSID("$NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
@@ -41,7 +41,7 @@ __RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
ATF_TC(pipe);
ATF_TC_HEAD(pipe, tc)
diff --git a/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c b/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c
index 57ccf92..3703829 100644
--- a/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c
+++ b/contrib/netbsd-tests/kernel/kqueue/read/t_ttypty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */
+/* $NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
+__RCSID("$NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
#include <sys/wait.h>
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
static void
h_check(bool check_master)
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c b/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c
index d996fdf..78b0587 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */
+/* $NetBSD: t_ioctl.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
+__RCSID("$NetBSD: t_ioctl.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
#include <sys/ioctl.h>
@@ -42,7 +42,7 @@ __RCSID("$NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(kfilter_byfilter);
ATF_TC_HEAD(kfilter_byfilter, tc)
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_proc1.c b/contrib/netbsd-tests/kernel/kqueue/t_proc1.c
index aa806ba..5f8c2a4 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_proc1.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_proc1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */
+/* $NetBSD: t_proc1.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
+__RCSID("$NetBSD: t_proc1.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
/*
* this also used to trigger problem fixed in
@@ -51,7 +51,7 @@ __RCSID("$NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static int
child(void)
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_proc2.c b/contrib/netbsd-tests/kernel/kqueue/t_proc2.c
index 2d8d7f7..2d905ed 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_proc2.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_proc2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */
+/* $NetBSD: t_proc2.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,11 +32,8 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
+__RCSID("$NetBSD: t_proc2.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#endif
#include <sys/event.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -50,7 +47,7 @@ __RCSID("$NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static void
child_two(void)
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_proc3.c b/contrib/netbsd-tests/kernel/kqueue/t_proc3.c
index eac2f9c..6def409 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_proc3.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_proc3.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */
+/* $NetBSD: t_proc3.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,11 +30,8 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
+__RCSID("$NetBSD: t_proc3.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#endif
#include <sys/event.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -48,7 +45,7 @@ __RCSID("$NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $");
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(proc3);
ATF_TC_HEAD(proc3, tc)
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_sig.c b/contrib/netbsd-tests/kernel/kqueue/t_sig.c
index ebbd76e..12e3d61 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_sig.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_sig.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sig.c,v 1.2 2010/11/03 16:10:20 christos Exp $ */
+/* $NetBSD: t_sig.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,11 +32,8 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sig.c,v 1.2 2010/11/03 16:10:20 christos Exp $");
+__RCSID("$NetBSD: t_sig.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#endif
#include <sys/event.h>
#include <sys/ioctl.h>
#include <sys/param.h>
@@ -51,7 +48,7 @@ __RCSID("$NetBSD: t_sig.c,v 1.2 2010/11/03 16:10:20 christos Exp $");
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#define NSIGNALS 5
diff --git a/contrib/netbsd-tests/kernel/kqueue/t_vnode.c b/contrib/netbsd-tests/kernel/kqueue/t_vnode.c
index 06ef683..e87c2b2 100644
--- a/contrib/netbsd-tests/kernel/kqueue/t_vnode.c
+++ b/contrib/netbsd-tests/kernel/kqueue/t_vnode.c
@@ -1,6 +1,3 @@
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#endif
#include <sys/event.h>
#include <sys/stat.h>
#include <sys/time.h>
diff --git a/contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c b/contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c
index 82b256c..fe375b8 100644
--- a/contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c
+++ b/contrib/netbsd-tests/kernel/kqueue/write/t_fifo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */
+/* $NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
+__RCSID("$NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
#include <sys/stat.h>
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#define FIFONAME "fifo"
diff --git a/contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c b/contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c
index 459a1f7..5b2ca8c 100644
--- a/contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c
+++ b/contrib/netbsd-tests/kernel/kqueue/write/t_pipe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */
+/* $NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
+__RCSID("$NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
#include <sys/wait.h>
@@ -44,7 +44,7 @@ __RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
ATF_TC(pipe1);
ATF_TC_HEAD(pipe1, tc)
diff --git a/contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c b/contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c
index 6983910..45a6750 100644
--- a/contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c
+++ b/contrib/netbsd-tests/kernel/kqueue/write/t_ttypty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:58 jmmv Exp $ */
+/* $NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:58 jmmv Exp $");
+__RCSID("$NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <sys/event.h>
#include <sys/wait.h>
@@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:58 jmmv Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
static void
h_check(bool check_master)
diff --git a/contrib/netbsd-tests/kernel/t_extent.c b/contrib/netbsd-tests/kernel/t_extent.c
index faefafa..57dfc2b 100644
--- a/contrib/netbsd-tests/kernel/t_extent.c
+++ b/contrib/netbsd-tests/kernel/t_extent.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_extent.c,v 1.4 2012/01/27 18:53:10 para Exp $ */
+/* $NetBSD: t_extent.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_extent.c,v 1.4 2012/01/27 18:53:10 para Exp $");
+__RCSID("$NetBSD: t_extent.c,v 1.5 2017/01/13 21:30:41 christos Exp $");
#include <sys/types.h>
#include <sys/queue.h>
@@ -41,7 +41,7 @@ __RCSID("$NetBSD: t_extent.c,v 1.4 2012/01/27 18:53:10 para Exp $");
#include <atf-c.h>
-#include "../h_macros.h"
+#include "h_macros.h"
static int ret;
static struct extent *ex;
diff --git a/contrib/netbsd-tests/kernel/t_filedesc.c b/contrib/netbsd-tests/kernel/t_filedesc.c
index 6b367ee..a938d6f 100644
--- a/contrib/netbsd-tests/kernel/t_filedesc.c
+++ b/contrib/netbsd-tests/kernel/t_filedesc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_filedesc.c,v 1.5 2012/03/18 09:46:50 jruoho Exp $ */
+/* $NetBSD: t_filedesc.c,v 1.6 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_filedesc.c,v 1.5 2012/03/18 09:46:50 jruoho Exp $");
+__RCSID("$NetBSD: t_filedesc.c,v 1.6 2017/01/13 21:30:41 christos Exp $");
#include <sys/types.h>
@@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_filedesc.c,v 1.5 2012/03/18 09:46:50 jruoho Exp $");
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../h_macros.h"
+#include "h_macros.h"
ATF_TC(getfilerace);
ATF_TC_HEAD(getfilerace, tc)
diff --git a/contrib/netbsd-tests/kernel/t_lock.c b/contrib/netbsd-tests/kernel/t_lock.c
index 3704afb..bd83abe 100644
--- a/contrib/netbsd-tests/kernel/t_lock.c
+++ b/contrib/netbsd-tests/kernel/t_lock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_lock.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */
+/* $NetBSD: t_lock.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_lock.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
+__RCSID("$NetBSD: t_lock.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <sys/time.h>
@@ -38,7 +38,7 @@ __RCSID("$NetBSD: t_lock.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $");
#include <atf-c.h>
-#include "../h_macros.h"
+#include "h_macros.h"
__cpu_simple_lock_t lk;
volatile int handled = 0;
diff --git a/contrib/netbsd-tests/kernel/t_mqueue.c b/contrib/netbsd-tests/kernel/t_mqueue.c
index 485269f..7edbbc9 100644
--- a/contrib/netbsd-tests/kernel/t_mqueue.c
+++ b/contrib/netbsd-tests/kernel/t_mqueue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mqueue.c,v 1.5 2017/01/10 22:10:22 christos Exp $ */
+/* $NetBSD: t_mqueue.c,v 1.6 2017/01/14 20:57:24 christos Exp $ */
/*
* Test for POSIX message queue priority handling.
@@ -6,23 +6,20 @@
* This file is in the Public Domain.
*/
-#ifdef __FreeBSD__
#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "freebsd_test_suite/macros.h"
-#endif
#include <atf-c.h>
-#include <sys/stat.h>
-
+#include <errno.h>
+#include <fcntl.h>
+#include <mqueue.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#include <unistd.h>
-#include <mqueue.h>
+#ifdef __FreeBSD__
+#include "freebsd_test_suite/macros.h"
+#endif
#define MQ_PRIO_BASE 24
diff --git a/contrib/netbsd-tests/kernel/t_ptrace.c b/contrib/netbsd-tests/kernel/t_ptrace.c
index 074a953..dc0bbdb 100644
--- a/contrib/netbsd-tests/kernel/t_ptrace.c
+++ b/contrib/netbsd-tests/kernel/t_ptrace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace.c,v 1.17 2016/11/13 22:59:31 kamil Exp $ */
+/* $NetBSD: t_ptrace.c,v 1.18 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace.c,v 1.17 2016/11/13 22:59:31 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace.c,v 1.18 2017/01/13 21:30:41 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -40,7 +40,7 @@ __RCSID("$NetBSD: t_ptrace.c,v 1.17 2016/11/13 22:59:31 kamil Exp $");
#include <atf-c.h>
-#include "../h_macros.h"
+#include "h_macros.h"
/*
* A child process cannot call atf functions and expect them to magically
diff --git a/contrib/netbsd-tests/kernel/t_ptrace_wait.c b/contrib/netbsd-tests/kernel/t_ptrace_wait.c
index e502a03..9d08c0e 100644
--- a/contrib/netbsd-tests/kernel/t_ptrace_wait.c
+++ b/contrib/netbsd-tests/kernel/t_ptrace_wait.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.69 2017/01/27 16:43:07 kamil Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.69 2017/01/27 16:43:07 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -37,8 +37,10 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $");
#include <sys/sysctl.h>
#include <sys/wait.h>
#include <machine/reg.h>
+#include <elf.h>
#include <err.h>
#include <errno.h>
+#include <lwp.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
@@ -48,7 +50,7 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $");
#include <atf-c.h>
-#include "../h_macros.h"
+#include "h_macros.h"
#include "t_ptrace_wait.h"
#include "msg.h"
@@ -65,6 +67,7 @@ __RCSID("$NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $");
#define PARENT_FROM_CHILD(info, fds, msg) \
ATF_REQUIRE(msg_read_child(info " from parent " # fds, &fds, &msg, sizeof(msg)) == 0)
+
ATF_TC(traceme1);
ATF_TC_HEAD(traceme1, tc)
{
@@ -1071,6 +1074,228 @@ ATF_TC_BODY(eventmask2, tc)
TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
}
+ATF_TC(eventmask3);
+ATF_TC_HEAD(eventmask3, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that PTRACE_VFORK in EVENT_MASK is preserved");
+}
+
+ATF_TC_BODY(eventmask3, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_event_t set_event, get_event;
+ const int len = sizeof(ptrace_event_t);
+
+ atf_tc_expect_fail("PR kern/51630");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ set_event.pe_set_event = PTRACE_VFORK;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &set_event, len) != -1);
+ ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, child, &get_event, len) != -1);
+ ATF_REQUIRE(memcmp(&set_event, &get_event, len) == 0);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(eventmask4);
+ATF_TC_HEAD(eventmask4, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that PTRACE_VFORK_DONE in EVENT_MASK is preserved");
+}
+
+ATF_TC_BODY(eventmask4, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_event_t set_event, get_event;
+ const int len = sizeof(ptrace_event_t);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ set_event.pe_set_event = PTRACE_VFORK_DONE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &set_event, len) != -1);
+ ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, child, &get_event, len) != -1);
+ ATF_REQUIRE(memcmp(&set_event, &get_event, len) == 0);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(eventmask5);
+ATF_TC_HEAD(eventmask5, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that PTRACE_LWP_CREATE in EVENT_MASK is preserved");
+}
+
+ATF_TC_BODY(eventmask5, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_event_t set_event, get_event;
+ const int len = sizeof(ptrace_event_t);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ set_event.pe_set_event = PTRACE_LWP_CREATE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &set_event, len) != -1);
+ ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, child, &get_event, len) != -1);
+ ATF_REQUIRE(memcmp(&set_event, &get_event, len) == 0);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(eventmask6);
+ATF_TC_HEAD(eventmask6, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that PTRACE_LWP_EXIT in EVENT_MASK is preserved");
+}
+
+ATF_TC_BODY(eventmask6, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_event_t set_event, get_event;
+ const int len = sizeof(ptrace_event_t);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ set_event.pe_set_event = PTRACE_LWP_EXIT;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &set_event, len) != -1);
+ ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, child, &get_event, len) != -1);
+ ATF_REQUIRE(memcmp(&set_event, &get_event, len) == 0);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
#if defined(TWAIT_HAVE_PID)
ATF_TC(fork1);
ATF_TC_HEAD(fork1, tc)
@@ -1296,12 +1521,6 @@ ATF_TC_BODY(vfork1, tc)
ptrace_event_t event;
const int elen = sizeof(event);
- /*
- * ptrace(2) command PT_SET_EVENT_MASK: option PTRACE_VFORK unsupported
- */
-#ifndef PTRACE_VFORK
-#define PTRACE_VFORK 0
-#endif
atf_tc_expect_fail("PR kern/51630");
printf("Before forking process PID=%d\n", getpid());
@@ -1483,6 +1702,197 @@ ATF_TC_BODY(vfork2, tc)
TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
}
+ATF_TC(vforkdone1);
+ATF_TC_HEAD(vforkdone1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that vfork(2) is intercepted by ptrace(2) with EVENT_MASK "
+ "set to PTRACE_VFORK_DONE");
+}
+
+ATF_TC_BODY(vforkdone1, tc)
+{
+ const int exitval = 5;
+ const int exitval2 = 15;
+ const int sigval = SIGSTOP;
+ pid_t child, child2, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ FORKEE_ASSERT((child2 = vfork()) != 1);
+
+ if (child2 == 0)
+ _exit(exitval2);
+
+ FORKEE_REQUIRE_SUCCESS
+ (wpid = TWAIT_GENERIC(child2, &status, 0), child2);
+
+ forkee_status_exited(status, exitval2);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Enable PTRACE_VFORK_DONE in EVENT_MASK for the child %d\n",
+ child);
+ event.pe_set_event = PTRACE_VFORK_DONE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK_DONE);
+
+ child2 = state.pe_other_pid;
+ printf("Reported PTRACE_VFORK_DONE event with forkee %d\n", child2);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGCHLD\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGCHLD);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(vforkdone2);
+ATF_TC_HEAD(vforkdone2, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that vfork(2) is intercepted by ptrace(2) with EVENT_MASK "
+ "set to PTRACE_FORK | PTRACE_VFORK_DONE");
+}
+
+ATF_TC_BODY(vforkdone2, tc)
+{
+ const int exitval = 5;
+ const int exitval2 = 15;
+ const int sigval = SIGSTOP;
+ pid_t child, child2, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ FORKEE_ASSERT((child2 = vfork()) != 1);
+
+ if (child2 == 0)
+ _exit(exitval2);
+
+ FORKEE_REQUIRE_SUCCESS
+ (wpid = TWAIT_GENERIC(child2, &status, 0), child2);
+
+ forkee_status_exited(status, exitval2);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Enable PTRACE_VFORK in EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_FORK | PTRACE_VFORK_DONE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK_DONE);
+
+ child2 = state.pe_other_pid;
+ printf("Reported PTRACE_VFORK_DONE event with forkee %d\n", child2);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGCHLD\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGCHLD);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
ATF_TC(io_read_d1);
ATF_TC_HEAD(io_read_d1, tc)
{
@@ -1999,6 +2409,72 @@ ATF_TC_BODY(io_write_d4, tc)
TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
}
+ATF_TC(io_read_auxv1);
+ATF_TC_HEAD(io_read_auxv1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify PT_READ_AUXV called for tracee");
+}
+
+ATF_TC_BODY(io_read_auxv1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ AuxInfo ai[100], *aip;
+ struct ptrace_io_desc io = {
+ .piod_op = PIOD_READ_AUXV,
+ .piod_offs = 0,
+ .piod_addr = ai,
+ .piod_len = sizeof(ai)
+ };
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Read new AUXV from tracee (PID=%d) by tracer (PID=%d)\n",
+ child, getpid());
+ ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1);
+
+ printf("Asserting that AUXV length (%zu) is > 0\n", io.piod_len);
+ ATF_REQUIRE(io.piod_len > 0);
+
+ for (aip = ai; aip->a_type != AT_NULL; aip++)
+ printf("a_type=%#llx a_v=%#llx\n",
+ (long long int)aip->a_type, (long long int)aip->a_v);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
ATF_TC(read_d1);
ATF_TC_HEAD(read_d1, tc)
{
@@ -4989,6 +5465,1124 @@ ATF_TC_BODY(siginfo6, tc)
}
#endif
+volatile lwpid_t the_lwp_id = 0;
+
+static void
+lwp_main_func(void *arg)
+{
+ the_lwp_id = _lwp_self();
+ _lwp_exit();
+}
+
+ATF_TC(lwp_create1);
+ATF_TC_HEAD(lwp_create1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that 1 LWP creation is intercepted by ptrace(2) with "
+ "EVENT_MASK set to PTRACE_LWP_CREATE");
+}
+
+ATF_TC_BODY(lwp_create1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+ ucontext_t uc;
+ lwpid_t lid;
+ static const size_t ssize = 16*1024;
+ void *stack;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before allocating memory for stack in child\n");
+ FORKEE_ASSERT((stack = malloc(ssize)) != NULL);
+
+ printf("Before making context for new lwp in child\n");
+ _lwp_makecontext(&uc, lwp_main_func, NULL, NULL, stack, ssize);
+
+ printf("Before creating new in child\n");
+ FORKEE_ASSERT(_lwp_create(&uc, 0, &lid) == 0);
+
+ printf("Before waiting for lwp %d to exit\n", lid);
+ FORKEE_ASSERT(_lwp_wait(lid, NULL) == 0);
+
+ printf("Before verifying that reported %d and running lid %d "
+ "are the same\n", lid, the_lwp_id);
+ FORKEE_ASSERT_EQ(lid, the_lwp_id);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Set empty EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_LWP_CREATE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGTRAP\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_LWP_CREATE);
+
+ lid = state.pe_lwp;
+ printf("Reported PTRACE_LWP_CREATE event with lid %d\n", lid);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(lwp_exit1);
+ATF_TC_HEAD(lwp_exit1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that 1 LWP creation is intercepted by ptrace(2) with "
+ "EVENT_MASK set to PTRACE_LWP_EXIT");
+}
+
+ATF_TC_BODY(lwp_exit1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+ ucontext_t uc;
+ lwpid_t lid;
+ static const size_t ssize = 16*1024;
+ void *stack;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before allocating memory for stack in child\n");
+ FORKEE_ASSERT((stack = malloc(ssize)) != NULL);
+
+ printf("Before making context for new lwp in child\n");
+ _lwp_makecontext(&uc, lwp_main_func, NULL, NULL, stack, ssize);
+
+ printf("Before creating new in child\n");
+ FORKEE_ASSERT(_lwp_create(&uc, 0, &lid) == 0);
+
+ printf("Before waiting for lwp %d to exit\n", lid);
+ FORKEE_ASSERT(_lwp_wait(lid, NULL) == 0);
+
+ printf("Before verifying that reported %d and running lid %d "
+ "are the same\n", lid, the_lwp_id);
+ FORKEE_ASSERT_EQ(lid, the_lwp_id);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Set empty EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_LWP_EXIT;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGTRAP\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_LWP_EXIT);
+
+ lid = state.pe_lwp;
+ printf("Reported PTRACE_LWP_EXIT event with lid %d\n", lid);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(signal1);
+ATF_TC_HEAD(signal1, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking single unrelated signal does not stop tracer "
+ "from catching other signals");
+}
+
+ATF_TC_BODY(signal1, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ const int signotmasked = SIGINT;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before raising %s from child\n",
+ strsignal(signotmasked));
+ FORKEE_ASSERT(raise(signotmasked) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, signotmasked);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(signal2);
+ATF_TC_HEAD(signal2, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee stops tracer from "
+ "catching this raised signal");
+}
+
+ATF_TC_BODY(signal2, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before raising %s breakpoint from child\n",
+ strsignal(sigmasked));
+ FORKEE_ASSERT(raise(sigmasked) == 0);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(signal3);
+ATF_TC_HEAD(signal3, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching software breakpoints");
+}
+
+ATF_TC_BODY(signal3, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before raising software breakpoint from child\n");
+#if defined(__x86_64__)
+ __asm__ __volatile__ ("int3\n;");
+#else
+ /* port me */
+#endif
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+#if defined(PT_STEP)
+ATF_TC(signal4);
+ATF_TC_HEAD(signal4, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching single step trap");
+}
+
+ATF_TC_BODY(signal4, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+ int happy;
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ happy = check_happy(100);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ FORKEE_ASSERT_EQ(happy, check_happy(100));
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+ATF_TC(signal5);
+ATF_TC_HEAD(signal5, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching exec() breakpoint");
+}
+
+ATF_TC_BODY(signal5, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before calling execve(2) from child\n");
+ execlp("/bin/echo", "/bin/echo", NULL);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+#if defined(TWAIT_HAVE_PID)
+ATF_TC(signal6);
+ATF_TC_HEAD(signal6, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching PTRACE_FORK breakpoint");
+}
+
+ATF_TC_BODY(signal6, tc)
+{
+ const int exitval = 5;
+ const int exitval2 = 15;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, child2, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ FORKEE_ASSERT((child2 = fork()) != 1);
+
+ if (child2 == 0)
+ _exit(exitval2);
+
+ FORKEE_REQUIRE_SUCCESS
+ (wpid = TWAIT_GENERIC(child2, &status, 0), child2);
+
+ forkee_status_exited(status, exitval2);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Enable PTRACE_FORK in EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_FORK;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK);
+
+ child2 = state.pe_other_pid;
+ printf("Reported PTRACE_FORK event with forkee %d\n", child2);
+
+ printf("Before calling %s() for the child2\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0),
+ child2);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child2, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK);
+ ATF_REQUIRE_EQ(state.pe_other_pid, child);
+
+ printf("Before resuming the forkee process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child2, (void *)1, 0) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the forkee - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0),
+ child2);
+
+ validate_status_exited(status, exitval2);
+
+ printf("Before calling %s() for the forkee - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD,
+ wpid = TWAIT_GENERIC(child2, &status, 0));
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGCHLD\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGCHLD);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+#if defined(TWAIT_HAVE_PID)
+ATF_TC(signal7);
+ATF_TC_HEAD(signal7, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching PTRACE_VFORK breakpoint");
+}
+
+ATF_TC_BODY(signal7, tc)
+{
+ const int exitval = 5;
+ const int exitval2 = 15;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, child2, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+
+ atf_tc_expect_fail("PR kern/51918 PR kern/51630");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ FORKEE_ASSERT((child2 = fork()) != 1);
+
+ if (child2 == 0)
+ _exit(exitval2);
+
+ FORKEE_REQUIRE_SUCCESS
+ (wpid = TWAIT_GENERIC(child2, &status, 0), child2);
+
+ forkee_status_exited(status, exitval2);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Enable PTRACE_VFORK in EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_VFORK;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK);
+
+ child2 = state.pe_other_pid;
+ printf("Reported PTRACE_VFORK event with forkee %d\n", child2);
+
+ printf("Before calling %s() for the child2\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0),
+ child2);
+
+ validate_status_stopped(status, SIGTRAP);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child2, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK);
+ ATF_REQUIRE_EQ(state.pe_other_pid, child);
+
+ printf("Before resuming the forkee process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child2, (void *)1, 0) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the forkee - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0),
+ child2);
+
+ validate_status_exited(status, exitval2);
+
+ printf("Before calling %s() for the forkee - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD,
+ wpid = TWAIT_GENERIC(child2, &status, 0));
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGCHLD\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGCHLD);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+#endif
+
+ATF_TC(signal8);
+ATF_TC_HEAD(signal8, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching PTRACE_VFORK_DONE breakpoint");
+}
+
+ATF_TC_BODY(signal8, tc)
+{
+ const int exitval = 5;
+ const int exitval2 = 15;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, child2, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ FORKEE_ASSERT((child2 = vfork()) != 1);
+
+ if (child2 == 0)
+ _exit(exitval2);
+
+ FORKEE_REQUIRE_SUCCESS
+ (wpid = TWAIT_GENERIC(child2, &status, 0), child2);
+
+ forkee_status_exited(status, exitval2);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Enable PTRACE_VFORK_DONE in EVENT_MASK for the child %d\n",
+ child);
+ event.pe_set_event = PTRACE_VFORK_DONE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK_DONE);
+
+ child2 = state.pe_other_pid;
+ printf("Reported PTRACE_VFORK_DONE event with forkee %d\n", child2);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGCHLD\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, SIGCHLD);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(signal9);
+ATF_TC_HEAD(signal9, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching PTRACE_LWP_CREATE breakpoint");
+}
+
+ATF_TC_BODY(signal9, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+ ucontext_t uc;
+ lwpid_t lid;
+ static const size_t ssize = 16*1024;
+ void *stack;
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before allocating memory for stack in child\n");
+ FORKEE_ASSERT((stack = malloc(ssize)) != NULL);
+
+ printf("Before making context for new lwp in child\n");
+ _lwp_makecontext(&uc, lwp_main_func, NULL, NULL, stack, ssize);
+
+ printf("Before creating new in child\n");
+ FORKEE_ASSERT(_lwp_create(&uc, 0, &lid) == 0);
+
+ printf("Before waiting for lwp %d to exit\n", lid);
+ FORKEE_ASSERT(_lwp_wait(lid, NULL) == 0);
+
+ printf("Before verifying that reported %d and running lid %d "
+ "are the same\n", lid, the_lwp_id);
+ FORKEE_ASSERT_EQ(lid, the_lwp_id);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Set empty EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_LWP_CREATE;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGTRAP\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_LWP_CREATE);
+
+ lid = state.pe_lwp;
+ printf("Reported PTRACE_LWP_CREATE event with lid %d\n", lid);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
+ATF_TC(signal10);
+ATF_TC_HEAD(signal10, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Verify that masking SIGTRAP in tracee does not stop tracer from "
+ "catching PTRACE_LWP_EXIT breakpoint");
+}
+
+ATF_TC_BODY(signal10, tc)
+{
+ const int exitval = 5;
+ const int sigval = SIGSTOP;
+ const int sigmasked = SIGTRAP;
+ pid_t child, wpid;
+#if defined(TWAIT_HAVE_STATUS)
+ int status;
+#endif
+ sigset_t intmask;
+ ptrace_state_t state;
+ const int slen = sizeof(state);
+ ptrace_event_t event;
+ const int elen = sizeof(event);
+ ucontext_t uc;
+ lwpid_t lid;
+ static const size_t ssize = 16*1024;
+ void *stack;
+
+ atf_tc_expect_fail("PR kern/51918");
+
+ printf("Before forking process PID=%d\n", getpid());
+ ATF_REQUIRE((child = fork()) != -1);
+ if (child == 0) {
+ printf("Before calling PT_TRACE_ME from child %d\n", getpid());
+ FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
+
+ sigemptyset(&intmask);
+ sigaddset(&intmask, sigmasked);
+ sigprocmask(SIG_BLOCK, &intmask, NULL);
+
+ printf("Before raising %s from child\n", strsignal(sigval));
+ FORKEE_ASSERT(raise(sigval) == 0);
+
+ printf("Before allocating memory for stack in child\n");
+ FORKEE_ASSERT((stack = malloc(ssize)) != NULL);
+
+ printf("Before making context for new lwp in child\n");
+ _lwp_makecontext(&uc, lwp_main_func, NULL, NULL, stack, ssize);
+
+ printf("Before creating new in child\n");
+ FORKEE_ASSERT(_lwp_create(&uc, 0, &lid) == 0);
+
+ printf("Before waiting for lwp %d to exit\n", lid);
+ FORKEE_ASSERT(_lwp_wait(lid, NULL) == 0);
+
+ printf("Before verifying that reported %d and running lid %d "
+ "are the same\n", lid, the_lwp_id);
+ FORKEE_ASSERT_EQ(lid, the_lwp_id);
+
+ printf("Before exiting of the child process\n");
+ _exit(exitval);
+ }
+ printf("Parent process PID=%d, child's PID=%d\n", getpid(), child);
+
+ printf("Before calling %s() for the child\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigval);
+
+ printf("Set empty EVENT_MASK for the child %d\n", child);
+ event.pe_set_event = PTRACE_LWP_EXIT;
+ ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected stopped "
+ "SIGTRAP\n", TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_stopped(status, sigmasked);
+
+ ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1);
+
+ ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_LWP_EXIT);
+
+ lid = state.pe_lwp;
+ printf("Reported PTRACE_LWP_EXIT event with lid %d\n", lid);
+
+ printf("Before resuming the child process where it left off and "
+ "without signal to be sent\n");
+ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
+
+ printf("Before calling %s() for the child - expected exited\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child);
+
+ validate_status_exited(status, exitval);
+
+ printf("Before calling %s() for the child - expected no process\n",
+ TWAIT_FNAME);
+ TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0));
+}
+
ATF_TP_ADD_TCS(tp)
{
setvbuf(stdout, NULL, _IONBF, 0);
@@ -5008,6 +6602,10 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, eventmask1);
ATF_TP_ADD_TC(tp, eventmask2);
+ ATF_TP_ADD_TC(tp, eventmask3);
+ ATF_TP_ADD_TC(tp, eventmask4);
+ ATF_TP_ADD_TC(tp, eventmask5);
+ ATF_TP_ADD_TC(tp, eventmask6);
ATF_TP_ADD_TC_HAVE_PID(tp, fork1);
ATF_TP_ADD_TC(tp, fork2);
@@ -5015,6 +6613,9 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC_HAVE_PID(tp, vfork1);
ATF_TP_ADD_TC(tp, vfork2);
+ ATF_TP_ADD_TC(tp, vforkdone1);
+ ATF_TP_ADD_TC(tp, vforkdone2);
+
ATF_TP_ADD_TC(tp, io_read_d1);
ATF_TP_ADD_TC(tp, io_read_d2);
ATF_TP_ADD_TC(tp, io_read_d3);
@@ -5051,6 +6652,8 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, read_i3);
ATF_TP_ADD_TC(tp, read_i4);
+ ATF_TP_ADD_TC(tp, io_read_auxv1);
+
ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs1);
ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs2);
ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs3);
@@ -5078,5 +6681,20 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC_HAVE_PID(tp, siginfo5);
ATF_TP_ADD_TC_PT_STEP(tp, siginfo6);
+ ATF_TP_ADD_TC(tp, lwp_create1);
+
+ ATF_TP_ADD_TC(tp, lwp_exit1);
+
+ ATF_TP_ADD_TC(tp, signal1);
+ ATF_TP_ADD_TC(tp, signal2);
+ ATF_TP_ADD_TC(tp, signal3);
+ ATF_TP_ADD_TC_PT_STEP(tp, signal4);
+ ATF_TP_ADD_TC(tp, signal5);
+ ATF_TP_ADD_TC_HAVE_PID(tp, signal6);
+ ATF_TP_ADD_TC_HAVE_PID(tp, signal7);
+ ATF_TP_ADD_TC(tp, signal8);
+ ATF_TP_ADD_TC(tp, signal9);
+ ATF_TP_ADD_TC(tp, signal10);
+
return atf_no_error();
}
diff --git a/contrib/netbsd-tests/kernel/t_pty.c b/contrib/netbsd-tests/kernel/t_pty.c
index fccfc17b..3b079ef 100644
--- a/contrib/netbsd-tests/kernel/t_pty.c
+++ b/contrib/netbsd-tests/kernel/t_pty.c
@@ -1,4 +1,4 @@
-/* $Id: t_pty.c,v 1.1 2011/09/24 15:53:01 christos Exp $ */
+/* $Id: t_pty.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*
* Allocates a pty(4) device, and sends the specified number of packets of the
@@ -9,7 +9,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_pty.c,v 1.1 2011/09/24 15:53:01 christos Exp $");
+__RCSID("$NetBSD: t_pty.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <errno.h>
#include <err.h>
@@ -35,7 +35,7 @@ static __dead void usage(const char *);
static void parse_args(int, char **);
#else
#include <atf-c.h>
-#include "../h_macros.h"
+#include "h_macros.h"
#endif
static int pty_open(void);
diff --git a/contrib/netbsd-tests/kernel/t_rnd.c b/contrib/netbsd-tests/kernel/t_rnd.c
index 8646130..ae9ef55 100644
--- a/contrib/netbsd-tests/kernel/t_rnd.c
+++ b/contrib/netbsd-tests/kernel/t_rnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_rnd.c,v 1.9 2016/05/22 04:34:44 riastradh Exp $ */
+/* $NetBSD: t_rnd.c,v 1.10 2017/01/13 21:30:41 christos Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_rnd.c,v 1.9 2016/05/22 04:34:44 riastradh Exp $");
+__RCSID("$NetBSD: t_rnd.c,v 1.10 2017/01/13 21:30:41 christos Exp $");
#include <sys/types.h>
#include <sys/fcntl.h>
@@ -39,7 +39,7 @@ __RCSID("$NetBSD: t_rnd.c,v 1.9 2016/05/22 04:34:44 riastradh Exp $");
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../h_macros.h"
+#include "h_macros.h"
ATF_TC(RNDADDDATA);
ATF_TC_HEAD(RNDADDDATA, tc)
diff --git a/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c b/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
index 5c496c8..4f91afd 100644
--- a/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
+++ b/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */
+/* $NetBSD: t_mkfifoat.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $");
+__RCSID("$NetBSD: t_mkfifoat.c,v 1.4 2017/01/14 20:55:26 christos Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -55,13 +55,11 @@ ATF_TC_HEAD(mkfifoat_fd, tc)
ATF_TC_BODY(mkfifoat_fd, tc)
{
int dfd;
- int fd;
mode_t mode = 0600;
ATF_REQUIRE(mkdir(DIR, 0755) == 0);
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
- ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1);
- ATF_REQUIRE(close(fd) == 0);
+ ATF_REQUIRE(mkfifoat(dfd, BASEFIFO, mode) != -1);
ATF_REQUIRE(access(FIFO, F_OK) == 0);
(void)close(dfd);
}
@@ -74,12 +72,10 @@ ATF_TC_HEAD(mkfifoat_fdcwd, tc)
}
ATF_TC_BODY(mkfifoat_fdcwd, tc)
{
- int fd;
mode_t mode = 0600;
ATF_REQUIRE(mkdir(DIR, 0755) == 0);
- ATF_REQUIRE((fd = mkfifoat(AT_FDCWD, FIFO, mode)) != -1);
- ATF_REQUIRE(close(fd) == 0);
+ ATF_REQUIRE(mkfifoat(AT_FDCWD, FIFO, mode) != -1);
ATF_REQUIRE(access(FIFO, F_OK) == 0);
}
@@ -91,10 +87,9 @@ ATF_TC_HEAD(mkfifoat_fdcwderr, tc)
}
ATF_TC_BODY(mkfifoat_fdcwderr, tc)
{
- int fd;
mode_t mode = 0600;
- ATF_REQUIRE((fd = mkfifoat(AT_FDCWD, FIFOERR, mode)) == -1);
+ ATF_REQUIRE(mkfifoat(AT_FDCWD, FIFOERR, mode) == -1);
}
ATF_TC(mkfifoat_fderr);
@@ -110,7 +105,7 @@ ATF_TC_BODY(mkfifoat_fderr, tc)
ATF_REQUIRE(mkdir(DIR, 0755) == 0);
ATF_REQUIRE((fd = open(FIFO, O_CREAT|O_RDWR, 0644)) != -1);
ATF_REQUIRE(close(fd) == 0);
- ATF_REQUIRE((fd = mkfifoat(-1, FIFO, mode)) == -1);
+ ATF_REQUIRE(mkfifoat(-1, FIFO, mode) == -1);
}
ATF_TP_ADD_TCS(tp)
diff --git a/contrib/netbsd-tests/lib/libc/db/t_db.sh b/contrib/netbsd-tests/lib/libc/db/t_db.sh
index 6858e36..93a7b1e 100755
--- a/contrib/netbsd-tests/lib/libc/db/t_db.sh
+++ b/contrib/netbsd-tests/lib/libc/db/t_db.sh
@@ -42,18 +42,10 @@ dict()
elif [ -f /usr/dict/words ]; then
echo /usr/dict/words
else
- echo ""
atf_fail "no dictionary found"
fi
}
-# Begin FreeBSD
-dict()
-{
- echo /usr/share/dict/words
-}
-# End FreeBSD
-
SEVEN_SEVEN="abcdefg|abcdefg|abcdefg|abcdefg|abcdefg|abcdefg|abcdefg"
atf_test_case small_btree
diff --git a/contrib/netbsd-tests/lib/libc/gen/exect/t_exect.c b/contrib/netbsd-tests/lib/libc/gen/exect/t_exect.c
new file mode 100644
index 0000000..4c85e4b
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libc/gen/exect/t_exect.c
@@ -0,0 +1,90 @@
+/* $NetBSD: t_exect.c,v 1.6 2016/12/12 10:34:55 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <atf-c.h>
+
+#include <errno.h>
+#include <signal.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <unistd.h>
+
+ATF_TC(t_exect_null);
+
+ATF_TC_HEAD(t_exect_null, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Tests an empty exect(2) executing");
+}
+
+static volatile sig_atomic_t caught = 0;
+
+static void
+sigtrap_handler(int sig, siginfo_t *info, void *ctx)
+{
+ ATF_REQUIRE_EQ(sig, SIGTRAP);
+ ATF_REQUIRE_EQ(info->si_code, TRAP_TRACE);
+
+ ++caught;
+}
+
+ATF_TC_BODY(t_exect_null, tc)
+{
+ struct sigaction act;
+
+ /*
+ * Currently exect(3) is misdesigned -- see PR port-amd64/51700 and it
+ * needs to be redone from scratch.
+ *
+ * This test affects amd64 releng machines causing tests to hang or
+ * fail. As there is little point to test interface that is still not,
+ * designed and implemented and is breaking tests - skip it
+ * unconditionally for all ports.
+ */
+ /* Prevent static analysis from requiring t_exec_null to be __dead. */
+ if (!caught)
+ atf_tc_skip("exect(3) misdesigned and hangs - PR port-amd64/51700");
+
+ ATF_REQUIRE(sigemptyset(&act.sa_mask) == 0);
+ act.sa_sigaction = sigtrap_handler;
+ act.sa_flags = SA_SIGINFO;
+
+ ATF_REQUIRE(sigaction(SIGTRAP, &act, 0) == 0);
+
+ ATF_REQUIRE_ERRNO(EFAULT, exect(NULL, NULL, NULL) == -1);
+
+ ATF_REQUIRE_EQ_MSG(caught, 1, "expected caught (1) != received (%d)",
+ (int)caught);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, t_exect_null);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c
index 2085b9e..8e4d30d 100644
--- a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c
+++ b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_spawnattr.c
@@ -30,7 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_glob.c b/contrib/netbsd-tests/lib/libc/gen/t_glob.c
index 0572a42..c53e183 100644
--- a/contrib/netbsd-tests/lib/libc/gen/t_glob.c
+++ b/contrib/netbsd-tests/lib/libc/gen/t_glob.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_glob.c,v 1.3 2013/01/02 11:28:48 martin Exp $ */
+/* $NetBSD: t_glob.c,v 1.5 2017/01/14 20:47:41 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_glob.c,v 1.3 2013/01/02 11:28:48 martin Exp $");
+__RCSID("$NetBSD: t_glob.c,v 1.5 2017/01/14 20:47:41 christos Exp $");
#include <atf-c.h>
@@ -46,13 +46,7 @@ __RCSID("$NetBSD: t_glob.c,v 1.3 2013/01/02 11:28:48 martin Exp $");
#include <string.h>
#include <errno.h>
-#ifdef __FreeBSD__
#include "h_macros.h"
-#define __gl_stat_t struct stat
-#define _S_IFDIR S_IFDIR
-#else
-#include "../../../h_macros.h"
-#endif
#ifdef DEBUG
@@ -91,7 +85,7 @@ static struct gl_dir d[] = {
{ "a/b", b, __arraycount(b), 0 },
};
-#ifndef __FreeBSD__
+#ifdef GLOB_STAR
static const char *glob_star[] = {
"a/1", "a/3", "a/4", "a/b", "a/b/w", "a/b/x", "a/b/y", "a/b/z",
};
@@ -158,7 +152,7 @@ gl_stat(const char *name , __gl_stat_t *st)
memset(st, 0, sizeof(*st));
if (strcmp(buf, "a") == 0 || strcmp(buf, "a/b") == 0) {
- st->st_mode |= _S_IFDIR;
+ st->st_mode |= S_IFDIR;
return 0;
}
@@ -225,7 +219,7 @@ run(const char *p, int flags, const char **res, size_t len)
}
-#ifndef __FreeBSD__
+#ifdef GLOB_STAR
ATF_TC(glob_star);
ATF_TC_HEAD(glob_star, tc)
{
@@ -274,7 +268,7 @@ ATF_TC_BODY(glob_nocheck, tc)
ATF_TP_ADD_TCS(tp)
{
-#ifndef __FreeBSD__
+#ifdef GLOB_STAR
ATF_TP_ADD_TC(tp, glob_star);
#endif
ATF_TP_ADD_TC(tp, glob_star_not);
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c b/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
index 17eac87..54d798f 100644
--- a/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
+++ b/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
@@ -34,11 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef __FreeBSD__
-#include <libutil.h>
-#else
#include <util.h>
-#endif
const struct hnopts {
size_t ho_len;
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_sleep.c b/contrib/netbsd-tests/lib/libc/gen/t_sleep.c
index e85867a..d4bd271 100644
--- a/contrib/netbsd-tests/lib/libc/gen/t_sleep.c
+++ b/contrib/netbsd-tests/lib/libc/gen/t_sleep.c
@@ -26,10 +26,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef __FreeBSD__
-/* kqueue(2) on FreeBSD requires sys/types.h for uintptr_t; NetBSD doesn't. */
-#include <sys/types.h>
-#endif
#include <sys/cdefs.h>
#include <sys/event.h>
#include <sys/signal.h>
diff --git a/contrib/netbsd-tests/lib/libc/hash/h_hash.c b/contrib/netbsd-tests/lib/libc/hash/h_hash.c
index 6e20a48..33b9f9a 100644
--- a/contrib/netbsd-tests/lib/libc/hash/h_hash.c
+++ b/contrib/netbsd-tests/lib/libc/hash/h_hash.c
@@ -35,13 +35,8 @@
#include <unistd.h>
#include <string.h>
#include <md5.h>
-#ifdef __NetBSD__
#include <sha1.h>
-#endif
-#ifdef __FreeBSD__
-#include <sha.h>
-#endif
int mflag, rflag, sflag, tflag;
@@ -107,32 +102,17 @@ regress(void)
MD5Final(out, &ctx);
outlen = 16;
} else {
-#ifdef __FreeBSD__
- SHA_CTX ctx;
-
- SHA1_Init(&ctx);
- SHA1_Update(&ctx, buf, len);
-#else
SHA1_CTX ctx;
SHA1Init(&ctx);
SHA1Update(&ctx, buf, len);
-#endif
while (!last &&
fgets((char *)buf, sizeof(buf), stdin) != NULL) {
len = strlen((char *)buf);
CHOMP(buf, len, last);
-#ifdef __FreeBSD__
- SHA1_Update(&ctx, buf, len);
-#else
SHA1Update(&ctx, buf, len);
-#endif
}
-#ifdef __FreeBSD__
- SHA1_Final(out, &ctx);
-#else
SHA1Final(out, &ctx);
-#endif
outlen = 20;
}
hexdump(out, outlen);
diff --git a/contrib/netbsd-tests/lib/libc/hash/t_hmac.c b/contrib/netbsd-tests/lib/libc/hash/t_hmac.c
new file mode 100644
index 0000000..3dcbea9
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libc/hash/t_hmac.c
@@ -0,0 +1,127 @@
+/* $NetBSD: t_hmac.c,v 1.1 2016/07/02 14:52:09 christos Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_hmac.c,v 1.1 2016/07/02 14:52:09 christos Exp $");
+
+#include <atf-c.h>
+#include <string.h>
+#include <stdlib.h>
+#include <openssl/evp.h>
+#include <openssl/hmac.h>
+
+static void
+test(void)
+{
+ uint8_t tmp1[EVP_MAX_MD_SIZE];
+ uint8_t tmp2[EVP_MAX_MD_SIZE];
+ uint8_t key[256];
+ uint8_t data[4096];
+ unsigned int tmp1len;
+ size_t tmp2len;
+ int stop;
+ void *e1;
+ const void *evps[] = {
+ EVP_md2(),
+ EVP_md4(),
+ EVP_md5(),
+ EVP_ripemd160(),
+ EVP_sha1(),
+ EVP_sha224(),
+ EVP_sha256(),
+ EVP_sha384(),
+ EVP_sha512(),
+ };
+ const char *names[] = {
+ "md2",
+ "md4",
+ "md5",
+ "rmd160",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha384",
+ "sha512",
+ };
+
+ for (size_t k = 0; k < sizeof(key); k++)
+ key[k] = k;
+ for (size_t d = 0; d < sizeof(data); d++)
+ data[d] = d % 256;
+
+ for (size_t t = 0; t < __arraycount(names); t++)
+ for (size_t i = 1; i < sizeof(key); i += 9)
+ for (size_t j = 3; j < sizeof(data); j += 111) {
+ stop = 0;
+#ifdef DEBUG
+ printf("%s: keysize = %zu datasize = %zu\n", names[t],
+ i, j);
+#endif
+ memset(tmp1, 0, sizeof(tmp1));
+ memset(tmp2, 0, sizeof(tmp2));
+ e1 = HMAC(evps[t], key, i, data, j, tmp1, &tmp1len);
+ ATF_REQUIRE(e1 != NULL);
+ tmp2len = hmac(names[t], key, i, data, j, tmp2,
+ sizeof(tmp2));
+ ATF_REQUIRE_MSG(tmp1len == tmp2len, "hash %s len %u "
+ "!= %zu", names[t], tmp1len, tmp2len);
+ for (size_t k = 0; k < tmp2len; k++)
+ if (tmp1[k] != tmp2[k]) {
+#ifdef DEBUG
+ printf("%zu %.2x %.2x\n",
+ k, tmp1[k], tmp2[k]);
+#endif
+ stop = 1;
+ break;
+ }
+ ATF_REQUIRE_MSG(!stop, "hash %s failed for "
+ "keylen=%zu, datalen=%zu", names[t], i, j);
+ }
+}
+
+ATF_TC(t_hmac);
+
+ATF_TC_HEAD(t_hmac, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Test hmac functions for consistent results");
+}
+
+ATF_TC_BODY(t_hmac, tc)
+{
+ test();
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, t_hmac);
+ return atf_no_error();
+}
+
diff --git a/contrib/netbsd-tests/lib/libc/hash/t_sha2.c b/contrib/netbsd-tests/lib/libc/hash/t_sha2.c
index ce2c80d..a45e82a 100644
--- a/contrib/netbsd-tests/lib/libc/hash/t_sha2.c
+++ b/contrib/netbsd-tests/lib/libc/hash/t_sha2.c
@@ -36,23 +36,9 @@ __RCSID("$NetBSD: t_sha2.c,v 1.3 2012/09/26 22:23:30 joerg Exp $");
#include <atf-c.h>
#include <sys/types.h>
-#ifdef __NetBSD__
#include <sha2.h>
-#endif
#include <string.h>
-#ifdef __FreeBSD__
-#include <openssl/sha.h>
-typedef SHA512_CTX SHA384_CTX;
-/* From /usr/src/crypto/openssh/openbsd-compat/sha2.h */
-#define SHA256_DIGEST_LENGTH 32
-#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1)
-#define SHA384_DIGEST_LENGTH 48
-#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1)
-#define SHA512_DIGEST_LENGTH 64
-#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
-#endif
-
ATF_TC(t_sha256);
ATF_TC(t_sha384);
ATF_TC(t_sha512);
diff --git a/contrib/netbsd-tests/lib/libc/locale/t_io.c b/contrib/netbsd-tests/lib/libc/locale/t_io.c
index 86029e9..8c7f371 100644
--- a/contrib/netbsd-tests/lib/libc/locale/t_io.c
+++ b/contrib/netbsd-tests/lib/libc/locale/t_io.c
@@ -57,11 +57,9 @@ ATF_TC_BODY(bad_big5_wprintf, tc)
atf_tc_skip("does not fail as expected (may be implementation "
"specific issue with the test)");
#endif
-
/* XXX implementation detail knowledge (wchar_t encoding) */
wchar_t ibuf[] = { 0xcf10, 0 };
setlocale(LC_CTYPE, "zh_TW.Big5");
-
ATF_REQUIRE_ERRNO(EILSEQ, wprintf(L"%ls\n", ibuf) < 0);
ATF_REQUIRE(ferror(stdout));
}
@@ -78,12 +76,10 @@ ATF_TC_BODY(bad_big5_swprintf, tc)
atf_tc_skip("does not fail as expected (may be implementation "
"specific issue with the test)");
#endif
-
/* XXX implementation detail knowledge (wchar_t encoding) */
wchar_t ibuf[] = { 0xcf10, 0 };
wchar_t obuf[20];
setlocale(LC_CTYPE, "zh_TW.Big5");
-
ATF_REQUIRE_ERRNO(EILSEQ,
swprintf(obuf, sizeof(obuf), L"%ls\n", ibuf) < 0);
}
diff --git a/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c b/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
index 2e57786..e366344 100644
--- a/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
+++ b/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
@@ -137,7 +137,6 @@ ATF_TC_BODY(mbtowc, tc)
h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B");
h_mbtowc("ja_JP.SJIS", "\202", "\202\240");
h_mbtowc("ja_JP.eucJP", "\244", "\244\242");
- /* Moved last as it fails */
h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
h_mbtowc("zh_TW.Big5", "\241", "\241@");
h_mbtowc("zh_TW.eucTW", "\241", "\241\241");
diff --git a/contrib/netbsd-tests/lib/libc/regex/debug.c b/contrib/netbsd-tests/lib/libc/regex/debug.c
index 22f0b90..18ab6ea 100644
--- a/contrib/netbsd-tests/lib/libc/regex/debug.c
+++ b/contrib/netbsd-tests/lib/libc/regex/debug.c
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.c,v 1.2 2011/10/10 04:32:41 christos Exp $ */
+/* $NetBSD: debug.c,v 1.3 2017/01/14 00:50:56 christos Exp $ */
/*-
* Copyright (c) 1993 The NetBSD Foundation, Inc.
@@ -26,18 +26,15 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/types.h>
#include <ctype.h>
#include <limits.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#include <sys/types.h>
-#ifdef __FreeBSD__
#include <wchar.h>
#include <wctype.h>
-#endif
/* Don't sort these! */
#include "utils.h"
diff --git a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
index 0670e51..f9bd276 100644
--- a/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
+++ b/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_exhaust.c,v 1.7 2011/11/16 18:37:31 christos Exp $ */
+/* $NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,17 +37,15 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_exhaust.c,v 1.7 2011/11/16 18:37:31 christos Exp $");
+__RCSID("$NetBSD: t_exhaust.c,v 1.8 2017/01/14 00:50:56 christos Exp $");
-#include <stdio.h>
+#include <sys/resource.h>
+#include <atf-c.h>
+#include <err.h>
#include <regex.h>
-#include <string.h>
+#include <stdio.h>
#include <stdlib.h>
-#include <err.h>
-#include <atf-c.h>
-#ifdef __FreeBSD__
-#include <sys/resource.h>
-#endif
+#include <string.h>
#ifndef REGEX_MAXSIZE
#define REGEX_MAXSIZE 9999
@@ -179,25 +177,17 @@ ATF_TC_HEAD(regcomp_too_big, tc)
" crash, but return a proper error code");
// libtre needs it.
atf_tc_set_md_var(tc, "timeout", "600");
-#ifdef __FreeBSD__
atf_tc_set_md_var(tc, "require.memory", "64M");
-#else
- atf_tc_set_md_var(tc, "require.memory", "120M");
-#endif
}
ATF_TC_BODY(regcomp_too_big, tc)
{
regex_t re;
-#ifdef __FreeBSD__
struct rlimit limit;
-#endif
int e;
-#ifdef __FreeBSD__
limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024;
ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1);
-#endif
for (size_t i = 0; i < __arraycount(tests); i++) {
char *d = (*tests[i].pattern)(REGEX_MAXSIZE);
e = regcomp(&re, d, tests[i].type);
diff --git a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
index 0ca44b4..dd5b818 100644
--- a/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
+++ b/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_regex_att.c,v 1.1 2012/08/24 20:24:40 jmmv Exp $ */
+/* $NetBSD: t_regex_att.c,v 1.3 2017/01/14 20:59:23 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,20 +37,18 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_regex_att.c,v 1.1 2012/08/24 20:24:40 jmmv Exp $");
+__RCSID("$NetBSD: t_regex_att.c,v 1.3 2017/01/14 20:59:23 christos Exp $");
#include <sys/param.h>
-#include <stdio.h>
+#include <atf-c.h>
+#include <ctype.h>
#include <regex.h>
-#include <string.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <util.h>
#include <vis.h>
-#include <ctype.h>
-#include <atf-c.h>
-#ifdef __FreeBSD__
-#include <libutil.h>
-#endif
static const char sep[] = "\r\n\t";
static const char delim[3] = "\\\\\0";
@@ -377,11 +375,7 @@ checkmatches(const char *matches, size_t nm, const regmatch_t *pm,
" cur=%d, max=%zu", res, l, len - off);
off += l;
}
-#ifdef __FreeBSD__
ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno);
-#else
- ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno);
-#endif
free(res);
}
@@ -580,9 +574,6 @@ ATF_TC_BODY(leftassoc, tc)
* any explation. Mark as broken here, but I don't know why. */
atf_tc_expect_fail("Reason for breakage unknown");
#endif
-#ifdef __FreeBSD__
- atf_tc_expect_fail("The expected and matched groups are mismatched on FreeBSD");
-#endif
att_test(tc, "leftassoc");
}
diff --git a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
index bce3633..e5d4321 100644
--- a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
+++ b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
@@ -24,13 +24,6 @@ __RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $");
return ev; \
} while(/*CONSTCOND*/0)
-#ifdef __FreeBSD__
-#define SKIPXI(ev, msg, ...) do { \
- atf_tc_skip(msg, __VA_ARGS__); \
- return ev; \
-} while(/*CONSTCOND*/0)
-#endif
-
#else
#define ERRX(ev, msg, ...) errx(EXIT_FAILURE, msg, __VA_ARGS__)
#define SKIPX(ev, msg, ...) errx(EXIT_FAILURE, msg, __VA_ARGS__)
@@ -196,7 +189,7 @@ regtest(const char *hostname, const char *transp, const char *arg, int p)
#endif
if (!svc_create(server, PROGNUM, VERSNUM, transp))
{
- SKIPXI(EXIT_FAILURE, "Cannot create server %d", num);
+ SKIPX(EXIT_FAILURE, "Cannot create server %d", num);
}
switch ((pid = fork())) {
diff --git a/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c b/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c
index 34fd5cc..1f0f1ed 100644
--- a/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c
+++ b/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setjmp.c,v 1.1 2010/12/27 19:35:31 pgoyette Exp $ */
+/* $NetBSD: t_setjmp.c,v 1.2 2017/01/14 21:08:17 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_setjmp.c,v 1.1 2010/12/27 19:35:31 pgoyette Exp $");
+__RCSID("$NetBSD: t_setjmp.c,v 1.2 2017/01/14 21:08:17 christos Exp $");
#include <sys/types.h>
diff --git a/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c b/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c
index 2014470..44d7555 100644
--- a/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c
+++ b/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_threadjmp.c,v 1.1 2011/04/21 18:58:20 martin Exp $ */
+/* $NetBSD: t_threadjmp.c,v 1.2 2017/01/14 21:08:17 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_threadjmp.c,v 1.1 2011/04/21 18:58:20 martin Exp $");
+__RCSID("$NetBSD: t_threadjmp.c,v 1.2 2017/01/14 21:08:17 christos Exp $");
#include <sys/types.h>
diff --git a/contrib/netbsd-tests/lib/libc/ssp/h_memset.c b/contrib/netbsd-tests/lib/libc/ssp/h_memset.c
index c5ab607..f1acbbd 100644
--- a/contrib/netbsd-tests/lib/libc/ssp/h_memset.c
+++ b/contrib/netbsd-tests/lib/libc/ssp/h_memset.c
@@ -1,4 +1,4 @@
-/* $NetBSD: h_memset.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $ */
+/* $NetBSD: h_memset.c,v 1.2 2017/01/16 16:34:24 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: h_memset.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $");
+__RCSID("$NetBSD: h_memset.c,v 1.2 2017/01/16 16:34:24 christos Exp $");
#include <stdio.h>
#include <string.h>
@@ -41,9 +41,5 @@ main(int argc, char *argv[])
char b[10];
size_t len = atoi(argv[1]);
(void)memset(b, 0, len);
-#ifdef __FreeBSD__
return b[0]; /* keeps optimizer from zapping the call to memset() */
-#else
- return 0;
-#endif
}
diff --git a/contrib/netbsd-tests/lib/libc/ssp/h_read.c b/contrib/netbsd-tests/lib/libc/ssp/h_read.c
index c25cfeb..046ac62 100644
--- a/contrib/netbsd-tests/lib/libc/ssp/h_read.c
+++ b/contrib/netbsd-tests/lib/libc/ssp/h_read.c
@@ -1,4 +1,4 @@
-/* $NetBSD: h_read.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $ */
+/* $NetBSD: h_read.c,v 1.2 2017/01/16 16:35:57 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,17 +29,15 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: h_read.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $");
+__RCSID("$NetBSD: h_read.c,v 1.2 2017/01/16 16:35:57 christos Exp $");
#include <sys/param.h>
+#include <fcntl.h>
+#include <paths.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
-#ifdef __FreeBSD__
-#include <fcntl.h>
-#include <paths.h>
-
int
main(int argc, char *argv[])
{
@@ -54,14 +52,3 @@ main(int argc, char *argv[])
(void)printf("%s\n", b);
return (0);
}
-#else
-int
-main(int argc, char *argv[])
-{
- char b[MAXPATHLEN];
- size_t len = atoi(argv[1]);
-
- (void)printf("%s\n", b);
- return 0;
-}
-#endif
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
index ec2b9bb..d53d2d9 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt.c
@@ -35,6 +35,10 @@
#include <unistd.h>
#include <err.h>
#ifdef __FreeBSD__
+/*
+ * Needed to avoid libutil.h pollution in stdio.h, which causes grief with
+ * with hexdump(3) in lib/libc/db/h_hash.c
+ */
#include <libutil.h>
#endif
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
index 2293e2c..c7cd83e 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
@@ -37,6 +37,10 @@
#include <stdlib.h>
#include <unistd.h>
#ifdef __FreeBSD__
+/*
+ * Needed to avoid libutil.h pollution in stdio.h, which causes grief with
+ * with hexdump(3) in lib/libc/db/h_hash.c
+ */
#include <libutil.h>
#endif
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c b/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
index a0e77d3..5a13250 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
@@ -75,7 +75,6 @@ __RCSID("$NetBSD: t_hsearch.c,v 1.4 2014/07/20 20:17:21 christos Exp $");
#define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno))
-#ifdef __NetBSD__
ATF_TC(hsearch_basic);
ATF_TC_HEAD(hsearch_basic, tc)
{
@@ -122,9 +121,12 @@ ATF_TC_BODY(hsearch_basic, tc)
ATF_REQUIRE_EQ((intptr_t)ep->data, i);
}
+#ifdef __NetBSD__
hdestroy1(free, NULL);
-}
+#else
+ hdestroy();
#endif
+}
ATF_TC(hsearch_duplicate);
ATF_TC_HEAD(hsearch_duplicate, tc)
@@ -232,7 +234,6 @@ ATF_TC_BODY(hsearch_two, tc)
}
#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
-#ifdef __NetBSD__
ATF_TC(hsearch_r_basic);
ATF_TC_HEAD(hsearch_r_basic, tc)
{
@@ -278,10 +279,15 @@ ATF_TC_BODY(hsearch_r_basic, tc)
ATF_REQUIRE_EQ((intptr_t)ep->data, i);
}
+#ifdef __NetBSD__
hdestroy1_r(&t, free, NULL);
+#else
+ hdestroy_r(&t);
+#endif
}
#endif
+#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
ATF_TC(hsearch_r_duplicate);
ATF_TC_HEAD(hsearch_r_duplicate, tc)
{
@@ -332,6 +338,9 @@ ATF_TC_BODY(hsearch_r_nonexistent, tc)
REQUIRE_ERRNO(hcreate_r(16, &t));
+#ifdef __FreeBSD__
+ atf_tc_expect_fail("behavior doesn't match docs; see bug # 216872");
+#endif
e.key = __UNCONST("A");
ATF_REQUIRE(hsearch_r(e, FIND, &ep, &t) == 1);
ATF_REQUIRE_EQ(ep, NULL);
@@ -391,17 +400,13 @@ ATF_TC_BODY(hsearch_r_two, tc)
ATF_TP_ADD_TCS(tp)
{
-#ifdef __NetBSD__
ATF_TP_ADD_TC(tp, hsearch_basic);
-#endif
ATF_TP_ADD_TC(tp, hsearch_duplicate);
ATF_TP_ADD_TC(tp, hsearch_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_two);
-
+
#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
-#ifdef __NetBSD__
ATF_TP_ADD_TC(tp, hsearch_r_basic);
-#endif
ATF_TP_ADD_TC(tp, hsearch_r_duplicate);
ATF_TP_ADD_TC(tp, hsearch_r_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_r_two);
diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c b/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
index 06f2de0..4835e5d 100644
--- a/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
+++ b/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
@@ -218,9 +218,7 @@ ATF_TC_BODY(strtold_nan, tc)
volatile long double ld = strtold(nan_string, &end);
ATF_REQUIRE(isnan(ld) != 0);
-#ifdef __FreeBSD__
- ATF_REQUIRE(strcmp(end, "y") == 0);
-#else
+#ifndef __FreeBSD__
ATF_REQUIRE(__isnanl(ld) != 0);
#endif
ATF_REQUIRE(strcmp(end, "y") == 0);
diff --git a/contrib/netbsd-tests/lib/libc/string/t_strlen.c b/contrib/netbsd-tests/lib/libc/string/t_strlen.c
index 7483dc6..9899e6d 100644
--- a/contrib/netbsd-tests/lib/libc/string/t_strlen.c
+++ b/contrib/netbsd-tests/lib/libc/string/t_strlen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strlen.c,v 1.5 2011/07/14 07:33:20 jruoho Exp $ */
+/* $NetBSD: t_strlen.c,v 1.6 2017/01/14 20:49:24 christos Exp $ */
/*
* Written by J.T. Conklin <jtc@acorntoolworks.com>
@@ -40,9 +40,7 @@ ATF_TC_HEAD(strlen_basic, tc)
ATF_TC_BODY(strlen_basic, tc)
{
-#ifdef __FreeBSD__
void *dl_handle;
-#endif
/* try to trick the compiler */
size_t (*strlen_fn)(const char *);
@@ -110,12 +108,8 @@ ATF_TC_BODY(strlen_basic, tc)
* During testing it is useful have the rest of the program
* use a known good version!
*/
-#ifdef __FreeBSD__
dl_handle = dlopen(NULL, RTLD_LAZY);
strlen_fn = dlsym(dl_handle, "test_strlen");
-#else
- strlen_fn = dlsym(dlopen(NULL, RTLD_LAZY), "test_strlen");
-#endif
if (!strlen_fn)
strlen_fn = strlen;
@@ -142,9 +136,7 @@ ATF_TC_BODY(strlen_basic, tc)
}
}
}
-#ifdef __FreeBSD__
(void)dlclose(dl_handle);
-#endif
}
ATF_TC(strlen_huge);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c b/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c
index 229c343..a319b09 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_clock_gettime.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_clock_gettime.c,v 1.1 2011/10/15 06:42:16 jruoho Exp $ */
+/* $NetBSD: t_clock_gettime.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,30 +58,23 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_clock_gettime.c,v 1.1 2011/10/15 06:42:16 jruoho Exp $");
+__RCSID("$NetBSD: t_clock_gettime.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
-#ifdef __NetBSD__
-#include <machine/int_limits.h>
-#endif
#include <atf-c.h>
#include <errno.h>
+#include <limits.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
-#ifdef __NetBSD__
-#include "../../../h_macros.h"
-#else
-#include <limits.h>
-#include <stdint.h>
#include "h_macros.h"
-#endif
#define MINPOSDIFF 15000000 /* 15 ms for now */
#define TIMEOUT 5
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_connect.c b/contrib/netbsd-tests/lib/libc/sys/t_connect.c
index 672a022..a920d3d 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_connect.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_connect.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_connect.c,v 1.2 2015/04/05 23:17:41 rtr Exp $ */
+/* $NetBSD: t_connect.c,v 1.3 2017/01/13 20:09:48 christos Exp $ */
/*
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -26,6 +26,7 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/socket.h>
#include <err.h>
#include <errno.h>
#include <string.h>
@@ -36,10 +37,6 @@
#include <atf-c.h>
-#ifdef __FreeBSD__
-#include <sys/socket.h>
-#endif
-
ATF_TC(connect_low_port);
ATF_TC_HEAD(connect_low_port, tc)
{
@@ -56,10 +53,8 @@ ATF_TC_BODY(connect_low_port, tc)
slist = socket(AF_INET, SOCK_STREAM, 0);
sd = socket(AF_INET, SOCK_STREAM, 0);
-#ifdef __FreeBSD__
ATF_REQUIRE(sd > 0);
ATF_REQUIRE(slist > 0);
-#endif
/* bind listening socket */
memset(&sinlist, 0, sizeof(sinlist));
@@ -97,9 +92,7 @@ ATF_TC_BODY(connect_low_port, tc)
ATF_REQUIRE(ntohs(sin.sin_port) <= IPPORT_RESERVEDMAX);
close(sd);
-#ifdef __FreeBSD__
close(slist);
-#endif
}
ATF_TC(connect_foreign_family);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_dup.c b/contrib/netbsd-tests/lib/libc/sys/t_dup.c
index d8125ab..b1924e4 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_dup.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_dup.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dup.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $ */
+/* $NetBSD: t_dup.c,v 1.9 2017/01/13 20:31:53 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_dup.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $");
+__RCSID("$NetBSD: t_dup.c,v 1.9 2017/01/13 20:31:53 christos Exp $");
#include <sys/resource.h>
#include <sys/stat.h>
@@ -39,16 +39,13 @@ __RCSID("$NetBSD: t_dup.c,v 1.8 2012/03/18 07:00:51 jruoho Exp $");
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sysexits.h>
-#ifdef __FreeBSD__
-#include <stdbool.h>
-#endif
-
static char path[] = "dup";
#ifdef __NetBSD__
static void check_mode(bool, bool, bool);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c b/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c
index 20a9e42..102c79f 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c
@@ -51,10 +51,16 @@ run(int n, ...)
ATF_REQUIRE_EQ(n, DEPTH - calls - 1);
va_start(va, n);
-#if defined(__FreeBSD__) && defined(__amd64__)
+#ifdef __FreeBSD__
+#if defined(__amd64__)
for (i = 0; i < 5; i++) {
-#elif defined(__FreeBSD__) && defined(__aarch64__)
+#elif defined(__aarch64__)
for (i = 0; i < 7; i++) {
+#elif defined(__mips__)
+ for (i = 0; i < 5; i++) {
+#else
+ for (i = 0; i < 9; i++) {
+#endif
#else
for (i = 0; i < 9; i++) {
#endif
@@ -114,14 +120,23 @@ ATF_TC_BODY(setcontext_link, tc)
uc[i].uc_stack.ss_size = STACKSZ;
uc[i].uc_link = (i > 0) ? &uc[i - 1] : &save;
-#if defined(__FreeBSD__) && defined(__amd64__)
+#ifdef __FreeBSD__
+#if defined(__amd64__)
/* FreeBSD/amd64 only permits up to 6 arguments. */
makecontext(&uc[i], (void *)run, 6, i,
0, 1, 2, 3, 4);
-#elif defined(__FreeBSD__) && defined(__aarch64__)
+#elif defined(__aarch64__)
/* FreeBSD/arm64 only permits up to 8 arguments. */
makecontext(&uc[i], (void *)run, 8, i,
0, 1, 2, 3, 4, 5, 6);
+#elif defined(__mips__)
+ /* FreeBSD/mips only permits up to 6 arguments. */
+ makecontext(&uc[i], (void *)run, 6, i,
+ 0, 1, 2, 3, 4);
+#else
+ makecontext(&uc[i], (void *)run, 10, i,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8);
+#endif
#else
makecontext(&uc[i], (void *)run, 10, i,
0, 1, 2, 3, 4, 5, 6, 7, 8);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c b/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c
index f4ee96b..273fd83 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_getrusage.c,v 1.4 2016/08/05 15:01:39 scole Exp $ */
+/* $NetBSD: t_getrusage.c,v 1.5 2017/01/13 20:31:06 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getrusage.c,v 1.4 2016/08/05 15:01:39 scole Exp $");
+__RCSID("$NetBSD: t_getrusage.c,v 1.5 2017/01/13 20:31:06 christos Exp $");
#include <sys/resource.h>
#include <sys/time.h>
@@ -47,11 +47,7 @@ static void sighandler(int);
static const size_t maxiter = 2000;
static void
-#ifdef __FreeBSD__
sighandler(int signo __unused)
-#else
-sighandler(int signo)
-#endif
{
/* Nothing. */
}
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_kevent.c b/contrib/netbsd-tests/lib/libc/sys/t_kevent.c
index 8a20d63..5bddea5 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_kevent.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_kevent.c
@@ -45,16 +45,14 @@ __RCSID("$NetBSD: t_kevent.c,v 1.7 2015/02/05 13:55:37 isaki Exp $");
#include <err.h>
#ifdef __NetBSD__
#include <sys/drvctlio.h>
+#else
+#define DRVCTLDEV "/nonexistent"
#endif
#include <sys/event.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/wait.h>
-#ifdef __FreeBSD__
-#define DRVCTLDEV "/nonexistent"
-#endif
-
ATF_TC(kevent_zerotimer);
ATF_TC_HEAD(kevent_zerotimer, tc)
{
@@ -117,15 +115,9 @@ ATF_TC_BODY(kqueue_desc_passing, tc)
if (recvmsg(s[1], &m, 0) == -1)
err(1, "child: could not recvmsg");
-#ifdef __FreeBSD__
- bcopy(CMSG_DATA(msg), &kq, sizeof(kq));
- printf("child (pid %d): received kq fd %d\n", getpid(), kq);
- _exit(0);
-#else
kq = *(int *)CMSG_DATA(msg);
printf("child (pid %d): received kq fd %d\n", getpid(), kq);
exit(0);
-#endif
}
close(s[1]);
@@ -133,17 +125,14 @@ ATF_TC_BODY(kqueue_desc_passing, tc)
iov.iov_base = &storage;
iov.iov_len = sizeof(int);
+#ifdef __FreeBSD__
+ msg = CMSG_FIRSTHDR(&m);
+#endif
msg->cmsg_level = SOL_SOCKET;
msg->cmsg_type = SCM_RIGHTS;
msg->cmsg_len = CMSG_LEN(sizeof(int));
-#ifdef __FreeBSD__
- /*
- * What is should have been
- * bcopy(&s[0], CMSG_DATA(msg), sizeof(kq));
- */
- bcopy(&kq, CMSG_DATA(msg), sizeof(kq));
-#else
+#ifdef __NetBSD__
*(int *)CMSG_DATA(msg) = kq;
#endif
@@ -152,14 +141,8 @@ ATF_TC_BODY(kqueue_desc_passing, tc)
printf("parent (pid %d): sending kq fd %d\n", getpid(), kq);
if (sendmsg(s[0], &m, 0) == -1) {
-#ifdef __NetBSD__
ATF_REQUIRE_EQ_MSG(errno, EBADF, "errno is %d", errno);
atf_tc_skip("PR kern/46523");
-#endif
-#ifdef __FreeBSD__
- ATF_REQUIRE_EQ_MSG(errno, EOPNOTSUPP, "errno is %d", errno);
- close(s[0]);
-#endif
}
close(kq);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_link.c b/contrib/netbsd-tests/lib/libc/sys/t_link.c
index b8dcacc..a6d894c 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_link.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_link.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_link.c,v 1.2 2014/04/21 14:39:36 martin Exp $ */
+/* $NetBSD: t_link.c,v 1.3 2017/01/13 20:42:36 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_link.c,v 1.2 2014/04/21 14:39:36 martin Exp $");
+__RCSID("$NetBSD: t_link.c,v 1.3 2017/01/13 20:42:36 christos Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -37,14 +37,11 @@ __RCSID("$NetBSD: t_link.c,v 1.2 2014/04/21 14:39:36 martin Exp $");
#include <atf-c.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
-
static const char *getpath(void);
static char path[] = "link";
static const char *pathl;
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_listen.c b/contrib/netbsd-tests/lib/libc/sys/t_listen.c
index a9ee733..9f3f9b8 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_listen.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_listen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_listen.c,v 1.4 2012/03/18 07:00:52 jruoho Exp $ */
+/* $NetBSD: t_listen.c,v 1.5 2017/01/13 20:41:50 christos Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -26,6 +26,7 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/socket.h>
#include <atf-c.h>
#include <err.h>
#include <errno.h>
@@ -36,10 +37,6 @@
#include <arpa/inet.h>
#include <netinet/in.h>
-#ifdef __FreeBSD__
-#include <sys/socket.h>
-#endif
-
static const char *path = "listen";
ATF_TC_WITH_CLEANUP(listen_err);
@@ -110,9 +107,7 @@ ATF_TC_BODY(listen_low_port, tc)
int sd, val;
sd = socket(AF_INET, SOCK_STREAM, 0);
-#ifdef __FreeBSD__
ATF_REQUIRE_MSG(sd != -1, "socket failed: %s", strerror(errno));
-#endif
val = IP_PORTRANGE_LOW;
if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE, &val,
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mincore.c b/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
index ab8c33f..da6cafe 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_mincore.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */
+/* $NetBSD: t_mincore.c,v 1.10 2017/01/14 20:51:13 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $");
+__RCSID("$NetBSD: t_mincore.c,v 1.10 2017/01/14 20:51:13 christos Exp $");
#include <sys/mman.h>
#include <sys/stat.h>
@@ -141,9 +141,7 @@ ATF_TC_WITH_CLEANUP(mincore_resid);
ATF_TC_HEAD(mincore_resid, tc)
{
atf_tc_set_md_var(tc, "descr", "Test page residency with mincore(2)");
-#ifdef __FreeBSD__
atf_tc_set_md_var(tc, "require.user", "root");
-#endif
}
ATF_TC_BODY(mincore_resid, tc)
@@ -155,13 +153,11 @@ ATF_TC_BODY(mincore_resid, tc)
struct rlimit rlim;
ATF_REQUIRE(getrlimit(RLIMIT_MEMLOCK, &rlim) == 0);
-#ifdef __FreeBSD__
/*
* Bump the mlock limit to unlimited so the rest of the testcase
* passes instead of failing on the mlock call.
*/
rlim.rlim_max = RLIM_INFINITY;
-#endif
rlim.rlim_cur = rlim.rlim_max;
ATF_REQUIRE(setrlimit(RLIMIT_MEMLOCK, &rlim) == 0);
@@ -276,9 +272,7 @@ ATF_TC_BODY(mincore_resid, tc)
(void)munmap(addr2, npgs * page);
(void)munmap(addr3, npgs * page);
(void)unlink(path);
-#ifdef __FreeBSD__
free(buf);
-#endif
}
ATF_TC_CLEANUP(mincore_resid, tc)
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
index 75048b3..cd9ad55 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_mlock.c
@@ -32,7 +32,7 @@
__RCSID("$NetBSD: t_mlock.c,v 1.6 2016/08/09 12:02:44 kre Exp $");
#ifdef __FreeBSD__
-#include <sys/types.h>
+#include <sys/param.h> /* NetBSD requires sys/param.h for sysctl(3), unlike FreeBSD */
#endif
#include <sys/mman.h>
#include <sys/resource.h>
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mmap.c b/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
index b35b2ae..8839aea 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_mmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */
+/* $NetBSD: t_mmap.c,v 1.12 2017/01/16 16:31:05 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -55,9 +55,10 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $");
+__RCSID("$NetBSD: t_mmap.c,v 1.12 2017/01/16 16:31:05 christos Exp $");
#include <sys/param.h>
+#include <sys/disklabel.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -73,12 +74,7 @@ __RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $");
#include <string.h>
#include <unistd.h>
#include <paths.h>
-#ifdef __NetBSD__
-#include <machine/disklabel.h>
-#endif
-
#ifdef __FreeBSD__
-#include <sys/disklabel.h>
#include <stdint.h>
#endif
@@ -453,6 +449,7 @@ ATF_TC_BODY(mmap_truncate, tc)
ATF_REQUIRE(ftruncate(fd, page / 12) == 0);
ATF_REQUIRE(ftruncate(fd, page / 64) == 0);
+ (void)munmap(map, page);
ATF_REQUIRE(close(fd) == 0);
}
@@ -509,6 +506,8 @@ ATF_TC_BODY(mmap_truncate_signal, tc)
prevent the access to be optimized out */
ATF_REQUIRE(i == 0);
ATF_REQUIRE(sta == 0);
+ (void)munmap(map, page);
+ (void)close(fd);
return;
}
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c b/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c
index b9b3067..9f99980 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_msgctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_msgctl.c,v 1.4 2014/02/27 00:59:50 joerg Exp $ */
+/* $NetBSD: t_msgctl.c,v 1.5 2017/01/13 20:44:45 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgctl.c,v 1.4 2014/02/27 00:59:50 joerg Exp $");
+__RCSID("$NetBSD: t_msgctl.c,v 1.5 2017/01/13 20:44:45 christos Exp $");
#include <sys/msg.h>
#include <sys/stat.h>
@@ -38,6 +38,7 @@ __RCSID("$NetBSD: t_msgctl.c,v 1.4 2014/02/27 00:59:50 joerg Exp $");
#include <atf-c.h>
#include <errno.h>
+#include <limits.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -46,10 +47,6 @@ __RCSID("$NetBSD: t_msgctl.c,v 1.4 2014/02/27 00:59:50 joerg Exp $");
#include <time.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
-
#define MSG_KEY 12345689
#define MSG_MTYPE_1 0x41
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c b/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c
index 70f8906..522ceb8 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_msgrcv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_msgrcv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $ */
+/* $NetBSD: t_msgrcv.c,v 1.4 2017/01/13 20:44:45 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgrcv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $");
+__RCSID("$NetBSD: t_msgrcv.c,v 1.4 2017/01/13 20:44:45 christos Exp $");
#include <sys/msg.h>
#include <sys/stat.h>
@@ -38,6 +38,7 @@ __RCSID("$NetBSD: t_msgrcv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $");
#include <atf-c.h>
#include <errno.h>
+#include <limits.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
@@ -47,10 +48,6 @@ __RCSID("$NetBSD: t_msgrcv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $");
#include <time.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
-
#define MSG_KEY 1234
#define MSG_MTYPE_1 0x41
#define MSG_MTYPE_2 0x42
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c b/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
index d30cb7b..5988821 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_msgsnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_msgsnd.c,v 1.2 2011/11/05 08:47:54 jruoho Exp $ */
+/* $NetBSD: t_msgsnd.c,v 1.3 2017/01/13 20:44:45 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msgsnd.c,v 1.2 2011/11/05 08:47:54 jruoho Exp $");
+__RCSID("$NetBSD: t_msgsnd.c,v 1.3 2017/01/13 20:44:45 christos Exp $");
#include <sys/msg.h>
#include <sys/stat.h>
@@ -38,6 +38,7 @@ __RCSID("$NetBSD: t_msgsnd.c,v 1.2 2011/11/05 08:47:54 jruoho Exp $");
#include <atf-c.h>
#include <errno.h>
+#include <limits.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
@@ -47,10 +48,6 @@ __RCSID("$NetBSD: t_msgsnd.c,v 1.2 2011/11/05 08:47:54 jruoho Exp $");
#include <time.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
-
#define MSG_KEY 1234
#define MSG_MTYPE_1 0x41
#define MSG_MTYPE_2 0x42
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_msync.c b/contrib/netbsd-tests/lib/libc/sys/t_msync.c
index 70d0ccf..d1fdbe0 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_msync.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_msync.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_msync.c,v 1.2 2012/03/16 06:15:17 matt Exp $ */
+/* $NetBSD: t_msync.c,v 1.3 2017/01/14 20:52:42 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msync.c,v 1.2 2012/03/16 06:15:17 matt Exp $");
+__RCSID("$NetBSD: t_msync.c,v 1.3 2017/01/14 20:52:42 christos Exp $");
#include <sys/mman.h>
@@ -52,8 +52,7 @@ msync_sync(const char *garbage, int flags)
{
char *buf, *map = MAP_FAILED;
const char *str = NULL;
- size_t i, len;
- ssize_t tot;
+ size_t len;
int fd, rv;
/*
@@ -65,29 +64,17 @@ msync_sync(const char *garbage, int flags)
if (buf == NULL)
return NULL;
- for (i = 0; i < (size_t)page; i++)
- buf[i] = 'x';
+ memset(buf, 'x', page);
fd = open(path, O_RDWR | O_CREAT, 0700);
if (fd < 0) {
- str = "failed to open";
- goto out;
+ free(buf);
+ return "failed to open";
}
- tot = 0;
-
- while (tot < page) {
-
- rv = write(fd, buf, sizeof(buf));
-
- if (rv < 0) {
- str = "failed to write";
- goto out;
- }
-
- tot += rv;
- }
+ ATF_REQUIRE_MSG(write(fd, buf, page) != -1, "write(2) failed: %s",
+ strerror(errno));
map = mmap(NULL, page, PROT_READ | PROT_WRITE, MAP_FILE|MAP_PRIVATE,
fd, 0);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c b/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c
index b4d9f8a..1ad6661 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_nanosleep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_nanosleep.c,v 1.3 2013/03/31 16:47:16 christos Exp $ */
+/* $NetBSD: t_nanosleep.c,v 1.4 2017/01/13 21:15:14 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_nanosleep.c,v 1.3 2013/03/31 16:47:16 christos Exp $");
+__RCSID("$NetBSD: t_nanosleep.c,v 1.4 2017/01/13 21:15:14 christos Exp $");
#include <sys/time.h>
#include <sys/wait.h>
@@ -45,11 +45,7 @@ __RCSID("$NetBSD: t_nanosleep.c,v 1.3 2013/03/31 16:47:16 christos Exp $");
#include <unistd.h>
static void
-#ifdef __FreeBSD__
handler(int signo __unused)
-#else
-handler(int signo)
-#endif
{
/* Nothing. */
}
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_pipe.c b/contrib/netbsd-tests/lib/libc/sys/t_pipe.c
index 32beecc..df8f1ed 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_pipe.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_pipe.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pipe.c,v 1.3 2011/10/31 15:41:31 christos Exp $ */
+/* $NetBSD: t_pipe.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_pipe.c,v 1.3 2011/10/31 15:41:31 christos Exp $");
+__RCSID("$NetBSD: t_pipe.c,v 1.5 2017/01/13 21:30:41 christos Exp $");
#include <sys/types.h>
#include <sys/wait.h>
@@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_pipe.c,v 1.3 2011/10/31 15:41:31 christos Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
static pid_t pid;
static int nsiginfo = 0;
@@ -153,9 +153,7 @@ ATF_TC_BODY(pipe_restart, tc)
ATF_REQUIRE_EQ(WEXITSTATUS(st), 0);
}
-#ifdef __FreeBSD__
free(f);
-#endif
}
ATF_TP_ADD_TCS(tp)
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c b/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c
index 8208cf7..48f9734 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pipe2.c,v 1.8 2012/05/16 13:54:28 jruoho Exp $ */
+/* $NetBSD: t_pipe2.c,v 1.9 2017/01/13 21:19:45 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_pipe2.c,v 1.8 2012/05/16 13:54:28 jruoho Exp $");
+__RCSID("$NetBSD: t_pipe2.c,v 1.9 2017/01/13 21:19:45 christos Exp $");
#include <atf-c.h>
#include <fcntl.h>
@@ -56,7 +56,8 @@ run(int flags)
#ifdef __FreeBSD__
closefrom(3);
#else
- ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+ ATF_REQUIRE_MSG(closefrom(3) != -1, "closefrom failed: %s",
+ strerror(errno));
#endif
ATF_REQUIRE(pipe2(fd, flags) == 0);
@@ -116,13 +117,13 @@ ATF_TC_BODY(pipe2_consume, tc)
{
struct rlimit rl;
int err, filedes[2];
-#ifdef __FreeBSD__
int old;
+#ifdef __FreeBSD__
closefrom(4);
#else
- err = fcntl(4, F_CLOSEM);
- ATF_REQUIRE(err == 0);
+ ATF_REQUIRE_MSG(closefrom(4) != -1, "closefrom failed: %s",
+ strerror(errno));
#endif
err = getrlimit(RLIMIT_NOFILE, &rl);
@@ -132,19 +133,15 @@ ATF_TC_BODY(pipe2_consume, tc)
* file descriptor limit in the middle of a pipe2() call - i.e.
* before the call only a single descriptor may be openend.
*/
-#ifdef __FreeBSD__
old = rl.rlim_cur;
-#endif
rl.rlim_cur = 4;
err = setrlimit(RLIMIT_NOFILE, &rl);
ATF_REQUIRE(err == 0);
err = pipe2(filedes, O_CLOEXEC);
ATF_REQUIRE(err == -1);
-#ifdef __FreeBSD__
rl.rlim_cur = old;
err = setrlimit(RLIMIT_NOFILE, &rl);
-#endif
}
ATF_TC(pipe2_nonblock);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c b/contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c
index da4e746..813bfb8 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_posix_fadvise.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_posix_fadvise.c,v 1.1 2011/10/15 06:10:26 jruoho Exp $ */
+/* $NetBSD: t_posix_fadvise.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_posix_fadvise.c,v 1.1 2011/10/15 06:10:26 jruoho Exp $");
+__RCSID("$NetBSD: t_posix_fadvise.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
#include <sys/fcntl.h>
@@ -68,7 +68,7 @@ __RCSID("$NetBSD: t_posix_fadvise.c,v 1.1 2011/10/15 06:10:26 jruoho Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_revoke.c b/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
index 8e4c2a3..ec225b9 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_revoke.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_revoke.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $ */
+/* $NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_revoke.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $");
+__RCSID("$NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $");
#include <sys/resource.h>
#include <sys/wait.h>
@@ -176,9 +176,7 @@ ATF_TC_BODY(revoke_perm, tc)
if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS)
atf_tc_fail("revoke(2) did not obey permissions");
-#ifdef __FreeBSD__
(void)close(fd);
-#endif
ATF_REQUIRE(unlink(path) == 0);
}
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_select.c b/contrib/netbsd-tests/lib/libc/sys/t_select.c
index 437b67b..04a684a 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_select.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_select.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_select.c,v 1.3 2012/03/18 07:00:52 jruoho Exp $ */
+/* $NetBSD: t_select.c,v 1.4 2017/01/13 21:18:33 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -47,21 +47,13 @@
static sig_atomic_t keep_going = 1;
static void
-#ifdef __FreeBSD__
sig_handler(int signum __unused)
-#else
-sig_handler(int signum)
-#endif
{
keep_going = 0;
}
static void
-#ifdef __FreeBSD__
sigchld(int signum __unused)
-#else
-sigchld(int signum)
-#endif
{
}
@@ -90,7 +82,7 @@ prmask(const sigset_t *m, char *buf, size_t len)
return buf;
}
-static void
+static __dead void
child(const struct timespec *ts)
{
struct sigaction sa;
@@ -135,9 +127,7 @@ child(const struct timespec *ts)
"after timeout %s != %s",
prmask(&nset, nbuf, sizeof(nbuf)),
prmask(&oset, obuf, sizeof(obuf)));
-#ifdef __FreeBSD__
_exit(0);
-#endif
}
ATF_TC(pselect_sigmask);
@@ -157,9 +147,7 @@ ATF_TC_BODY(pselect_sigmask, tc)
switch (pid = fork()) {
case 0:
child(NULL);
-#ifdef __FreeBSD__
- break;
-#endif
+ /*NOTREACHED*/
case -1:
err(1, "fork");
default:
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c b/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c
index f1100bf..7bef590 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setrlimit.c,v 1.5 2016/07/13 09:53:16 njoly Exp $ */
+/* $NetBSD: t_setrlimit.c,v 1.6 2017/01/13 21:16:38 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_setrlimit.c,v 1.5 2016/07/13 09:53:16 njoly Exp $");
+__RCSID("$NetBSD: t_setrlimit.c,v 1.6 2017/01/13 21:16:38 christos Exp $");
#include <sys/resource.h>
#include <sys/mman.h>
@@ -124,9 +124,7 @@ out:
if (lim != 0)
atf_tc_fail("failed to set limit (%d)", lim);
-#ifdef __FreeBSD__
free(buf);
-#endif
}
ATF_TC(setrlimit_current);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_sigaction.c b/contrib/netbsd-tests/lib/libc/sys/t_sigaction.c
index 23ca36a..4bbf421 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_sigaction.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_sigaction.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sigaction.c,v 1.3 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_sigaction.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2010\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sigaction.c,v 1.3 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_sigaction.c,v 1.5 2017/01/13 21:30:41 christos Exp $");
#include <sys/wait.h>
@@ -41,20 +41,12 @@ __RCSID("$NetBSD: t_sigaction.c,v 1.3 2014/11/04 00:20:19 justin Exp $");
#include <atf-c.h>
-#ifdef __NetBSD__
-#include "../../../h_macros.h"
-#else
#include "h_macros.h"
-#endif
static bool handler_called = false;
static void
-#ifdef __FreeBSD__
handler(int signo __unused)
-#else
-handler(int signo)
-#endif
{
handler_called = true;
}
@@ -87,11 +79,7 @@ wait_and_check_child(const pid_t pid, const char *fail_message)
}
static void
-#ifdef __FreeBSD__
catch(int sig __unused)
-#else
-catch(int sig)
-#endif
{
return;
}
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c b/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c
index e911d42..af560f8 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_sigqueue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sigqueue.c,v 1.6 2016/08/04 06:43:43 christos Exp $ */
+/* $NetBSD: t_sigqueue.c,v 1.7 2017/01/13 20:44:10 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,31 +30,24 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_sigqueue.c,v 1.6 2016/08/04 06:43:43 christos Exp $");
+__RCSID("$NetBSD: t_sigqueue.c,v 1.7 2017/01/13 20:44:10 christos Exp $");
#include <atf-c.h>
+#include <err.h>
#include <errno.h>
#include <signal.h>
+#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <err.h>
-#include <stdio.h>
-#endif
-
static void handler(int, siginfo_t *, void *);
#define VALUE (int)0xc001dad1
static int value;
static void
-#ifdef __FreeBSD__
-handler(int signo __unused, siginfo_t *info __unused, void *data __unused)
-#else
-handler(int signo, siginfo_t *info, void *data)
-#endif
+handler(int signo __unused, siginfo_t *info, void *data __unused)
{
value = info->si_value.sival_int;
kill(0, SIGINFO);
@@ -123,12 +116,10 @@ static sig_atomic_t count = 0;
static int delivered[CNT];
static void
-myhandler(int signo, siginfo_t *info, void *context)
+myhandler(int signo, siginfo_t *info, void *context __unused)
{
delivered[count++] = signo;
-#ifdef __FreeBSD__
printf("Signal #%zu: signo: %d\n", (size_t)count, signo);
-#endif
}
static int
@@ -213,12 +204,8 @@ ATF_TC_BODY(sigqueue_rt, tc)
sigset_t mask, orig;
sigemptyset(&mask);
for (size_t i = 0; i < CNT; i++)
-#ifdef __FreeBSD__
if (sigaddset(&mask, signals[i]) == -1)
warn("sigaddset");
-#else
- sigaddset(&mask, signals[i]);
-#endif
ATF_REQUIRE(sigprocmask(SIG_BLOCK, &mask, &orig) != -1);
@@ -227,23 +214,16 @@ ATF_TC_BODY(sigqueue_rt, tc)
ATF_REQUIRE(sigprocmask(SIG_UNBLOCK, &mask, &orig) != -1);
sleep(1);
-#ifdef __FreeBSD__
ATF_CHECK_MSG((size_t)count == ndelivered,
"count %zu != ndelivered %zu", (size_t)count, ndelivered);
-#else
- ATF_REQUIRE_MSG((size_t)count == ndelivered,
- "count %zu != ndelivered %zu", (size_t)count, ndelivered);
-#endif
for (size_t i = 0; i < ndelivered; i++)
ATF_REQUIRE_MSG(ordered[i] == delivered[i],
"%zu: ordered %d != delivered %d",
i, ordered[i], delivered[i]);
-#ifdef __FreeBSD__
- if (count > ndelivered)
- for (size_t i = ndelivered; i < count; i++)
+ if ((size_t)count > ndelivered)
+ for (size_t i = ndelivered; i < (size_t)count; i++)
printf("Undelivered signal #%zu: %d\n", i, ordered[i]);
-#endif
for (size_t i = 0; i < ndelivered; i++)
ATF_REQUIRE(sigaction(signals[i], &oact[i], NULL) != -1);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c b/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c
index 9da7861..7a0cc20 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_socketpair.c,v 1.1 2011/11/05 18:19:02 jruoho Exp $ */
+/* $NetBSD: t_socketpair.c,v 1.2 2017/01/13 20:04:52 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_socketpair.c,v 1.1 2011/11/05 18:19:02 jruoho Exp $");
+__RCSID("$NetBSD: t_socketpair.c,v 1.2 2017/01/13 20:04:52 christos Exp $");
#include <atf-c.h>
#include <fcntl.h>
@@ -66,7 +66,7 @@ run(int flags)
#ifdef __FreeBSD__
closefrom(3);
#else
- ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+ ATF_REQUIRE(closefrom(3) != -1);
#endif
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_stat.c b/contrib/netbsd-tests/lib/libc/sys/t_stat.c
index 300c6e8..adb32bb 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_stat.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_stat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_stat.c,v 1.4 2012/03/17 08:37:08 jruoho Exp $ */
+/* $NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,13 +29,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_stat.c,v 1.4 2012/03/17 08:37:08 jruoho Exp $");
+__RCSID("$NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $");
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
#include <atf-c.h>
#include <errno.h>
@@ -47,10 +48,6 @@ __RCSID("$NetBSD: t_stat.c,v 1.4 2012/03/17 08:37:08 jruoho Exp $");
#include <stdio.h>
-#ifdef __FreeBSD__
-#include <netinet/in.h>
-#endif
-
static const char *path = "stat";
ATF_TC_WITH_CLEANUP(stat_chflags);
@@ -396,11 +393,9 @@ ATF_TC_BODY(stat_symlink, tc)
if (sa.st_mode == sb.st_mode)
atf_tc_fail("inconsistencies between stat(2) and lstat(2)");
+ (void)close(fd);
ATF_REQUIRE(unlink(path) == 0);
ATF_REQUIRE(unlink(pathlink) == 0);
-#ifdef __FreeBSD__
- (void)close(fd);
-#endif
}
ATF_TC_CLEANUP(stat_symlink, tc)
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c b/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c
index cc85307..e8a6acd 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_timer_create.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_timer_create.c,v 1.4 2012/03/18 07:00:52 jruoho Exp $ */
+/* $NetBSD: t_timer_create.c,v 1.5 2017/01/16 16:32:13 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -38,11 +38,7 @@ static timer_t t;
static bool fail = true;
static void
-#ifdef __FreeBSD__
timer_signal_handler(int signo, siginfo_t *si, void *osi __unused)
-#else
-timer_signal_handler(int signo, siginfo_t *si, void *osi)
-#endif
{
timer_t *tp;
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_truncate.c b/contrib/netbsd-tests/lib/libc/sys/t_truncate.c
index 59193a9..5b96a20 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_truncate.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_truncate.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_truncate.c,v 1.2 2011/08/18 19:48:03 dholland Exp $ */
+/* $NetBSD: t_truncate.c,v 1.3 2017/01/13 20:03:51 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,21 +29,18 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_truncate.c,v 1.2 2011/08/18 19:48:03 dholland Exp $");
+__RCSID("$NetBSD: t_truncate.c,v 1.3 2017/01/13 20:03:51 christos Exp $");
#include <sys/stat.h>
#include <atf-c.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
-
static const char path[] = "truncate";
static const size_t sizes[] = { 8, 16, 512, 1024, 2048, 4094, 3000, 30 };
@@ -153,9 +150,7 @@ ATF_TC_HEAD(truncate_err, tc)
ATF_TC_BODY(truncate_err, tc)
{
-#ifndef __NetBSD__
char buf[PATH_MAX];
-#endif
errno = 0;
ATF_REQUIRE_ERRNO(EFAULT, truncate((void *)-1, 999) == -1);
@@ -167,13 +162,9 @@ ATF_TC_BODY(truncate_err, tc)
ATF_REQUIRE_ERRNO(ENOENT, truncate("/a/b/c/d/e/f/g", 999) == -1);
errno = 0;
-#ifdef __NetBSD__
- ATF_REQUIRE_ERRNO(EACCES, truncate("/usr/bin/fpr", 999) == -1);
-#else
snprintf(buf, sizeof(buf), "%s/truncate_test.root_owned",
atf_tc_get_config_var(tc, "srcdir"));
ATF_REQUIRE_ERRNO(EACCES, truncate(buf, 999) == -1);
-#endif
}
ATF_TP_ADD_TCS(tp)
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_umask.c b/contrib/netbsd-tests/lib/libc/sys/t_umask.c
index 7a65574..fb3e405b 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_umask.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_umask.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_umask.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $ */
+/* $NetBSD: t_umask.c,v 1.2 2017/01/13 19:34:19 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_umask.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $");
+__RCSID("$NetBSD: t_umask.c,v 1.2 2017/01/13 19:34:19 christos Exp $");
#include <sys/stat.h>
#include <sys/wait.h>
@@ -129,9 +129,7 @@ ATF_TC_BODY(umask_open, tc)
if (fd < 0)
continue;
-#ifdef __FreeBSD__
(void)close(fd);
-#endif
(void)memset(&st, 0, sizeof(struct stat));
if (stat(path, &st) != 0) {
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_unlink.c b/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
index b504bb0..cda9c16 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_unlink.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_unlink.c,v 1.2 2014/04/21 18:05:17 martin Exp $ */
+/* $NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_unlink.c,v 1.2 2014/04/21 18:05:17 martin Exp $");
+__RCSID("$NetBSD: t_unlink.c,v 1.4 2017/01/14 20:55:26 christos Exp $");
#include <sys/stat.h>
@@ -111,15 +111,8 @@ ATF_TC_HEAD(unlink_fifo, tc)
ATF_TC_BODY(unlink_fifo, tc)
{
-#ifdef __FreeBSD__
- int fd;
- ATF_REQUIRE_MSG((fd = mkfifo(path, 0666)) == 0,
- "mkfifo failed: %s", strerror(errno));
- (void)close(fd);
-#else
ATF_REQUIRE(mkfifo(path, 0666) == 0);
-#endif
ATF_REQUIRE(unlink(path) == 0);
errno = 0;
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_wait.c b/contrib/netbsd-tests/lib/libc/sys/t_wait.c
index 8653265..91bbaf1f 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_wait.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_wait.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */
+/* $NetBSD: t_wait.c,v 1.8 2017/01/13 19:28:55 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -29,25 +29,22 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $");
+__RCSID("$NetBSD: t_wait.c,v 1.8 2017/01/13 19:28:55 christos Exp $");
#include <sys/wait.h>
#include <sys/resource.h>
-#include <stdio.h>
#include <errno.h>
+#include <inttypes.h>
#include <limits.h>
#include <pwd.h>
#include <signal.h>
+#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <atf-c.h>
-#ifdef __FreeBSD__
-#define wrusage __wrusage
-#endif
-
ATF_TC(wait6_invalid);
ATF_TC_HEAD(wait6_invalid, tc)
{
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c b/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c
index e5ddcbd..c529f17 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c
@@ -29,9 +29,6 @@
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $");
-#ifdef __FreeBSD__
-#include <sys/param.h> /* For NBBY -- it's in sys/types.h on NetBSD */
-#endif
#include <sys/wait.h>
#include <sys/resource.h>
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_write.c b/contrib/netbsd-tests/lib/libc/sys/t_write.c
index a3783cb..576ce7e 100644
--- a/contrib/netbsd-tests/lib/libc/sys/t_write.c
+++ b/contrib/netbsd-tests/lib/libc/sys/t_write.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_write.c,v 1.2 2011/10/19 16:19:30 jruoho Exp $ */
+/* $NetBSD: t_write.c,v 1.3 2017/01/13 19:27:23 christos Exp $ */
/*-
* Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
@@ -29,37 +29,27 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_write.c,v 1.2 2011/10/19 16:19:30 jruoho Exp $");
+__RCSID("$NetBSD: t_write.c,v 1.3 2017/01/13 19:27:23 christos Exp $");
#include <sys/uio.h>
-#ifdef __NetBSD__
-#include <sys/syslimits.h>
-#endif
#include <atf-c.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <limits.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
-
static void sighandler(int);
static bool fail = false;
static const char *path = "write";
static void
-#ifdef __FreeBSD__
sighandler(int signo __unused)
-#else
-sighandler(int signo)
-#endif
{
fail = false;
}
diff --git a/contrib/netbsd-tests/lib/libm/t_ilogb.c b/contrib/netbsd-tests/lib/libm/t_ilogb.c
index b3c2126..1d35cb6 100644
--- a/contrib/netbsd-tests/lib/libm/t_ilogb.c
+++ b/contrib/netbsd-tests/lib/libm/t_ilogb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ilogb.c,v 1.6 2016/08/26 08:01:55 christos Exp $ */
+/* $NetBSD: t_ilogb.c,v 1.7 2017/01/13 19:23:40 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -28,18 +28,18 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_ilogb.c,v 1.7 2017/01/13 19:23:40 christos Exp $");
-#ifdef __FreeBSD__
-#include <limits.h>
-#endif
#include <atf-c.h>
#include <fenv.h>
+#include <limits.h>
#include <math.h>
#ifndef __HAVE_FENV
-# define ATF_CHECK_RAISED_INVALID
-# define ATF_CHECK_RAISED_NOTHING
+# define ATF_CHECK_RAISED_INVALID
+# define ATF_CHECK_RAISED_NOTHING
#else
# define ATF_CHECK_RAISED_INVALID do { \
diff --git a/contrib/netbsd-tests/lib/libm/t_pow.c b/contrib/netbsd-tests/lib/libm/t_pow.c
index fbdb984..7afee9f 100644
--- a/contrib/netbsd-tests/lib/libm/t_pow.c
+++ b/contrib/netbsd-tests/lib/libm/t_pow.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pow.c,v 1.4 2015/09/08 05:24:27 dholland Exp $ */
+/* $NetBSD: t_pow.c,v 1.5 2017/01/20 21:15:56 maya Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,15 +29,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_pow.c,v 1.4 2015/09/08 05:24:27 dholland Exp $");
+__RCSID("$NetBSD: t_pow.c,v 1.5 2017/01/20 21:15:56 maya Exp $");
#include <atf-c.h>
#include <math.h>
-#ifdef __FreeBSD__
-#define isinff isinf
-#endif
-
/*
* pow(3)
*/
@@ -383,12 +379,12 @@ ATF_TC_BODY(powf_inf_neg_x, tc)
*/
z = powf(x, 3.0);
- if (isinff(z) == 0 || signbit(z) == 0)
+ if (isinf(z) == 0 || signbit(z) == 0)
atf_tc_fail_nonfatal("powf(-Inf, 3.0) != -Inf");
z = powf(x, 4.0);
- if (isinff(z) == 0 || signbit(z) != 0)
+ if (isinf(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(-Inf, 4.0) != +Inf");
/*
@@ -425,7 +421,7 @@ ATF_TC_BODY(powf_inf_neg_y, tc)
*/
z = powf(0.1, y);
- if (isinff(z) == 0 || signbit(z) != 0)
+ if (isinf(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(0.1, -Inf) != +Inf");
z = powf(1.1, y);
@@ -456,7 +452,7 @@ ATF_TC_BODY(powf_inf_pos_x, tc)
z = powf(x, 2.0);
- if (isinff(z) == 0 || signbit(z) != 0)
+ if (isinf(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(+Inf, 2.0) != +Inf");
}
@@ -482,7 +478,7 @@ ATF_TC_BODY(powf_inf_pos_y, tc)
z = powf(1.1, y);
- if (isinff(z) == 0 || signbit(z) != 0)
+ if (isinf(z) == 0 || signbit(z) != 0)
atf_tc_fail_nonfatal("powf(1.1, +Inf) != +Inf");
}
@@ -500,8 +496,8 @@ ATF_TC_BODY(powf_one_neg_x, tc)
/*
* If x is -1.0, and y is +-Inf, 1.0 shall be returned.
*/
- ATF_REQUIRE(isinff(infp) != 0);
- ATF_REQUIRE(isinff(infn) != 0);
+ ATF_REQUIRE(isinf(infp) != 0);
+ ATF_REQUIRE(isinf(infn) != 0);
if (powf(-1.0, infp) != 1.0) {
atf_tc_expect_fail("PR lib/45372");
diff --git a/contrib/netbsd-tests/lib/libm/t_precision.c b/contrib/netbsd-tests/lib/libm/t_precision.c
index df2d8a3..eb8e295 100644
--- a/contrib/netbsd-tests/lib/libm/t_precision.c
+++ b/contrib/netbsd-tests/lib/libm/t_precision.c
@@ -51,6 +51,11 @@ volatile long double y = 1;
ATF_TC_BODY(t_precision, tc)
{
+#ifdef __FreeBSD__
+#ifdef __i386__
+ atf_tc_expect_fail("the __HAVE_LONG_DOUBLE checks fail on i386");
+#endif
+#endif
x += DBL_EPSILON;
ATF_CHECK(x != 1.0);
x -= 1;
diff --git a/contrib/netbsd-tests/lib/libm/t_scalbn.c b/contrib/netbsd-tests/lib/libm/t_scalbn.c
index fe70b3c..4bf00c3 100644
--- a/contrib/netbsd-tests/lib/libm/t_scalbn.c
+++ b/contrib/netbsd-tests/lib/libm/t_scalbn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_scalbn.c,v 1.11 2014/03/03 10:39:08 martin Exp $ */
+/* $NetBSD: t_scalbn.c,v 1.14 2017/01/13 21:09:12 agc Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_scalbn.c,v 1.11 2014/03/03 10:39:08 martin Exp $");
+__RCSID("$NetBSD: t_scalbn.c,v 1.14 2017/01/13 21:09:12 agc Exp $");
#include <math.h>
#include <limits.h>
@@ -81,9 +81,7 @@ ATF_TC_BODY(scalbn_val, tc)
double rv;
for (i = 0; i < tcnt; i++) {
-#ifdef __FreeBSD__
errno = 0;
-#endif
rv = scalbn(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,
@@ -225,9 +223,7 @@ ATF_TC_BODY(scalbnf_val, tc)
double rv;
for (i = 0; i < tcnt; i++) {
-#ifdef __FreeBSD__
errno = 0;
-#endif
rv = scalbnf(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,
@@ -372,9 +368,7 @@ ATF_TC_BODY(scalbnl_val, tc)
long double rv;
for (i = 0; i < tcnt; i++) {
-#ifdef __FreeBSD__
errno = 0;
-#endif
rv = scalbnl(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,
diff --git a/contrib/netbsd-tests/lib/libposix/t_rename.c b/contrib/netbsd-tests/lib/libposix/t_rename.c
index 85b2b95..8c18ec5 100644
--- a/contrib/netbsd-tests/lib/libposix/t_rename.c
+++ b/contrib/netbsd-tests/lib/libposix/t_rename.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_rename.c,v 1.2 2011/05/16 00:03:36 christos Exp $ */
+/* $NetBSD: t_rename.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */
/*
* Copyright (c) 2001, 2008, 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008, 2010\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_rename.c,v 1.2 2011/05/16 00:03:36 christos Exp $");
+__RCSID("$NetBSD: t_rename.c,v 1.3 2017/01/13 21:30:41 christos Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -43,7 +43,7 @@ __RCSID("$NetBSD: t_rename.c,v 1.2 2011/05/16 00:03:36 christos Exp $");
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(rename);
ATF_TC_HEAD(rename, tc)
diff --git a/contrib/netbsd-tests/lib/libpthread/h_common.h b/contrib/netbsd-tests/lib/libpthread/h_common.h
index 2e8b0a1..261b07f 100644
--- a/contrib/netbsd-tests/lib/libpthread/h_common.h
+++ b/contrib/netbsd-tests/lib/libpthread/h_common.h
@@ -5,14 +5,14 @@
#define PTHREAD_REQUIRE(x) \
do { \
- int ret = (x); \
- ATF_REQUIRE_MSG(ret == 0, "%s: %s", #x, strerror(ret)); \
+ int _ret = (x); \
+ ATF_REQUIRE_MSG(_ret == 0, "%s: %s", #x, strerror(_ret)); \
} while (0)
#define PTHREAD_REQUIRE_STATUS(x, v) \
do { \
- int ret = (x); \
- ATF_REQUIRE_MSG(ret == (v), "%s: %s", #x, strerror(ret)); \
+ int _ret = (x); \
+ ATF_REQUIRE_MSG(_ret == (v), "%s: %s", #x, strerror(_ret)); \
} while (0)
#endif // H_COMMON_H
diff --git a/contrib/netbsd-tests/lib/libpthread/t_condwait.c b/contrib/netbsd-tests/lib/libpthread/t_condwait.c
index 99793d0..58b4a8b 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_condwait.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_condwait.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $ */
+/* $NetBSD: t_condwait.c,v 1.5 2017/01/16 16:29:19 christos Exp $ */
/*
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -26,8 +26,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $");
+__RCSID("$NetBSD: t_condwait.c,v 1.5 2017/01/16 16:29:19 christos Exp $");
+#include <sys/time.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
@@ -40,11 +41,7 @@ __RCSID("$NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $");
#include "isqemu.h"
-#ifdef __FreeBSD__
-#include <sys/time.h>
-
#include "h_common.h"
-#endif
#define WAITTIME 2 /* Timeout wait secound */
@@ -62,13 +59,8 @@ run(void *param)
clck = *(clockid_t *)param;
-#ifdef __FreeBSD__
PTHREAD_REQUIRE(pthread_condattr_init(&attr));
PTHREAD_REQUIRE(pthread_condattr_setclock(&attr, clck));
-#else
- pthread_condattr_init(&attr);
- pthread_condattr_setclock(&attr, clck); /* MONOTONIC or MONOTONIC */
-#endif
pthread_cond_init(&cond, &attr);
ATF_REQUIRE_EQ((ret = pthread_mutex_lock(&m)), 0);
diff --git a/contrib/netbsd-tests/lib/libpthread/t_detach.c b/contrib/netbsd-tests/lib/libpthread/t_detach.c
index b3357bc..b30cb02 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_detach.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_detach.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_detach.c,v 1.1 2011/03/24 13:52:04 jruoho Exp $ */
+/* $NetBSD: t_detach.c,v 1.2 2017/01/16 16:29:54 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,27 +29,22 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_detach.c,v 1.1 2011/03/24 13:52:04 jruoho Exp $");
+__RCSID("$NetBSD: t_detach.c,v 1.2 2017/01/16 16:29:54 christos Exp $");
-#include <pthread.h>
#include <errno.h>
+#include <pthread.h>
+#include <time.h>
#include <atf-c.h>
#include "h_common.h"
-#ifdef __FreeBSD__
-#include <time.h>
-#endif
-
static void *func(void *);
static void *
func(void *arg)
{
-#ifdef __FreeBSD__
sleep(2);
-#endif
return NULL;
}
@@ -79,25 +74,17 @@ ATF_TC_BODY(pthread_detach, tc)
*/
PTHREAD_REQUIRE(pthread_detach(t));
-#ifdef __FreeBSD__
sleep(1);
-#endif
rv = pthread_join(t, NULL);
ATF_REQUIRE(rv == EINVAL);
-#ifdef __FreeBSD__
sleep(3);
-#endif
/*
* As usual, ESRCH should follow if
* we try to detach an invalid thread.
*/
-#ifdef __NetBSD__
- rv = pthread_cancel(NULL);
-#else
rv = pthread_cancel(t);
-#endif
ATF_REQUIRE(rv == ESRCH);
}
diff --git a/contrib/netbsd-tests/lib/libpthread/t_fork.c b/contrib/netbsd-tests/lib/libpthread/t_fork.c
index a58c1a6..936c7de 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_fork.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_fork.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fork.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $ */
+/* $NetBSD: t_fork.c,v 1.2 2017/01/16 16:28:27 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_fork.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $");
+__RCSID("$NetBSD: t_fork.c,v 1.2 2017/01/16 16:28:27 christos Exp $");
/*
* Written by Love Hörnquist Åstrand <lha@NetBSD.org>, March 2003.
@@ -61,11 +61,7 @@ print_pid(void *arg)
thread_survived = 1;
if (parent != getpid()) {
-#ifdef __FreeBSD__
_exit(1);
-#else
- exit(1);
-#endif
}
return NULL;
}
@@ -99,11 +95,7 @@ ATF_TC_BODY(fork, tc)
ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), 0, "thread survived in child");
} else {
sleep(5);
-#ifdef __FreeBSD__
_exit(thread_survived ? 1 : 0);
-#else
- exit(thread_survived ? 1 : 0);
-#endif
}
}
diff --git a/contrib/netbsd-tests/lib/libpthread/t_fpu.c b/contrib/netbsd-tests/lib/libpthread/t_fpu.c
index 6a385d9..dd47fb8 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_fpu.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_fpu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fpu.c,v 1.2 2013/01/27 14:47:37 mbalmer Exp $ */
+/* $NetBSD: t_fpu.c,v 1.3 2017/01/16 16:27:43 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_fpu.c,v 1.2 2013/01/27 14:47:37 mbalmer Exp $");
+__RCSID("$NetBSD: t_fpu.c,v 1.3 2017/01/16 16:27:43 christos Exp $");
/*
* This is adapted from part of csw/cstest of the MPD implementation by
@@ -49,20 +49,17 @@ __RCSID("$NetBSD: t_fpu.c,v 1.2 2013/01/27 14:47:37 mbalmer Exp $");
* <is@netbsd.org>.
*/
+#include <errno.h>
#include <math.h>
#include <pthread.h>
#include <sched.h>
#include <stdio.h>
+#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <atf-c.h>
-#ifdef __FreeBSD__
-#include <errno.h>
-#include <string.h>
-#endif
-
#include "h_common.h"
#define N_RECURSE 10
@@ -82,24 +79,16 @@ stir(void *p)
for (;;) {
x = sin ((y = cos (x + y + .4)) - (z = cos (x + z + .6)));
-#ifdef __FreeBSD__
ATF_REQUIRE_MSG(sched_yield() == 0,
"sched_yield failed: %s", strerror(errno));
-#else
- PTHREAD_REQUIRE(sched_yield());
-#endif
}
}
static double
mul3(double x, double y, double z)
{
-#ifdef __FreeBSD__
ATF_REQUIRE_MSG(sched_yield() == 0,
"sched_yield failed: %s", strerror(errno));
-#else
- PTHREAD_REQUIRE(sched_yield());
-#endif
return x * y * z;
}
@@ -129,11 +118,7 @@ bar(void *p)
static void
recurse(void) {
pthread_t s2;
-#ifdef __FreeBSD__
PTHREAD_REQUIRE(pthread_create(&s2, 0, bar, 0));
-#else
- pthread_create(&s2, 0, bar, 0);
-#endif
sleep(20); /* XXX must be long enough for our slowest machine */
}
@@ -153,11 +138,7 @@ ATF_TC_BODY(fpu, tc)
PTHREAD_REQUIRE(pthread_mutex_init(&recursion_depth_lock, 0));
-#ifdef __FreeBSD__
PTHREAD_REQUIRE(pthread_create(&s5, 0, stir, stirseed));
-#else
- pthread_create(&s5, 0, stir, stirseed);
-#endif
recurse();
atf_tc_fail("exiting from main");
diff --git a/contrib/netbsd-tests/lib/libpthread/t_join.c b/contrib/netbsd-tests/lib/libpthread/t_join.c
index 71b6775..1c57910 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_join.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_join.c
@@ -37,10 +37,6 @@ __RCSID("$NetBSD: t_join.c,v 1.8 2012/03/12 20:17:16 joerg Exp $");
#include <atf-c.h>
-#ifdef __FreeBSD__
-#include <pthread_np.h>
-#endif
-
#include "h_common.h"
#ifdef CHECK_STACK_ALIGNMENT
diff --git a/contrib/netbsd-tests/lib/libpthread/t_mutex.c b/contrib/netbsd-tests/lib/libpthread/t_mutex.c
index b8d60e6..bcb8540 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_mutex.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_mutex.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mutex.c,v 1.14 2016/10/31 23:51:20 christos Exp $ */
+/* $NetBSD: t_mutex.c,v 1.15 2017/01/16 16:23:41 christos Exp $ */
/*
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,12 +29,10 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_mutex.c,v 1.14 2016/10/31 23:51:20 christos Exp $");
+__RCSID("$NetBSD: t_mutex.c,v 1.15 2017/01/16 16:23:41 christos Exp $");
-#ifdef __FreeBSD__
#include <sys/time.h> /* For timespecadd */
#include <inttypes.h> /* For UINT16_MAX */
-#endif
#include <pthread.h>
#include <stdio.h>
#include <string.h>
@@ -594,20 +592,16 @@ ATF_TC_BODY(mutexattr2, tc)
int min_prio = sched_get_priority_min(SCHED_FIFO);
for (int i = min_prio; i <= max_prio; i++) {
int prioceiling;
-#ifdef __FreeBSD__
int protocol;
PTHREAD_REQUIRE(pthread_mutexattr_getprotocol(&mattr,
&protocol));
printf("priority: %d\nprotocol: %d\n", i, protocol);
-#endif
PTHREAD_REQUIRE(pthread_mutexattr_setprioceiling(&mattr, i));
PTHREAD_REQUIRE(pthread_mutexattr_getprioceiling(&mattr,
&prioceiling));
-#ifdef __FreeBSD__
printf("prioceiling: %d\n", prioceiling);
-#endif
ATF_REQUIRE_EQ(i, prioceiling);
}
}
diff --git a/contrib/netbsd-tests/lib/libpthread/t_once.c b/contrib/netbsd-tests/lib/libpthread/t_once.c
index e879077..e2f209b 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_once.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_once.c
@@ -31,6 +31,9 @@ __COPYRIGHT("@(#) Copyright (c) 2008\
The NetBSD Foundation, inc. All rights reserved.");
__RCSID("$NetBSD: t_once.c,v 1.1 2010/07/16 15:42:53 jmmv Exp $");
+#ifdef __FreeBSD__
+#include <sys/time.h> /* For itimer*, etc. */
+#endif
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
@@ -46,10 +49,6 @@ static int x;
#define NTHREADS 25
-#ifdef __FreeBSD__
-#include <sys/time.h>
-#endif
-
static void
ofunc(void)
{
diff --git a/contrib/netbsd-tests/lib/libpthread/t_sem.c b/contrib/netbsd-tests/lib/libpthread/t_sem.c
index 5bb7ae7..3d15edd 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_sem.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_sem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sem.c,v 1.8 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_sem.c,v 1.9 2017/01/16 16:22:22 christos Exp $ */
/*
* Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -86,8 +86,9 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008, 2010\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sem.c,v 1.8 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_sem.c,v 1.9 2017/01/16 16:22:22 christos Exp $");
+#include <sys/time.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
@@ -111,10 +112,6 @@ __RCSID("$NetBSD: t_sem.c,v 1.8 2014/11/04 00:20:19 justin Exp $");
static sem_t sem;
-#ifdef __FreeBSD__
-#include <sys/time.h>
-#endif
-
ATF_TC(named);
ATF_TC_HEAD(named, tc)
{
diff --git a/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c b/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c
index a18ac2f..677c51f 100644
--- a/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c
+++ b/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_swapcontext.c,v 1.2 2014/08/25 16:31:15 bouyer Exp $ */
+/* $NetBSD: t_swapcontext.c,v 1.3 2017/01/16 16:27:06 christos Exp $ */
/*
* Copyright (c) 2012 Emmanuel Dreyfus. All rights reserved.
@@ -28,15 +28,13 @@
#include <sys/cdefs.h>
__RCSID("$NetBSD");
-#ifdef __FreeBSD__
#include <sys/types.h>
#include <errno.h>
-#include <string.h>
-#endif
#include <pthread.h>
-#include <ucontext.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <ucontext.h>
#include <atf-c.h>
@@ -82,12 +80,8 @@ threadfunc(void *arg)
oself = (void *)pthread_self();
printf("before swapcontext self = %p\n", oself);
-#ifdef __FreeBSD__
ATF_REQUIRE_MSG(swapcontext(&octx, &nctx) != -1, "swapcontext failed: %s",
strerror(errno));
-#else
- PTHREAD_REQUIRE(swapcontext(&octx, &nctx));
-#endif
/* NOTREACHED */
return NULL;
@@ -109,12 +103,8 @@ ATF_TC_BODY(swapcontext1, tc)
printf("Testing if swapcontext() alters pthread_self()\n");
-#ifdef __FreeBSD__
ATF_REQUIRE_MSG(getcontext(&nctx) != -1, "getcontext failed: %s",
strerror(errno));
-#else
- PTHREAD_REQUIRE(getcontext(&nctx));
-#endif
PTHREAD_REQUIRE(pthread_create(&thread, NULL, threadfunc, NULL));
PTHREAD_REQUIRE(pthread_join(thread, NULL));
}
diff --git a/contrib/netbsd-tests/lib/libpthread_dbg/h_common.h b/contrib/netbsd-tests/lib/libpthread_dbg/h_common.h
new file mode 100644
index 0000000..0a02b96
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libpthread_dbg/h_common.h
@@ -0,0 +1,128 @@
+/* $NetBSD: h_common.h,v 1.2 2016/11/19 02:30:54 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef H_COMMON_H
+#define H_COMMON_H
+
+#include <sys/cdefs.h>
+#include <dlfcn.h>
+#include <pthread_dbg.h>
+#include <string.h>
+
+#include <atf-c.h>
+
+#define PTHREAD_REQUIRE(x) \
+ do { \
+ int ret = (x); \
+ ATF_REQUIRE_MSG(ret == 0, "%s: %s", #x, strerror(ret)); \
+ } while (0)
+
+#define PTHREAD_REQUIRE_STATUS(x, v) \
+ do { \
+ int ret = (x); \
+ ATF_REQUIRE_MSG(ret == (v), "%s: %s", #x, strerror(ret)); \
+ } while (0)
+
+static int __used
+dummy_proc_read(void *arg, caddr_t addr, void *buf, size_t size)
+{
+ return TD_ERR_ERR;
+}
+
+static int __used
+dummy_proc_write(void *arg, caddr_t addr, void *buf, size_t size)
+{
+ return TD_ERR_ERR;
+}
+
+static int __used
+dummy_proc_lookup(void *arg, const char *sym, caddr_t *addr)
+{
+ return TD_ERR_ERR;
+}
+
+static int __used
+dummy_proc_regsize(void *arg, int regset, size_t *size)
+{
+ return TD_ERR_ERR;
+}
+
+static int __used
+dummy_proc_getregs(void *arg, int regset, int lwp, void *buf)
+{
+ return TD_ERR_ERR;
+}
+
+static int __used
+dummy_proc_setregs(void *arg, int regset, int lwp, void *buf)
+{
+ return TD_ERR_ERR;
+}
+
+/* Minimalistic basic implementation */
+
+static int __used
+basic_proc_read(void *arg, caddr_t addr, void *buf, size_t size)
+{
+ memcpy(buf, addr, size);
+
+ return TD_ERR_OK;
+}
+
+static int __used
+basic_proc_write(void *arg, caddr_t addr, void *buf, size_t size)
+{
+ memcpy(addr, buf, size);
+
+ return TD_ERR_OK;
+}
+
+static int __used
+basic_proc_lookup(void *arg, const char *sym, caddr_t *addr)
+{
+ void *handle;
+ void *symbol;
+
+ ATF_REQUIRE_MSG((handle = dlopen(NULL, RTLD_LOCAL | RTLD_LAZY))
+ != NULL, "dlopen(3) failed: %s", dlerror());
+
+ symbol = dlsym(handle, sym);
+
+ ATF_REQUIRE_MSG(dlclose(handle) == 0, "dlclose(3) failed: %s",
+ dlerror());
+
+ if (!symbol)
+ return TD_ERR_NOSYM;
+
+ *addr = (caddr_t)(uintptr_t)symbol;
+
+ return TD_ERR_OK;
+}
+
+#endif // H_COMMON_H
diff --git a/contrib/netbsd-tests/lib/libpthread_dbg/t_dummy.c b/contrib/netbsd-tests/lib/libpthread_dbg/t_dummy.c
new file mode 100644
index 0000000..367443c
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libpthread_dbg/t_dummy.c
@@ -0,0 +1,131 @@
+/* $NetBSD: t_dummy.c,v 1.6 2016/11/19 15:13:46 kamil Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_dummy.c,v 1.6 2016/11/19 15:13:46 kamil Exp $");
+
+#include "h_common.h"
+#include <pthread_dbg.h>
+#include <stdio.h>
+
+#include <atf-c.h>
+
+
+ATF_TC(dummy1);
+ATF_TC_HEAD(dummy1, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that dummy lookup functions stop td_open() with failure");
+}
+
+ATF_TC_BODY(dummy1, tc)
+{
+
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+
+ dummy_callbacks.proc_read = dummy_proc_read;
+ dummy_callbacks.proc_write = dummy_proc_write;
+ dummy_callbacks.proc_lookup = dummy_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_ERR);
+}
+
+ATF_TC(dummy2);
+ATF_TC_HEAD(dummy2, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that td_open() for basic proc_{read,write,lookup} works");
+}
+
+ATF_TC_BODY(dummy2, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+}
+
+ATF_TC(dummy3);
+ATF_TC_HEAD(dummy3, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that calling twice td_open() for the same process fails");
+}
+
+ATF_TC_BODY(dummy3, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta1;
+ td_proc_t *main_ta2;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ printf("Calling td_open(3) for the first time - expecting success\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta1) == TD_ERR_OK);
+
+ printf("Calling td_open(3) for the first time - expecting in-use\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta2) ==
+ TD_ERR_INUSE);
+
+ printf("Calling td_close(3) for the first successful call\n");
+ ATF_REQUIRE(td_close(main_ta1) == TD_ERR_OK);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+ ATF_TP_ADD_TC(tp, dummy1);
+ ATF_TP_ADD_TC(tp, dummy2);
+ ATF_TP_ADD_TC(tp, dummy3);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/lib/libpthread_dbg/t_threads.c b/contrib/netbsd-tests/lib/libpthread_dbg/t_threads.c
new file mode 100644
index 0000000..f22bbc9
--- /dev/null
+++ b/contrib/netbsd-tests/lib/libpthread_dbg/t_threads.c
@@ -0,0 +1,719 @@
+/* $NetBSD: t_threads.c,v 1.9 2017/01/13 05:18:22 christos Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_threads.c,v 1.9 2017/01/13 05:18:22 christos Exp $");
+
+#include <dlfcn.h>
+#include <pthread.h>
+#include <pthread_dbg.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <atf-c.h>
+
+#include "h_common.h"
+
+#define MAX_THREADS (size_t)10
+
+ATF_TC(threads1);
+ATF_TC_HEAD(threads1, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that td_thr_iter() call without extra logic works");
+}
+
+static volatile int exiting1;
+
+static void *
+busyFunction1(void *arg)
+{
+
+ while (exiting1 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads1(td_thread_t *thread, void *arg)
+{
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads1, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction1, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads1, NULL) == TD_ERR_OK);
+
+ exiting1 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+}
+
+ATF_TC(threads2);
+ATF_TC_HEAD(threads2, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that td_thr_iter() call is executed for each thread once");
+}
+
+static volatile int exiting2;
+
+static void *
+busyFunction2(void *arg)
+{
+
+ while (exiting2 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads2(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads2, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction2, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads2, &count) == TD_ERR_OK);
+
+ exiting2 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads3);
+ATF_TC_HEAD(threads3, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that for each td_thr_iter() call td_thr_info() is valid");
+}
+
+static volatile int exiting3;
+
+static void *
+busyFunction3(void *arg)
+{
+
+ while (exiting3 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads3(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+ td_thread_info_t info;
+
+ ATF_REQUIRE(td_thr_info(thread, &info) == TD_ERR_OK);
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads3, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction3, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads3, &count) == TD_ERR_OK);
+
+ exiting3 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads4);
+ATF_TC_HEAD(threads4, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that for each td_thr_iter() call td_thr_getname() is "
+ "valid");
+}
+
+static volatile int exiting4;
+
+static void *
+busyFunction4(void *arg)
+{
+
+ while (exiting4 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads4(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+ char name[PTHREAD_MAX_NAMELEN_NP];
+
+ ATF_REQUIRE(td_thr_getname(thread, name, sizeof(name)) == TD_ERR_OK);
+
+ printf("Thread name: %s\n", name);
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads4, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction4, NULL));
+ }
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ PTHREAD_REQUIRE
+ (pthread_setname_np(threads[i], "test_%d", (void*)i));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads4, &count) == TD_ERR_OK);
+
+ exiting4 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads5);
+ATF_TC_HEAD(threads5, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that td_thr_getname() handles shorter buffer parameter "
+ "and the result is properly truncated");
+}
+
+static volatile int exiting5;
+
+static void *
+busyFunction5(void *arg)
+{
+
+ while (exiting5 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads5(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+ /* Arbitrarily short string buffer */
+ char name[3];
+
+ ATF_REQUIRE(td_thr_getname(thread, name, sizeof(name)) == TD_ERR_OK);
+
+ printf("Thread name: %s\n", name);
+
+ /* strlen(3) does not count including a '\0' character */
+ ATF_REQUIRE(strlen(name) < sizeof(name));
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads5, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction5, NULL));
+ }
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ PTHREAD_REQUIRE
+ (pthread_setname_np(threads[i], "test_%d", (void*)i));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads5, &count) == TD_ERR_OK);
+
+ exiting5 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads6);
+ATF_TC_HEAD(threads6, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that pthread_t can be translated with td_map_pth2thr() "
+ "to td_thread_t -- and assert earlier that td_thr_iter() call is "
+ "valid");
+}
+
+static volatile int exiting6;
+
+static void *
+busyFunction6(void *arg)
+{
+
+ while (exiting6 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads6(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads6, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction6, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads6, &count) == TD_ERR_OK);
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ td_thread_t *td_thread;
+ ATF_REQUIRE(td_map_pth2thr(main_ta, threads[i], &td_thread)
+ == TD_ERR_OK);
+ }
+
+ exiting6 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads7);
+ATF_TC_HEAD(threads7, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that pthread_t can be translated with td_map_pth2thr() "
+ "to td_thread_t -- and assert later that td_thr_iter() call is "
+ "valid");
+}
+
+static volatile int exiting7;
+
+static void *
+busyFunction7(void *arg)
+{
+
+ while (exiting7 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads7(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads7, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction7, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ td_thread_t *td_thread;
+ ATF_REQUIRE(td_map_pth2thr(main_ta, threads[i], &td_thread)
+ == TD_ERR_OK);
+ }
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads7, &count) == TD_ERR_OK);
+
+ exiting7 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads8);
+ATF_TC_HEAD(threads8, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that pthread_t can be translated with td_map_pth2thr() "
+ "to td_thread_t -- compare thread's name of pthread_t and "
+ "td_thread_t");
+}
+
+static volatile int exiting8;
+
+static void *
+busyFunction8(void *arg)
+{
+
+ while (exiting8 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads8(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads8, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction8, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads8, &count) == TD_ERR_OK);
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ td_thread_t *td_thread;
+ char td_threadname[PTHREAD_MAX_NAMELEN_NP];
+ char pth_threadname[PTHREAD_MAX_NAMELEN_NP];
+ ATF_REQUIRE(td_map_pth2thr(main_ta, threads[i], &td_thread)
+ == TD_ERR_OK);
+ ATF_REQUIRE(td_thr_getname(td_thread, td_threadname,
+ sizeof(td_threadname)) == TD_ERR_OK);
+ PTHREAD_REQUIRE(pthread_getname_np(threads[i], pth_threadname,
+ sizeof(pth_threadname)));
+ ATF_REQUIRE(strcmp(td_threadname, pth_threadname) == 0);
+ }
+
+ exiting8 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TC(threads9);
+ATF_TC_HEAD(threads9, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr",
+ "Asserts that pthread_t can be translated with td_map_pth2thr() "
+ "to td_thread_t -- assert that thread is in the TD_STATE_RUNNING "
+ "state");
+}
+
+static volatile int exiting9;
+
+static void *
+busyFunction9(void *arg)
+{
+
+ while (exiting9 == 0)
+ usleep(50000);
+
+ return NULL;
+}
+
+static int
+iterateThreads9(td_thread_t *thread, void *arg)
+{
+ int *counter = (int *)arg;
+
+ ++(*counter);
+
+ return TD_ERR_OK;
+}
+
+ATF_TC_BODY(threads9, tc)
+{
+ struct td_proc_callbacks_t dummy_callbacks;
+ td_proc_t *main_ta;
+ size_t i;
+ pthread_t threads[MAX_THREADS];
+ int count = 0;
+
+ dummy_callbacks.proc_read = basic_proc_read;
+ dummy_callbacks.proc_write = basic_proc_write;
+ dummy_callbacks.proc_lookup = basic_proc_lookup;
+ dummy_callbacks.proc_regsize = dummy_proc_regsize;
+ dummy_callbacks.proc_getregs = dummy_proc_getregs;
+ dummy_callbacks.proc_setregs = dummy_proc_setregs;
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ printf("Creating thread %zu\n", i);
+ PTHREAD_REQUIRE
+ (pthread_create(&threads[i], NULL, busyFunction9, NULL));
+ }
+
+ printf("Calling td_open(3)\n");
+ ATF_REQUIRE(td_open(&dummy_callbacks, NULL, &main_ta) == TD_ERR_OK);
+
+ for (i = 0; i < MAX_THREADS; i++) {
+ td_thread_t *td_thread;
+ td_thread_info_t info;
+ ATF_REQUIRE(td_map_pth2thr(main_ta, threads[i], &td_thread)
+ == TD_ERR_OK);
+ ATF_REQUIRE(td_thr_info(td_thread, &info) == TD_ERR_OK);
+ ATF_REQUIRE_EQ(info.thread_state, TD_STATE_RUNNING);
+ }
+
+ ATF_REQUIRE(td_thr_iter(main_ta, iterateThreads9, &count) == TD_ERR_OK);
+
+ exiting9 = 1;
+
+ printf("Calling td_close(3)\n");
+ ATF_REQUIRE(td_close(main_ta) == TD_ERR_OK);
+
+ ATF_REQUIRE_EQ_MSG(count, MAX_THREADS + 1,
+ "counted threads (%d) != expected threads (%zu)",
+ count, MAX_THREADS + 1);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+ ATF_TP_ADD_TC(tp, threads1);
+ ATF_TP_ADD_TC(tp, threads2);
+ ATF_TP_ADD_TC(tp, threads3);
+ ATF_TP_ADD_TC(tp, threads4);
+ ATF_TP_ADD_TC(tp, threads5);
+ ATF_TP_ADD_TC(tp, threads6);
+ ATF_TP_ADD_TC(tp, threads7);
+ ATF_TP_ADD_TC(tp, threads8);
+ ATF_TP_ADD_TC(tp, threads9);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/lib/librefuse/t_refuse_opt.c b/contrib/netbsd-tests/lib/librefuse/t_refuse_opt.c
new file mode 100644
index 0000000..23c2803
--- /dev/null
+++ b/contrib/netbsd-tests/lib/librefuse/t_refuse_opt.c
@@ -0,0 +1,418 @@
+/* $NetBSD: t_refuse_opt.c,v 1.8 2017/01/13 21:30:41 christos Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_refuse_opt.c,v 1.8 2017/01/13 21:30:41 christos Exp $");
+
+#define _KERNTYPES
+#include <sys/types.h>
+
+#include <atf-c.h>
+
+#include <fuse.h>
+
+#include "h_macros.h"
+
+ATF_TC(t_fuse_opt_add_arg);
+ATF_TC_HEAD(t_fuse_opt_add_arg, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Check that fuse_opt_add_arg(3) works");
+}
+
+ATF_TC_BODY(t_fuse_opt_add_arg, tc)
+{
+ struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
+
+ RZ(fuse_opt_add_arg(&args, "foo"));
+ RZ(fuse_opt_add_arg(&args, "bar"));
+
+ ATF_REQUIRE_EQ(args.argc, 2);
+ ATF_CHECK_STREQ(args.argv[0], "foo");
+ ATF_CHECK_STREQ(args.argv[1], "bar");
+ ATF_CHECK(args.allocated != 0);
+}
+
+ATF_TC(t_fuse_opt_insert_arg);
+ATF_TC_HEAD(t_fuse_opt_insert_arg, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Check that fuse_opt_insert_arg(3) works");
+}
+
+ATF_TC_BODY(t_fuse_opt_insert_arg, tc)
+{
+ struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
+
+ RZ(fuse_opt_insert_arg(&args, 0, "foo"));
+ RZ(fuse_opt_insert_arg(&args, 0, "bar"));
+
+ ATF_REQUIRE_EQ(args.argc, 2);
+ ATF_CHECK_STREQ(args.argv[0], "bar");
+ ATF_CHECK_STREQ(args.argv[1], "foo");
+ ATF_CHECK(args.allocated != 0);
+}
+
+ATF_TC(t_fuse_opt_add_opt);
+ATF_TC_HEAD(t_fuse_opt_add_opt, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Check that fuse_opt_add_opt(3) works");
+}
+
+ATF_TC_BODY(t_fuse_opt_add_opt, tc)
+{
+ char* opt = NULL;
+
+ RZ(fuse_opt_add_opt(&opt, "fo\\o"));
+ ATF_CHECK_STREQ(opt, "fo\\o");
+
+ RZ(fuse_opt_add_opt(&opt, "ba,r"));
+ ATF_CHECK_STREQ(opt, "fo\\o,ba,r");
+}
+
+ATF_TC(t_fuse_opt_add_opt_escaped);
+ATF_TC_HEAD(t_fuse_opt_add_opt_escaped, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Check that fuse_opt_add_opt_escaped(3) works");
+}
+
+ATF_TC_BODY(t_fuse_opt_add_opt_escaped, tc)
+{
+ char* opt = NULL;
+
+ RZ(fuse_opt_add_opt_escaped(&opt, "fo\\o"));
+ ATF_CHECK_STREQ(opt, "fo\\\\o");
+
+ RZ(fuse_opt_add_opt_escaped(&opt, "ba,r"));
+ ATF_CHECK_STREQ(opt, "fo\\\\o,ba\\,r");
+}
+
+ATF_TC(t_fuse_opt_match);
+ATF_TC_HEAD(t_fuse_opt_match, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Check that fuse_opt_match(3) works"
+ " for every form of templates");
+}
+
+ATF_TC_BODY(t_fuse_opt_match, tc)
+{
+ struct fuse_opt o1[] = { FUSE_OPT_KEY("-x" , 0), FUSE_OPT_END };
+ struct fuse_opt o2[] = { FUSE_OPT_KEY("foo" , 0), FUSE_OPT_END };
+ struct fuse_opt o3[] = { FUSE_OPT_KEY("foo=" , 0), FUSE_OPT_END };
+ struct fuse_opt o4[] = { FUSE_OPT_KEY("foo=%s", 0), FUSE_OPT_END };
+ struct fuse_opt o5[] = { FUSE_OPT_KEY("-x " , 0), FUSE_OPT_END };
+ struct fuse_opt o6[] = { FUSE_OPT_KEY("-x %s" , 0), FUSE_OPT_END };
+
+ ATF_CHECK(fuse_opt_match(o1, "-x") == 1);
+ ATF_CHECK(fuse_opt_match(o1, "x") == 0);
+
+ ATF_CHECK(fuse_opt_match(o2, "foo") == 1);
+ ATF_CHECK(fuse_opt_match(o2, "-foo") == 0);
+
+ ATF_CHECK(fuse_opt_match(o3, "foo=bar") == 1);
+ ATF_CHECK(fuse_opt_match(o3, "foo" ) == 0);
+
+ ATF_CHECK(fuse_opt_match(o4, "foo=bar") == 1);
+ ATF_CHECK(fuse_opt_match(o4, "foo" ) == 0);
+
+ ATF_CHECK(fuse_opt_match(o5, "-xbar" ) == 1);
+ ATF_CHECK(fuse_opt_match(o5, "-x" ) == 1);
+ ATF_CHECK(fuse_opt_match(o5, "-x=bar") == 1);
+ ATF_CHECK(fuse_opt_match(o5, "bar" ) == 0);
+
+ ATF_CHECK(fuse_opt_match(o6, "-xbar" ) == 1);
+ ATF_CHECK(fuse_opt_match(o6, "-x" ) == 1);
+ ATF_CHECK(fuse_opt_match(o6, "-x=bar") == 1);
+ ATF_CHECK(fuse_opt_match(o6, "bar" ) == 0);
+}
+
+struct foofs_config {
+ int number;
+ char *string;
+ char* nonopt;
+};
+
+#define FOOFS_OPT(t, p, v) { t, offsetof(struct foofs_config, p), v }
+
+static struct fuse_opt foofs_opts[] = {
+ FOOFS_OPT("number=%i" , number, 0),
+ FOOFS_OPT("-n %i" , number, 0),
+ FOOFS_OPT("string=%s" , string, 0),
+ FOOFS_OPT("number1" , number, 1),
+ FOOFS_OPT("number2" , number, 2),
+ FOOFS_OPT("--number=three", number, 3),
+ FOOFS_OPT("--number=four" , number, 4),
+ FUSE_OPT_END
+};
+
+static int foo_opt_proc(void *data, const char *arg, int key, struct fuse_args *outargs) {
+ struct foofs_config *config = data;
+
+ if (key == FUSE_OPT_KEY_NONOPT && config->nonopt == NULL) {
+ config->nonopt = strdup(arg);
+ return 0;
+ }
+ else {
+ return 1;
+ }
+}
+
+ATF_TC(t_fuse_opt_parse_null_args);
+ATF_TC_HEAD(t_fuse_opt_parse_null_args, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "NULL args means an empty arguments vector");
+}
+
+ATF_TC_BODY(t_fuse_opt_parse_null_args, tc)
+{
+ struct foofs_config config;
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(NULL, &config, NULL, NULL) == 0);
+ ATF_CHECK_EQ(config.number, 0);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_EQ(config.nonopt, NULL);
+}
+
+ATF_TC(t_fuse_opt_parse_null_opts);
+ATF_TC_HEAD(t_fuse_opt_parse_null_opts, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "NULL opts means an opts array which only has FUSE_OPT_END");
+}
+
+ATF_TC_BODY(t_fuse_opt_parse_null_opts, tc)
+{
+ struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
+ struct foofs_config config;
+
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "number=1,string=foo"));
+ RZ(fuse_opt_add_arg(&args, "bar"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, NULL, NULL) == 0);
+ ATF_CHECK_EQ(config.number, 0);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_EQ(config.nonopt, NULL);
+ ATF_CHECK_EQ(args.argc, 4);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+ ATF_CHECK_STREQ(args.argv[1], "-o");
+ ATF_CHECK_STREQ(args.argv[2], "number=1,string=foo");
+ ATF_CHECK_STREQ(args.argv[3], "bar");
+}
+
+ATF_TC(t_fuse_opt_parse_null_proc);
+ATF_TC_HEAD(t_fuse_opt_parse_null_proc, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "NULL proc means a processor function always returning 1,"
+ " i.e. keep the argument");
+}
+
+ATF_TC_BODY(t_fuse_opt_parse_null_proc, tc)
+{
+ struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
+ struct foofs_config config;
+
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "number=1,string=foo"));
+ RZ(fuse_opt_add_arg(&args, "bar"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, NULL) == 0);
+ ATF_CHECK_EQ(config.number, 1);
+ ATF_CHECK_STREQ(config.string, "foo");
+ ATF_CHECK_EQ(config.nonopt, NULL);
+ ATF_CHECK_EQ(args.argc, 2);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+ ATF_CHECK_STREQ(args.argv[1], "bar");
+}
+
+ATF_TC(t_fuse_opt_parse);
+ATF_TC_HEAD(t_fuse_opt_parse, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Check that fuse_opt_parse(3) fully works");
+}
+
+ATF_TC_BODY(t_fuse_opt_parse, tc)
+{
+ struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
+ struct foofs_config config;
+
+ /* Standard form */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "number=1,string=foo"));
+ RZ(fuse_opt_add_arg(&args, "bar"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 1);
+ ATF_CHECK_STREQ(config.string, "foo");
+ ATF_CHECK_STREQ(config.nonopt, "bar");
+ ATF_CHECK_EQ(args.argc, 1);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+
+ /* Concatenated -o */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-onumber=1,unknown,string=foo"));
+ RZ(fuse_opt_add_arg(&args, "bar"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 1);
+ ATF_CHECK_STREQ(config.string, "foo");
+ ATF_CHECK_STREQ(config.nonopt, "bar");
+ ATF_CHECK_EQ(args.argc, 3);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+ ATF_CHECK_STREQ(args.argv[1], "-o");
+ ATF_CHECK_STREQ(args.argv[2], "unknown");
+
+ /* Sparse -o */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "bar"));
+ RZ(fuse_opt_add_arg(&args, "baz"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "number=1"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "unknown"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "string=foo"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 1);
+ ATF_CHECK_STREQ(config.string, "foo");
+ ATF_CHECK_STREQ(config.nonopt, "bar");
+ ATF_CHECK_EQ(args.argc, 4);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+ ATF_CHECK_STREQ(args.argv[1], "-o");
+ ATF_CHECK_STREQ(args.argv[2], "unknown");
+ ATF_CHECK_STREQ(args.argv[3], "baz");
+
+ /* Separate -n %i */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-n"));
+ RZ(fuse_opt_add_arg(&args, "3"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 3);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_EQ(config.nonopt, NULL);
+ ATF_CHECK_EQ(args.argc, 1);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+
+ /* Concatenated -n %i */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-n3"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 3);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_EQ(config.nonopt, NULL);
+ ATF_CHECK_EQ(args.argc, 1);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+
+ /* -o constant */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "-o"));
+ RZ(fuse_opt_add_arg(&args, "number2"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 2);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_EQ(config.nonopt, NULL);
+ ATF_CHECK_EQ(args.argc, 1);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+
+ /* -x constant */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "--number=four"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 4);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_EQ(config.nonopt, NULL);
+ ATF_CHECK_EQ(args.argc, 1);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+
+ /* end-of-options "--" marker */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "--"));
+ RZ(fuse_opt_add_arg(&args, "-onumber=1"));
+ RZ(fuse_opt_add_arg(&args, "-ostring=foo"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 0);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_STREQ(config.nonopt, "-onumber=1");
+ ATF_CHECK_EQ(args.argc, 3);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+ ATF_CHECK_STREQ(args.argv[1], "--");
+ ATF_CHECK_STREQ(args.argv[2], "-ostring=foo");
+
+ /* The "--" marker at the last of outargs should be removed */
+ fuse_opt_free_args(&args);
+ RZ(fuse_opt_add_arg(&args, "foofs"));
+ RZ(fuse_opt_add_arg(&args, "--"));
+ RZ(fuse_opt_add_arg(&args, "-onumber=1"));
+
+ memset(&config, 0, sizeof(config));
+ ATF_CHECK(fuse_opt_parse(&args, &config, foofs_opts, foo_opt_proc) == 0);
+ ATF_CHECK_EQ(config.number, 0);
+ ATF_CHECK_EQ(config.string, NULL);
+ ATF_CHECK_STREQ(config.nonopt, "-onumber=1");
+ ATF_CHECK_EQ(args.argc, 1);
+ ATF_CHECK_STREQ(args.argv[0], "foofs");
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ ATF_TP_ADD_TC(tp, t_fuse_opt_add_arg);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_insert_arg);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_add_opt);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_add_opt_escaped);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_match);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_parse_null_args);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_parse_null_opts);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_parse_null_proc);
+ ATF_TP_ADD_TC(tp, t_fuse_opt_parse);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/lib/librt/t_sem.c b/contrib/netbsd-tests/lib/librt/t_sem.c
index e76cd52..0541ae5 100644
--- a/contrib/netbsd-tests/lib/librt/t_sem.c
+++ b/contrib/netbsd-tests/lib/librt/t_sem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sem.c,v 1.2 2010/11/08 13:05:49 njoly Exp $ */
+/* $NetBSD: t_sem.c,v 1.3 2017/01/14 20:58:20 christos Exp $ */
/*
* Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008, 2010\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_sem.c,v 1.2 2010/11/08 13:05:49 njoly Exp $");
+__RCSID("$NetBSD: t_sem.c,v 1.3 2017/01/14 20:58:20 christos Exp $");
#include <sys/wait.h>
@@ -72,7 +72,7 @@ __RCSID("$NetBSD: t_sem.c,v 1.2 2010/11/08 13:05:49 njoly Exp $");
#define NCHILDREN 10
-ATF_TC(basic);
+ATF_TC_WITH_CLEANUP(basic);
ATF_TC_HEAD(basic, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks basic functionality of POSIX "
@@ -86,9 +86,6 @@ ATF_TC_BODY(basic, tc)
if (sysconf(_SC_SEMAPHORES) == -1)
atf_tc_skip("POSIX semaphores not supported");
-#ifdef __FreeBSD__
- sem_unlink("/sem_b");
-#endif
sem_b = sem_open("/sem_b", O_CREAT | O_EXCL, 0644, 0);
ATF_REQUIRE(sem_b != SEM_FAILED);
@@ -111,8 +108,12 @@ ATF_TC_BODY(basic, tc)
ATF_REQUIRE_EQ(sem_close(sem_b), 0);
ATF_REQUIRE_EQ(sem_unlink("/sem_b"), 0);
}
+ATF_TC_CLEANUP(basic, tc)
+{
+ (void)sem_unlink("/sem_b");
+}
-ATF_TC(child);
+ATF_TC_WITH_CLEANUP(child);
ATF_TC_HEAD(child, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks using semaphores to synchronize "
@@ -127,12 +128,9 @@ ATF_TC_BODY(child, tc)
pid_t pid;
- if (sysconf(_SC_SEMAPHORES) == -1)
+ if (sysconf(_SC_SEMAPHORES) == -1)
atf_tc_skip("POSIX semaphores not supported");
-#ifdef __FreeBSD__
- sem_unlink("/sem_a");
-#endif
sem_a = sem_open("/sem_a", O_CREAT | O_EXCL, 0644, 0);
ATF_REQUIRE(sem_a != SEM_FAILED);
@@ -170,6 +168,10 @@ ATF_TC_BODY(child, tc)
ATF_REQUIRE_EQ(sem_close(sem_a), 0);
ATF_REQUIRE_EQ(sem_unlink("/sem_a"), 0);
}
+ATF_TC_CLEANUP(child, tc)
+{
+ (void)sem_unlink("/sem_a");
+}
ATF_TP_ADD_TCS(tp)
{
diff --git a/contrib/netbsd-tests/lib/librumpclient/t_fd.c b/contrib/netbsd-tests/lib/librumpclient/t_fd.c
index 6e6d947..70182ab 100644
--- a/contrib/netbsd-tests/lib/librumpclient/t_fd.c
+++ b/contrib/netbsd-tests/lib/librumpclient/t_fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fd.c,v 1.5 2016/08/10 21:10:18 kre Exp $ */
+/* $NetBSD: t_fd.c,v 1.6 2017/01/13 21:30:41 christos Exp $ */
/*
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
#include <rump/rumpclient.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC_WITH_CLEANUP(bigenough);
ATF_TC_HEAD(bigenough, tc)
diff --git a/contrib/netbsd-tests/lib/semaphore/sem.c b/contrib/netbsd-tests/lib/semaphore/sem.c
index 5967b88..6af9b0d 100644
--- a/contrib/netbsd-tests/lib/semaphore/sem.c
+++ b/contrib/netbsd-tests/lib/semaphore/sem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sem.c,v 1.10 2012/03/09 14:25:34 joerg Exp $ */
+/* $NetBSD: sem.c,v 1.11 2017/01/13 21:30:42 christos Exp $ */
/*
* Common code for semaphore tests. This can be included both into
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(postwait);
ATF_TC_HEAD(postwait, tc)
diff --git a/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c b/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c
index 03940c2..47c7f55 100644
--- a/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c
+++ b/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-cleared.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dlerror-cleared.c,v 1.1 2010/12/14 05:57:32 skrll Exp $ */
+/* $NetBSD: t_dlerror-cleared.c,v 1.2 2017/01/13 21:30:42 christos Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <dlfcn.h>
#include <link_elf.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(rtld_dlerror_cleared);
ATF_TC_HEAD(rtld_dlerror_cleared, tc)
diff --git a/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c b/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c
index 8b80c26..31b96e8 100644
--- a/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c
+++ b/contrib/netbsd-tests/libexec/ld.elf_so/t_dlerror-false.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dlerror-false.c,v 1.1 2010/12/14 05:57:32 skrll Exp $ */
+/* $NetBSD: t_dlerror-false.c,v 1.2 2017/01/13 21:30:42 christos Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <dlfcn.h>
#include <link_elf.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(rtld_dlerror_false);
ATF_TC_HEAD(rtld_dlerror_false, tc)
diff --git a/contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c b/contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c
index a15ba5d..7b12528 100644
--- a/contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c
+++ b/contrib/netbsd-tests/libexec/ld.elf_so/t_dlinfo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dlinfo.c,v 1.4 2011/03/25 14:47:31 pooka Exp $ */
+/* $NetBSD: t_dlinfo.c,v 1.5 2017/01/13 21:30:42 christos Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <dlfcn.h>
#include <link_elf.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(rtld_dlinfo_linkmap_self);
ATF_TC_HEAD(rtld_dlinfo_linkmap_self, tc)
diff --git a/contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c b/contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c
index 1c85672..68468d4 100644
--- a/contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c
+++ b/contrib/netbsd-tests/libexec/ld.elf_so/t_ifunc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ifunc.c,v 1.1 2014/08/25 20:40:53 joerg Exp $ */
+/* $NetBSD: t_ifunc.c,v 1.2 2017/01/13 21:30:42 christos Exp $ */
/*
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <dlfcn.h>
#include <util.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(rtld_ifunc);
diff --git a/contrib/netbsd-tests/modules/t_builtin.c b/contrib/netbsd-tests/modules/t_builtin.c
index 0d9a3f0..79845b8 100644
--- a/contrib/netbsd-tests/modules/t_builtin.c
+++ b/contrib/netbsd-tests/modules/t_builtin.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_builtin.c,v 1.2 2010/11/03 16:10:23 christos Exp $ */
+/* $NetBSD: t_builtin.c,v 1.3 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc. All rights reserved.
@@ -39,7 +39,7 @@
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../h_macros.h"
+#include "h_macros.h"
#define MYMP "/mnt"
#define HZFILE MYMP "/hz"
diff --git a/contrib/netbsd-tests/net/bpf/t_bpf.c b/contrib/netbsd-tests/net/bpf/t_bpf.c
index 95ca2fc..cf8aa82 100644
--- a/contrib/netbsd-tests/net/bpf/t_bpf.c
+++ b/contrib/netbsd-tests/net/bpf/t_bpf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_bpf.c,v 1.5 2012/08/14 19:40:30 alnsn Exp $ */
+/* $NetBSD: t_bpf.c,v 1.7 2017/02/01 08:04:49 ozaki-r Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -25,7 +25,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_bpf.c,v 1.5 2012/08/14 19:40:30 alnsn Exp $");
+__RCSID("$NetBSD: t_bpf.c,v 1.7 2017/02/01 08:04:49 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -50,7 +50,7 @@ __RCSID("$NetBSD: t_bpf.c,v 1.5 2012/08/14 19:40:30 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../config/netconfig.c"
ATF_TC(bpfwriteleak);
@@ -166,6 +166,39 @@ ATF_TC_BODY(bpfwritetrunc, tc)
}
#endif /* #if (SIZE_MAX > UINT_MAX) */
+ATF_TC(bpf_ioctl_BLEN);
+ATF_TC_HEAD(bpf_ioctl_BLEN, tc)
+{
+
+ atf_tc_set_md_var(tc, "descr", "Checks behaviors of BIOCGBLEN and "
+ "BIOCSBLEN");
+}
+
+ATF_TC_BODY(bpf_ioctl_BLEN, tc)
+{
+ struct ifreq ifr;
+ int ifnum, bpfd;
+ u_int blen = 0;
+
+ RZ(rump_init());
+ RZ(rump_pub_shmif_create(NULL, &ifnum));
+ sprintf(ifr.ifr_name, "shmif%d", ifnum);
+
+ RL(bpfd = rump_sys_open("/dev/bpf", O_RDWR));
+
+ RL(rump_sys_ioctl(bpfd, BIOCGBLEN, &blen));
+ ATF_REQUIRE(blen != 0);
+ blen = 100;
+ RL(rump_sys_ioctl(bpfd, BIOCSBLEN, &blen));
+ RL(rump_sys_ioctl(bpfd, BIOCGBLEN, &blen));
+ ATF_REQUIRE_EQ(blen, 100);
+
+ RL(rump_sys_ioctl(bpfd, BIOCSETIF, &ifr));
+
+ ATF_REQUIRE_EQ_MSG(rump_sys_ioctl(bpfd, BIOCSBLEN, &blen), -1,
+ "Don't allow to change buflen after binding bpf to an interface");
+}
+
ATF_TP_ADD_TCS(tp)
{
@@ -173,5 +206,6 @@ ATF_TP_ADD_TCS(tp)
#if (SIZE_MAX > UINT_MAX)
ATF_TP_ADD_TC(tp, bpfwritetrunc);
#endif
+ ATF_TP_ADD_TC(tp, bpf_ioctl_BLEN);
return atf_no_error();
}
diff --git a/contrib/netbsd-tests/net/bpf/t_mbuf.c b/contrib/netbsd-tests/net/bpf/t_mbuf.c
index 965dd02..2076dc2 100644
--- a/contrib/netbsd-tests/net/bpf/t_mbuf.c
+++ b/contrib/netbsd-tests/net/bpf/t_mbuf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mbuf.c,v 1.2 2014/07/08 21:44:26 alnsn Exp $ */
+/* $NetBSD: t_mbuf.c,v 1.3 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2014 Alexander Nasonov.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mbuf.c,v 1.2 2014/07/08 21:44:26 alnsn Exp $");
+__RCSID("$NetBSD: t_mbuf.c,v 1.3 2017/01/13 21:30:42 christos Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_mbuf.c,v 1.2 2014/07/08 21:44:26 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static bool
test_ldb_abs(size_t split)
diff --git a/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c b/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c
index 460b43e..15a9ab6 100644
--- a/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c
+++ b/contrib/netbsd-tests/net/bpfilter/t_bpfilter.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_bpfilter.c,v 1.10 2015/02/11 23:39:07 alnsn Exp $ */
+/* $NetBSD: t_bpfilter.c,v 1.11 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -25,7 +25,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_bpfilter.c,v 1.10 2015/02/11 23:39:07 alnsn Exp $");
+__RCSID("$NetBSD: t_bpfilter.c,v 1.11 2017/01/13 21:30:42 christos Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -53,7 +53,7 @@ __RCSID("$NetBSD: t_bpfilter.c,v 1.10 2015/02/11 23:39:07 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../config/netconfig.c"
diff --git a/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c b/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c
index 58db1e0..06c3d97 100644
--- a/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c
+++ b/contrib/netbsd-tests/net/bpfjit/t_bpfjit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_bpfjit.c,v 1.11 2015/02/14 22:34:33 alnsn Exp $ */
+/* $NetBSD: t_bpfjit.c,v 1.12 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2011-2012, 2014-2015 Alexander Nasonov.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_bpfjit.c,v 1.11 2015/02/14 22:34:33 alnsn Exp $");
+__RCSID("$NetBSD: t_bpfjit.c,v 1.12 2017/01/13 21:30:42 christos Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -49,7 +49,7 @@ __RCSID("$NetBSD: t_bpfjit.c,v 1.11 2015/02/14 22:34:33 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static uint8_t deadbeef_at_5[16] = {
diff --git a/contrib/netbsd-tests/net/bpfjit/t_cop.c b/contrib/netbsd-tests/net/bpfjit/t_cop.c
index 5a007e6..502c588 100644
--- a/contrib/netbsd-tests/net/bpfjit/t_cop.c
+++ b/contrib/netbsd-tests/net/bpfjit/t_cop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cop.c,v 1.3 2014/07/13 21:35:33 alnsn Exp $ */
+/* $NetBSD: t_cop.c,v 1.4 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2014 Alexander Nasonov.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_cop.c,v 1.3 2014/07/13 21:35:33 alnsn Exp $");
+__RCSID("$NetBSD: t_cop.c,v 1.4 2017/01/13 21:30:42 christos Exp $");
#include <stdint.h>
#include <string.h>
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_cop.c,v 1.3 2014/07/13 21:35:33 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static uint32_t retA(const bpf_ctx_t *bc, bpf_args_t *args, uint32_t A);
static uint32_t retBL(const bpf_ctx_t *bc, bpf_args_t *args, uint32_t A);
diff --git a/contrib/netbsd-tests/net/bpfjit/t_extmem.c b/contrib/netbsd-tests/net/bpfjit/t_extmem.c
index 915c436..51761ec 100644
--- a/contrib/netbsd-tests/net/bpfjit/t_extmem.c
+++ b/contrib/netbsd-tests/net/bpfjit/t_extmem.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_extmem.c,v 1.1 2014/07/09 13:49:49 alnsn Exp $ */
+/* $NetBSD: t_extmem.c,v 1.2 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2014 Alexander Nasonov.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_extmem.c,v 1.1 2014/07/09 13:49:49 alnsn Exp $");
+__RCSID("$NetBSD: t_extmem.c,v 1.2 2017/01/13 21:30:42 christos Exp $");
#include <stdint.h>
#include <string.h>
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_extmem.c,v 1.1 2014/07/09 13:49:49 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static uint32_t retM(const bpf_ctx_t *bc, bpf_args_t *args, uint32_t A);
diff --git a/contrib/netbsd-tests/net/bpfjit/t_mbuf.c b/contrib/netbsd-tests/net/bpfjit/t_mbuf.c
index 489ef80..d3a2b99 100644
--- a/contrib/netbsd-tests/net/bpfjit/t_mbuf.c
+++ b/contrib/netbsd-tests/net/bpfjit/t_mbuf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mbuf.c,v 1.1 2014/07/08 21:45:55 alnsn Exp $ */
+/* $NetBSD: t_mbuf.c,v 1.2 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2014 Alexander Nasonov.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mbuf.c,v 1.1 2014/07/08 21:45:55 alnsn Exp $");
+__RCSID("$NetBSD: t_mbuf.c,v 1.2 2017/01/13 21:30:42 christos Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@@ -48,7 +48,7 @@ __RCSID("$NetBSD: t_mbuf.c,v 1.1 2014/07/08 21:45:55 alnsn Exp $");
#undef m_data
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
static bool
test_ldb_abs(size_t split)
diff --git a/contrib/netbsd-tests/net/carp/t_basic.c b/contrib/netbsd-tests/net/carp/t_basic.c
deleted file mode 100644
index fe2e6b5..0000000
--- a/contrib/netbsd-tests/net/carp/t_basic.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* $NetBSD: t_basic.c,v 1.5 2011/06/26 13:13:31 christos Exp $ */
-
-/*-
- * Copyright (c) 2010 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
- * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: t_basic.c,v 1.5 2011/06/26 13:13:31 christos Exp $");
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/wait.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip_carp.h>
-
-#include <rump/rump.h>
-#include <rump/rump_syscalls.h>
-
-#include <atf-c.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <signal.h>
-
-#include "../config/netconfig.c"
-#include "../../h_macros.h"
-
-static bool oknow = false;
-
-static void
-sighnd(int sig)
-{
-
- ATF_REQUIRE_EQ(sig, SIGCHLD);
- if (oknow)
- return;
-
- atf_tc_fail("child died unexpectedly");
-}
-
-ATF_TC(handover);
-ATF_TC_HEAD(handover, tc)
-{
-
- atf_tc_set_md_var(tc, "descr", "check that carp handover works if "
- "the master dies");
-}
-
-#define THEBUS "buuuuuuus,etherbus"
-
-static void
-child(bool master)
-{
- char ifname[IFNAMSIZ];
- struct carpreq cr;
- struct ifreq ifr;
- const char *carpif;
- int s;
-
- /* helps reading carp debug output */
- if (master)
- carpif = "carp0";
- else
- carpif = "carp1";
-
- /*
- * Should use sysctl, bug debug is dabug.
- */
- {
- //extern int rumpns_carp_opts[]; /* XXX */
- //rumpns_carp_opts[CARPCTL_LOG] = 1;
- }
-
-
- rump_init();
-
- memset(&ifr, 0, sizeof(ifr));
- strlcpy(ifr.ifr_name, carpif, sizeof(ifr.ifr_name));
-
- RL(s = rump_sys_socket(PF_INET, SOCK_DGRAM, 0));
- RL(rump_sys_ioctl(s, SIOCIFCREATE, &ifr));
-
- netcfg_rump_makeshmif(THEBUS, ifname);
-
- if (master)
- netcfg_rump_if(ifname, "10.1.1.1", "255.255.255.0");
- else
- netcfg_rump_if(ifname, "10.1.1.2", "255.255.255.0");
-
- /* configure the carp interface */
- ifr.ifr_data = &cr;
- RL(rump_sys_ioctl(s, SIOCGVH, &ifr));
-
- strlcpy(cr.carpr_carpdev, ifname, sizeof(cr.carpr_carpdev));
- cr.carpr_vhid = 175;
- if (master)
- cr.carpr_advskew = 0;
- else
- cr.carpr_advskew = 200;
- cr.carpr_advbase = 1;
- strcpy((char *)cr.carpr_key, "s3cret");
-
- RL(rump_sys_ioctl(s, SIOCSVH, &ifr));
- netcfg_rump_if(carpif, "10.1.1.100", "255.255.255.0");
-
- /* tassa pause()en enka muuta voi */
- pause();
-}
-
-ATF_TC_BODY(handover, tc)
-{
- char ifname[IFNAMSIZ];
- pid_t mpid, cpid;
- int i, status;
-
- signal(SIGCHLD, sighnd);
-
- /* fork master */
- switch (mpid = fork()) {
- case -1:
- atf_tc_fail_errno("fork failed");
- /*NOTREACHED*/
- case 0:
- child(true);
- /*NOTREACHED*/
- default:
- break;
- }
-
- usleep(500000);
-
- /* fork backup */
- switch (cpid = fork()) {
- case -1:
- kill(mpid, SIGKILL);
- atf_tc_fail_errno("fork failed");
- /*NOTREACHED*/
- case 0:
- child(false);
- /*NOTREACHED*/
- default:
- break;
- }
-
- usleep(500000);
-
- rump_init();
- netcfg_rump_makeshmif(THEBUS, ifname);
- netcfg_rump_if(ifname, "10.1.1.240", "255.255.255.0");
-
- /* check that the primary addresses are up */
- ATF_REQUIRE_EQ(netcfg_rump_pingtest("10.1.1.1", 1000), true);
- ATF_REQUIRE_EQ(netcfg_rump_pingtest("10.1.1.2", 1000), true);
-
- /* give carp a while to croak */
- sleep(4);
-
- /* check that the shared IP works */
- ATF_REQUIRE_EQ(netcfg_rump_pingtest("10.1.1.100", 500), true);
-
- /* KILLING SPREE */
- oknow = true;
- kill(mpid, SIGKILL);
- wait(&status);
- usleep(10000); /* just in case */
- oknow = false;
-
- /* check that primary is now dead */
- ATF_REQUIRE_EQ(netcfg_rump_pingtest("10.1.1.1", 100), false);
-
- /* do it in installments. carp will cluck meanwhile */
- for (i = 0; i < 5; i++) {
- if (netcfg_rump_pingtest("10.1.1.100", 1000) == true)
- break;
- }
- if (i == 5)
- atf_tc_fail("failed to failover");
-
- /* to kill the child */
- oknow = true;
- kill(cpid, SIGKILL);
-
- /* clean & done */
-}
-
-ATF_TP_ADD_TCS(tp)
-{
-
- ATF_TP_ADD_TC(tp, handover);
-
- return atf_no_error();
-}
diff --git a/contrib/netbsd-tests/net/carp/t_basic.sh b/contrib/netbsd-tests/net/carp/t_basic.sh
new file mode 100755
index 0000000..94ada1c
--- /dev/null
+++ b/contrib/netbsd-tests/net/carp/t_basic.sh
@@ -0,0 +1,165 @@
+# $NetBSD: t_basic.sh,v 1.1 2017/01/16 08:18:11 ozaki-r Exp $
+#
+# Copyright (c) 2017 Internet Initiative Japan Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+SOCK_CLIENT=unix://carp_client
+SOCK_MASTER=unix://carp_master
+SOCK_BACKUP=unix://carp_backup
+BUS=bus_carp
+IP_CLIENT=10.1.1.240
+IP_MASTER=10.1.1.1
+IP_BACKUP=10.1.1.2
+IP_CARP=10.1.1.100
+TIMEOUT=3
+
+atf_test_case carp_handover cleanup
+
+carp_handover_head()
+{
+
+ atf_set "descr" "Tests for CARP handover"
+ atf_set "require.progs" "rump_server"
+}
+
+setup_carp()
+{
+ local sock=$1
+ local master=$2
+ local carpif= ip= advskew=
+
+ if $master; then
+ carpif=carp0
+ ip=$IP_MASTER
+ advskew=0
+ else
+ carpif=carp1
+ ip=$IP_BACKUP
+ advskew=200
+ fi
+
+ export RUMP_SERVER=$sock
+ atf_check -s exit:0 rump.ifconfig $carpif create
+ atf_check -s exit:0 rump.ifconfig shmif0 $ip/24 up
+ atf_check -s exit:0 rump.ifconfig $carpif \
+ vhid 175 advskew $advskew advbase 1 pass s3cret \
+ $IP_CARP netmask 255.255.255.0
+ atf_check -s exit:0 rump.ifconfig -w 10
+}
+
+wait_handover()
+{
+ local i=0
+
+ export RUMP_SERVER=$SOCK_CLIENT
+
+ while [ $i -ne 5 ]; do
+ $DEBUG && echo "Trying ping $IP_CARP"
+ rump.ping -n -w 1 -c 1 $IP_CARP >/dev/null
+ if [ $? = 0 ]; then
+ $DEBUG && echo "Passed ping $IP_CARP"
+ break;
+ fi
+ $DEBUG && echo "Failed ping $IP_CARP"
+ i=$((i + 1))
+ done
+
+ if [ $i -eq 5 ]; then
+ atf_fail "Failed to failover (5 sec)"
+ fi
+}
+
+carp_handover_body()
+{
+
+ rump_server_start $SOCK_CLIENT
+ rump_server_start $SOCK_MASTER
+ rump_server_start $SOCK_BACKUP
+
+ rump_server_add_iface $SOCK_CLIENT shmif0 $BUS
+ rump_server_add_iface $SOCK_MASTER shmif0 $BUS
+ rump_server_add_iface $SOCK_BACKUP shmif0 $BUS
+
+ setup_carp $SOCK_MASTER true
+ setup_carp $SOCK_BACKUP false
+
+ export RUMP_SERVER=$SOCK_CLIENT
+ atf_check -s exit:0 rump.ifconfig shmif0 $IP_CLIENT/24 up
+ atf_check -s exit:0 rump.ifconfig -w 10
+
+ # Check that the primary addresses are up
+ atf_check -s exit:0 -o ignore \
+ rump.ping -n -w $TIMEOUT -c 1 $IP_MASTER
+ atf_check -s exit:0 -o ignore \
+ rump.ping -n -w $TIMEOUT -c 1 $IP_BACKUP
+
+ # Give carp a while to croak
+ sleep 4
+
+ # Check state
+ export RUMP_SERVER=$SOCK_MASTER
+ $DEBUG && rump.ifconfig
+ atf_check -s exit:0 -o match:'carp: MASTER carpdev shmif0' \
+ rump.ifconfig carp0
+ export RUMP_SERVER=$SOCK_BACKUP
+ $DEBUG && rump.ifconfig
+ atf_check -s exit:0 -o match:'carp: BACKUP carpdev shmif0' \
+ rump.ifconfig carp1
+ export RUMP_SERVER=$SOCK_CLIENT
+
+ # Check that the shared IP works
+ atf_check -s exit:0 -o ignore \
+ rump.ping -n -w $TIMEOUT -c 1 $IP_CARP
+
+ # KILLING SPREE
+ env RUMP_SERVER=$SOCK_MASTER rump.halt
+ sleep 1
+
+ # Check that primary is now dead
+ atf_check -s not-exit:0 -o ignore \
+ rump.ping -n -w $TIMEOUT -c 1 $IP_MASTER
+
+ # Do it in installments. carp will cluck meanwhile
+ wait_handover
+
+ # Check state
+ export RUMP_SERVER=$SOCK_BACKUP
+ $DEBUG && rump.ifconfig
+ atf_check -s exit:0 -o match:'carp: MASTER carpdev shmif0' \
+ rump.ifconfig carp1
+}
+
+carp_handover_cleanup()
+{
+
+ $DEBUG && dump
+ cleanup
+}
+
+atf_init_test_cases()
+{
+
+ atf_add_test_case carp_handover
+}
diff --git a/contrib/netbsd-tests/net/config/netconfig.c b/contrib/netbsd-tests/net/config/netconfig.c
index c2f9dd4..6fe37cc 100644
--- a/contrib/netbsd-tests/net/config/netconfig.c
+++ b/contrib/netbsd-tests/net/config/netconfig.c
@@ -1,4 +1,4 @@
-/* $NetBSD: netconfig.c,v 1.8 2013/07/03 19:13:33 pooka Exp $ */
+/* $NetBSD: netconfig.c,v 1.9 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: netconfig.c,v 1.8 2013/07/03 19:13:33 pooka Exp $");
+__RCSID("$NetBSD: netconfig.c,v 1.9 2017/01/13 21:30:42 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -53,7 +53,7 @@ __RCSID("$NetBSD: netconfig.c,v 1.8 2013/07/03 19:13:33 pooka Exp $");
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
int noatf;
diff --git a/contrib/netbsd-tests/net/icmp/t_forward.c b/contrib/netbsd-tests/net/icmp/t_forward.c
index d418027..346614c 100644
--- a/contrib/netbsd-tests/net/icmp/t_forward.c
+++ b/contrib/netbsd-tests/net/icmp/t_forward.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_forward.c,v 1.9 2015/02/26 13:03:21 martin Exp $ */
+/* $NetBSD: t_forward.c,v 1.10 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: t_forward.c,v 1.9 2015/02/26 13:03:21 martin Exp $");
+__RCSID("$NetBSD: t_forward.c,v 1.10 2017/01/13 21:30:42 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -57,7 +57,7 @@ __RCSID("$NetBSD: t_forward.c,v 1.9 2015/02/26 13:03:21 martin Exp $");
#include <string.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../config/netconfig.c"
/*
diff --git a/contrib/netbsd-tests/net/icmp/t_ping.c b/contrib/netbsd-tests/net/icmp/t_ping.c
index 68a00c7..b3327e1 100644
--- a/contrib/netbsd-tests/net/icmp/t_ping.c
+++ b/contrib/netbsd-tests/net/icmp/t_ping.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ping.c,v 1.16 2015/02/26 13:06:10 martin Exp $ */
+/* $NetBSD: t_ping.c,v 1.17 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: t_ping.c,v 1.16 2015/02/26 13:06:10 martin Exp $");
+__RCSID("$NetBSD: t_ping.c,v 1.17 2017/01/13 21:30:42 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -52,7 +52,7 @@ __RCSID("$NetBSD: t_ping.c,v 1.16 2015/02/26 13:06:10 martin Exp $");
#include <rump/rump.h>
#include <rump/rump_syscalls.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../config/netconfig.c"
ATF_TC(simpleping);
diff --git a/contrib/netbsd-tests/net/if/t_ifconfig.sh b/contrib/netbsd-tests/net/if/t_ifconfig.sh
index a610017..21c877c 100755
--- a/contrib/netbsd-tests/net/if/t_ifconfig.sh
+++ b/contrib/netbsd-tests/net/if/t_ifconfig.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_ifconfig.sh,v 1.14 2016/10/01 22:15:04 kre Exp $
+# $NetBSD: t_ifconfig.sh,v 1.15 2017/01/20 08:35:33 ozaki-r Exp $
#
# Copyright (c) 2015 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -181,7 +181,7 @@ ifconfig_options_body()
# ifconfig -C
# -C shows all of the interface cloners available on the system
- atf_check -s exit:0 -o match:'shmif lo carp' rump.ifconfig -C
+ atf_check -s exit:0 -o match:'shmif carp lo' rump.ifconfig -C
unset RUMP_SERVER
}
diff --git a/contrib/netbsd-tests/net/if_loop/t_pr.c b/contrib/netbsd-tests/net/if_loop/t_pr.c
index a22953f..ee4f684 100644
--- a/contrib/netbsd-tests/net/if_loop/t_pr.c
+++ b/contrib/netbsd-tests/net/if_loop/t_pr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pr.c,v 1.7 2012/03/18 09:46:50 jruoho Exp $ */
+/* $NetBSD: t_pr.c,v 1.8 2017/01/13 21:30:42 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: t_pr.c,v 1.7 2012/03/18 09:46:50 jruoho Exp $");
+__RCSID("$NetBSD: t_pr.c,v 1.8 2017/01/13 21:30:42 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -50,7 +50,7 @@ __RCSID("$NetBSD: t_pr.c,v 1.7 2012/03/18 09:46:50 jruoho Exp $");
#include <unistd.h>
#include "../config/netconfig.c"
-#include "../../h_macros.h"
+#include "h_macros.h"
/*
* Prepare rump, configure interface and route to cause fragmentation
diff --git a/contrib/netbsd-tests/net/if_tun/t_tun.sh b/contrib/netbsd-tests/net/if_tun/t_tun.sh
new file mode 100755
index 0000000..87df39a
--- /dev/null
+++ b/contrib/netbsd-tests/net/if_tun/t_tun.sh
@@ -0,0 +1,138 @@
+# $NetBSD: t_tun.sh,v 1.4 2016/11/07 05:25:37 ozaki-r Exp $
+#
+# Copyright (c) 2016 Internet Initiative Japan Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+RUMP_FLAGS="-lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_netinet6"
+RUMP_FLAGS="$RUMP_FLAGS -lrumpnet_shmif -lrumpnet_tun -lrumpdev"
+
+BUS=bus
+SOCK_LOCAL=unix://commsock1
+SOCK_REMOTE=unix://commsock2
+IP_LOCAL=10.0.0.1
+IP_REMOTE=10.0.0.2
+
+DEBUG=${DEBUG:-true}
+
+atf_test_case tun_create_destroy cleanup
+tun_create_destroy_head()
+{
+
+ atf_set "descr" "tests of creation and deletion of tun interface"
+ atf_set "require.progs" "rump_server"
+}
+
+tun_create_destroy_body()
+{
+
+ atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_LOCAL}
+
+ export RUMP_SERVER=${SOCK_LOCAL}
+
+ atf_check -s exit:0 rump.ifconfig tun0 create
+ atf_check -s exit:0 rump.ifconfig tun0 up
+ atf_check -s exit:0 rump.ifconfig tun0 down
+ atf_check -s exit:0 rump.ifconfig tun0 destroy
+}
+
+tun_create_destroy_cleanup()
+{
+
+ RUMP_SERVER=${SOCK_LOCAL} rump.halt
+}
+
+atf_test_case tun_setup cleanup
+tun_setup_head()
+{
+
+ atf_set "descr" "tests of setting up a tunnel"
+ atf_set "require.progs" "rump_server"
+}
+
+check_route_entry()
+{
+ local ip=$(echo $1 |sed 's/\./\\./g')
+ local gw=$2
+ local flags=$3
+ local iface=$4
+
+ atf_check -s exit:0 -o match:" $flags " -e ignore -x \
+ "rump.netstat -rn -f inet | grep ^'$ip'"
+ atf_check -s exit:0 -o match:" $gw " -e ignore -x \
+ "rump.netstat -rn -f inet | grep ^'$ip'"
+ atf_check -s exit:0 -o match:" $iface" -e ignore -x \
+ "rump.netstat -rn -f inet | grep ^'$ip'"
+}
+
+tun_setup_body()
+{
+
+ atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_LOCAL}
+ atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_REMOTE}
+
+ export RUMP_SERVER=${SOCK_LOCAL}
+
+ atf_check -s exit:0 rump.ifconfig shmif0 create
+ atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS
+ atf_check -s exit:0 rump.ifconfig shmif0 ${IP_LOCAL}/24 up
+ atf_check -s exit:0 rump.ifconfig -w 10
+
+ export RUMP_SERVER=${SOCK_REMOTE}
+
+ atf_check -s exit:0 rump.ifconfig shmif0 create
+ atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS
+ atf_check -s exit:0 rump.ifconfig shmif0 ${IP_REMOTE}/24 up
+ atf_check -s exit:0 rump.ifconfig -w 10
+
+ export RUMP_SERVER=${SOCK_LOCAL}
+ atf_check -s exit:0 rump.ifconfig tun0 create
+ atf_check -s exit:0 rump.ifconfig tun0 ${IP_LOCAL} ${IP_REMOTE} up
+ atf_check -s exit:0 \
+ -o match:"inet ${IP_LOCAL}/32 -> ${IP_REMOTE}" rump.ifconfig tun0
+ $DEBUG && rump.netstat -nr -f inet
+ check_route_entry ${IP_REMOTE} ${IP_LOCAL} UH tun0
+
+ export RUMP_SERVER=${SOCK_REMOTE}
+ atf_check -s exit:0 rump.ifconfig tun0 create
+ atf_check -s exit:0 rump.ifconfig tun0 ${IP_REMOTE} ${IP_LOCAL} up
+ atf_check -s exit:0 \
+ -o match:"inet ${IP_REMOTE}/32 -> ${IP_LOCAL}" rump.ifconfig tun0
+ $DEBUG && rump.netstat -nr -f inet
+ check_route_entry ${IP_LOCAL} ${IP_REMOTE} UH tun0
+}
+
+tun_setup_cleanup()
+{
+
+ RUMP_SERVER=${SOCK_LOCAL} rump.halt
+ RUMP_SERVER=${SOCK_REMOTE} rump.halt
+}
+
+atf_init_test_cases()
+{
+
+ atf_add_test_case tun_create_destroy
+ atf_add_test_case tun_setup
+}
diff --git a/contrib/netbsd-tests/net/if_vlan/t_vlan.sh b/contrib/netbsd-tests/net/if_vlan/t_vlan.sh
new file mode 100755
index 0000000..a6902fb1
--- /dev/null
+++ b/contrib/netbsd-tests/net/if_vlan/t_vlan.sh
@@ -0,0 +1,115 @@
+# $NetBSD: t_vlan.sh,v 1.1 2016/11/26 03:19:49 ozaki-r Exp $
+#
+# Copyright (c) 2016 Internet Initiative Japan Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+BUS=bus
+SOCK_LOCAL=unix://commsock1
+SOCK_REMOTE=unix://commsock2
+IP_LOCAL=10.0.0.1
+IP_REMOTE=10.0.0.2
+
+DEBUG=${DEBUG:-false}
+
+atf_test_case vlan_create_destroy cleanup
+vlan_create_destroy_head()
+{
+
+ atf_set "descr" "tests of creation and deletion of vlan interface"
+ atf_set "require.progs" "rump_server"
+}
+
+vlan_create_destroy_body()
+{
+
+ rump_server_start $SOCK_LOCAL vlan
+
+ export RUMP_SERVER=${SOCK_LOCAL}
+
+ atf_check -s exit:0 rump.ifconfig vlan0 create
+ atf_check -s exit:0 rump.ifconfig vlan0 up
+ atf_check -s exit:0 rump.ifconfig vlan0 down
+ atf_check -s exit:0 rump.ifconfig vlan0 destroy
+}
+
+vlan_create_destroy_cleanup()
+{
+
+ $DEBUG && dump
+ cleanup
+}
+
+atf_test_case vlan_basic cleanup
+vlan_basic_head()
+{
+
+ atf_set "descr" "tests of communications over vlan interfaces"
+ atf_set "require.progs" "rump_server"
+}
+
+vlan_basic_body()
+{
+
+ rump_server_start $SOCK_LOCAL vlan
+ rump_server_add_iface $SOCK_LOCAL shmif0 $BUS
+ rump_server_start $SOCK_REMOTE vlan
+ rump_server_add_iface $SOCK_REMOTE shmif0 $BUS
+
+ export RUMP_SERVER=$SOCK_LOCAL
+ atf_check -s exit:0 rump.ifconfig shmif0 up
+ export RUMP_SERVER=$SOCK_REMOTE
+ atf_check -s exit:0 rump.ifconfig shmif0 up
+
+ export RUMP_SERVER=$SOCK_LOCAL
+ atf_check -s exit:0 rump.ifconfig vlan0 create
+ atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0
+ atf_check -s exit:0 rump.ifconfig vlan0 $IP_LOCAL/24
+ atf_check -s exit:0 rump.ifconfig vlan0 up
+ atf_check -s exit:0 rump.ifconfig -w 10
+
+ export RUMP_SERVER=$SOCK_REMOTE
+ atf_check -s exit:0 rump.ifconfig vlan0 create
+ atf_check -s exit:0 rump.ifconfig vlan0 vlan 10 vlanif shmif0
+ atf_check -s exit:0 rump.ifconfig vlan0 $IP_REMOTE/24
+ atf_check -s exit:0 rump.ifconfig vlan0 up
+ atf_check -s exit:0 rump.ifconfig -w 10
+
+ export RUMP_SERVER=$SOCK_LOCAL
+ atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP_REMOTE
+}
+
+vlan_basic_cleanup()
+{
+
+ $DEBUG && dump
+ cleanup
+}
+
+atf_init_test_cases()
+{
+
+ atf_add_test_case vlan_create_destroy
+ atf_add_test_case vlan_basic
+}
diff --git a/contrib/netbsd-tests/net/ndp/t_ra.sh b/contrib/netbsd-tests/net/ndp/t_ra.sh
index b234570..69f227a 100755
--- a/contrib/netbsd-tests/net/ndp/t_ra.sh
+++ b/contrib/netbsd-tests/net/ndp/t_ra.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_ra.sh,v 1.20 2017/01/11 03:15:44 ozaki-r Exp $
+# $NetBSD: t_ra.sh,v 1.24 2017/01/13 08:11:01 ozaki-r Exp $
#
# Copyright (c) 2015 Internet Initiative Japan Inc.
# All rights reserved.
@@ -127,7 +127,8 @@ check_entries()
-o match:"$ll_srv%shmif0 +$mac_srv +shmif0 +(23h59m|1d0h0m)..s S R" \
rump.ndp -n -a
atf_check -s exit:0 -o match:$addr_prefix rump.ndp -n -a
- atf_check -s exit:0 -o match:"$addr_prefix.+<AUTOCONF>" \
+ atf_check -s exit:0 \
+ -o match:"$addr_prefix.+<(TENTATIVE,)?AUTOCONF>" \
rump.ifconfig shmif0 inet6
unset RUMP_SERVER
}
@@ -603,60 +604,75 @@ ra_temporary_address_head()
atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig"
}
+check_echo_request_pkt()
+{
+ local pkt="$2 > $3: .+ echo request"
+
+ extract_new_packets $1 > ./out
+ $DEBUG && echo $pkt
+ $DEBUG && cat ./out
+ atf_check -s exit:0 -o match:"$pkt" cat ./out
+}
+
ra_temporary_address_body()
{
+ local ip_auto= ip_temp=
rump_server_fs_start $RUMPSRV netinet6
rump_server_start $RUMPCLI netinet6
- setup_shmif0 ${RUMPSRV} ${IP6SRV}
+ setup_shmif0 $RUMPSRV $IP6SRV
init_server $RUMPSRV
+ setup_shmif0 $RUMPCLI $IP6CLI
- setup_shmif0 ${RUMPCLI} ${IP6CLI}
- export RUMP_SERVER=${RUMPCLI}
- $DEBUG && rump.ndp -n -a
- atf_check -s exit:0 -o match:'= 0' \
- rump.sysctl net.inet6.ip6.accept_rtadv
- atf_check -s exit:0 -o match:'= 0' \
- rump.sysctl net.inet6.ip6.use_tempaddr
- unset RUMP_SERVER
-
- create_rtadvdconfig
- start_rtadvd $RUMPSRV $PIDFILE
- sleep $WAITTIME
-
- export RUMP_SERVER=${RUMPCLI}
- atf_check -s exit:0 -o empty rump.ndp -r
- atf_check -s exit:0 -o not-match:'advertised' rump.ndp -p
- atf_check -s exit:0 -o match:'linkmtu=0' rump.ndp -n -i shmif0
- atf_check -s exit:0 -o not-match:'S R' rump.ndp -n -a
- atf_check -s exit:0 -o not-match:'fc00:1:' rump.ndp -n -a
- atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6
- unset RUMP_SERVER
-
- atf_check -s exit:0 kill -TERM `cat ${PIDFILE}`
- wait_term ${PIDFILE}
-
- export RUMP_SERVER=${RUMPCLI}
+ export RUMP_SERVER=$RUMPCLI
atf_check -s exit:0 -o match:'0.->.1' \
rump.sysctl -w net.inet6.ip6.accept_rtadv=1
atf_check -s exit:0 -o match:'0.->.1' \
rump.sysctl -w net.inet6.ip6.use_tempaddr=1
unset RUMP_SERVER
+ create_rtadvdconfig
start_rtadvd $RUMPSRV $PIDFILE
sleep $WAITTIME
check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX
+ export RUMP_SERVER=$RUMPCLI
+
# Check temporary address
- export RUMP_SERVER=${RUMPCLI}
- atf_check -s exit:0 -o match:"$IP6SRV_PREFIX.+<AUTOCONF,TEMPORARY>" \
+ atf_check -s exit:0 \
+ -o match:"$IP6SRV_PREFIX.+<(TENTATIVE,)?AUTOCONF,TEMPORARY>" \
rump.ifconfig shmif0 inet6
+
+ #
+ # Testing net.inet6.ip6.prefer_tempaddr
+ #
+ atf_check -s exit:0 rump.ifconfig -w 10
+ $DEBUG && rump.ifconfig shmif0
+ ip_auto=$(rump.ifconfig shmif0 |awk '/<AUTOCONF>/ {sub(/\/[0-9]*/, ""); print $2;}')
+ ip_temp=$(rump.ifconfig shmif0 |awk '/<AUTOCONF,TEMPORARY>/ {sub(/\/[0-9]*/, ""); print $2;}')
+ $DEBUG && echo $ip_auto $ip_temp
+
+ # Ignore old packets
+ extract_new_packets bus1 > /dev/null
+
+ atf_check -s exit:0 -o ignore rump.ping6 -n -X 2 -c 1 $IP6SRV
+ # autoconf (non-temporal) address should be used as the source address
+ check_echo_request_pkt bus1 $ip_auto $IP6SRV
+
+ # Enable net.inet6.ip6.prefer_tempaddr
+ atf_check -s exit:0 -o match:'0.->.1' \
+ rump.sysctl -w net.inet6.ip6.prefer_tempaddr=1
+
+ atf_check -s exit:0 -o ignore rump.ping6 -n -X 2 -c 1 $IP6SRV
+ # autoconf, temporal address should be used as the source address
+ check_echo_request_pkt bus1 $ip_temp $IP6SRV
+
unset RUMP_SERVER
atf_check -s exit:0 kill -TERM `cat ${PIDFILE}`
- wait_term ${PIDFILE}
+ wait_term $PIDFILE
rump_server_destroy_ifaces
}
diff --git a/contrib/netbsd-tests/net/net/t_raw.c b/contrib/netbsd-tests/net/net/t_raw.c
index ef3262d..5c483a1 100644
--- a/contrib/netbsd-tests/net/net/t_raw.c
+++ b/contrib/netbsd-tests/net/net/t_raw.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_raw.c,v 1.1 2011/01/11 10:51:45 pooka Exp $ */
+/* $NetBSD: t_raw.c,v 1.2 2017/01/13 21:30:42 christos Exp $ */
#include <sys/socket.h>
#include <sys/stat.h>
@@ -12,7 +12,7 @@
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(PRU_SENSE);
ATF_TC_HEAD(PRU_SENSE, tc)
diff --git a/contrib/netbsd-tests/rump/modautoload/t_modautoload.c b/contrib/netbsd-tests/rump/modautoload/t_modautoload.c
index 2c21a90..b45dae5 100644
--- a/contrib/netbsd-tests/rump/modautoload/t_modautoload.c
+++ b/contrib/netbsd-tests/rump/modautoload/t_modautoload.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_modautoload.c,v 1.5 2016/09/14 03:19:11 ozaki-r Exp $ */
+/* $NetBSD: t_modautoload.c,v 1.6 2017/01/13 21:30:42 christos Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -20,7 +20,7 @@
#include <miscfs/kernfs/kernfs.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(modautoload);
ATF_TC_HEAD(modautoload, tc)
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_kern.c b/contrib/netbsd-tests/rump/rumpkern/t_kern.c
index fcaf1f8..15b2586 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_kern.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_kern.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_kern.c,v 1.3 2012/01/30 13:05:52 njoly Exp $ */
+/* $NetBSD: t_kern.c,v 1.4 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../kernspace/kernspace.h"
#define LOCKFUN(_name_, _descr_,_needld_, _expect_) \
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c b/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c
index 6e78d02..f319979 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_lwproc.c,v 1.8 2017/01/10 22:36:29 christos Exp $ */
+/* $NetBSD: t_lwproc.c,v 1.9 2017/01/13 21:30:43 christos Exp $ */
/*
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
#include <unistd.h>
#include <util.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(makelwp);
ATF_TC_HEAD(makelwp, tc)
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_modcmd.c b/contrib/netbsd-tests/rump/rumpkern/t_modcmd.c
index 032e312..e48bcb5 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_modcmd.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_modcmd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_modcmd.c,v 1.9 2010/05/31 23:51:28 pooka Exp $ */
+/* $NetBSD: t_modcmd.c,v 1.10 2017/01/13 21:30:43 christos Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
#include <unistd.h>
#include <util.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
/*
* We verify that modules can be loaded and unloaded.
* tmpfs was chosen because it does not depend on an image.
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c b/contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c
index a4d34bb..7d725dc 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_modlinkset.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_modlinkset.c,v 1.2 2009/11/06 15:26:54 pooka Exp $ */
+/* $NetBSD: t_modlinkset.c,v 1.3 2017/01/13 21:30:43 christos Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <errno.h>
#include <string.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(modlinkset);
ATF_TC_HEAD(modlinkset, tc)
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_signals.c b/contrib/netbsd-tests/rump/rumpkern/t_signals.c
index e113af2..ba0c0ea 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_signals.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_signals.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_signals.c,v 1.2 2011/02/20 19:45:45 pooka Exp $ */
+/* $NetBSD: t_signals.c,v 1.3 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <rump/rump.h>
#include "../kernspace/kernspace.h"
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(sigraise);
ATF_TC_HEAD(sigraise, tc)
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_threads.c b/contrib/netbsd-tests/rump/rumpkern/t_threads.c
index 24155ec..2931fa6 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_threads.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_threads.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_threads.c,v 1.1 2010/05/31 23:36:12 pooka Exp $ */
+/* $NetBSD: t_threads.c,v 1.2 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../kernspace/kernspace.h"
ATF_TC(threadjoin);
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_tsleep.c b/contrib/netbsd-tests/rump/rumpkern/t_tsleep.c
index efd9f4c..126a89d 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_tsleep.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_tsleep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_tsleep.c,v 1.1 2010/05/31 23:36:12 pooka Exp $ */
+/* $NetBSD: t_tsleep.c,v 1.2 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <atf-c.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../kernspace/kernspace.h"
ATF_TC(tsleep);
diff --git a/contrib/netbsd-tests/rump/rumpkern/t_vm.c b/contrib/netbsd-tests/rump/rumpkern/t_vm.c
index 4445983..ddb005c 100644
--- a/contrib/netbsd-tests/rump/rumpkern/t_vm.c
+++ b/contrib/netbsd-tests/rump/rumpkern/t_vm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vm.c,v 1.3 2012/03/17 18:00:28 hannken Exp $ */
+/* $NetBSD: t_vm.c,v 1.4 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
#include "../kernspace/kernspace.h"
ATF_TC(busypage);
diff --git a/contrib/netbsd-tests/rump/rumpvfs/t_basic.c b/contrib/netbsd-tests/rump/rumpvfs/t_basic.c
index c136558..278d99e 100644
--- a/contrib/netbsd-tests/rump/rumpvfs/t_basic.c
+++ b/contrib/netbsd-tests/rump/rumpvfs/t_basic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.2 2011/02/22 13:25:18 pooka Exp $ */
+/* $NetBSD: t_basic.c,v 1.3 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(lseekrv);
ATF_TC_HEAD(lseekrv, tc)
diff --git a/contrib/netbsd-tests/rump/rumpvfs/t_etfs.c b/contrib/netbsd-tests/rump/rumpvfs/t_etfs.c
index 787f5e6..5935bea 100644
--- a/contrib/netbsd-tests/rump/rumpvfs/t_etfs.c
+++ b/contrib/netbsd-tests/rump/rumpvfs/t_etfs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_etfs.c,v 1.10 2014/05/12 15:33:12 christos Exp $ */
+/* $NetBSD: t_etfs.c,v 1.11 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(reregister_reg);
ATF_TC_HEAD(reregister_reg, tc)
diff --git a/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c b/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c
index c94e5e1..ec2423c 100644
--- a/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c
+++ b/contrib/netbsd-tests/rump/rumpvfs/t_p2kifs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_p2kifs.c,v 1.5 2016/01/25 11:45:57 pooka Exp $ */
+/* $NetBSD: t_p2kifs.c,v 1.6 2017/01/13 21:30:43 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../../h_macros.h"
+#include "h_macros.h"
ATF_TC(makecn);
ATF_TC_HEAD(makecn, tc)
diff --git a/contrib/netbsd-tests/sys/uvm/t_uvm_physseg.c b/contrib/netbsd-tests/sys/uvm/t_uvm_physseg.c
new file mode 100644
index 0000000..a5f2fa9
--- /dev/null
+++ b/contrib/netbsd-tests/sys/uvm/t_uvm_physseg.c
@@ -0,0 +1,2377 @@
+/* $NetBSD: t_uvm_physseg.c,v 1.2 2016/12/22 08:15:20 cherry Exp $ */
+
+/*-
+ * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Santhosh N. Raju <santhosh.raju@gmail.com> and
+ * by Cherry G. Mathew
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_uvm_physseg.c,v 1.2 2016/12/22 08:15:20 cherry Exp $");
+
+/*
+ * If this line is commented out tests related to uvm_physseg_get_pmseg()
+ * wont run.
+ *
+ * Have a look at machine/uvm_physseg.h for more details.
+ */
+#define __HAVE_PMAP_PHYSSEG
+
+/*
+ * This is a dummy struct used for testing purposes
+ *
+ * In reality this struct would exist in the MD part of the code residing in
+ * machines/vmparam.h
+ */
+
+#ifdef __HAVE_PMAP_PHYSSEG
+struct pmap_physseg {
+ int dummy_variable; /* Dummy variable use for testing */
+};
+#endif
+
+/* Testing API - assumes userland */
+/* Provide Kernel API equivalents */
+#include <assert.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <string.h> /* memset(3) et. al */
+#include <stdio.h> /* printf(3) */
+#include <stdlib.h> /* malloc(3) */
+#include <stdarg.h>
+#include <stddef.h>
+
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
+
+#define UVM_HOTPLUG /* Enable hotplug with rbtree. */
+#define PMAP_STEAL_MEMORY
+#define DEBUG /* Enable debug functionality. */
+
+typedef unsigned long vaddr_t;
+typedef unsigned long paddr_t;
+typedef unsigned long psize_t;
+typedef unsigned long vsize_t;
+
+#include <uvm/uvm_physseg.h>
+#include <uvm/uvm_page.h>
+
+#ifndef DIAGNOSTIC
+#define KASSERTMSG(e, msg, ...) /* NOTHING */
+#define KASSERT(e) /* NOTHING */
+#else
+#define KASSERT(a) assert(a)
+#define KASSERTMSG(exp, ...) printf(__VA_ARGS__); assert((exp))
+#endif
+
+#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
+
+#define VM_NFREELIST 4
+#define VM_FREELIST_DEFAULT 0
+#define VM_FREELIST_FIRST16 3
+#define VM_FREELIST_FIRST1G 2
+#define VM_FREELIST_FIRST4G 1
+
+/*
+ * Used in tests when Array implementation is tested
+ */
+#if !defined(VM_PHYSSEG_MAX)
+#define VM_PHYSSEG_MAX 1
+#endif
+
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (1 << PAGE_SHIFT)
+#define PAGE_MASK (PAGE_SIZE - 1)
+#define atop(x) (((paddr_t)(x)) >> PAGE_SHIFT)
+#define ptoa(x) (((paddr_t)(x)) << PAGE_SHIFT)
+
+#define mutex_enter(l)
+#define mutex_exit(l)
+
+psize_t physmem;
+
+struct uvmexp uvmexp; /* decl */
+
+/*
+ * uvm structure borrowed from uvm.h
+ *
+ * Remember this is a dummy structure used within the ATF Tests and
+ * uses only necessary fields from the original uvm struct.
+ * See uvm/uvm.h for the full struct.
+ */
+
+struct uvm {
+ /* vm_page related parameters */
+
+ bool page_init_done; /* TRUE if uvm_page_init() finished */
+} uvm;
+
+#include <sys/kmem.h>
+
+void *
+kmem_alloc(size_t size, km_flag_t flags)
+{
+ return malloc(size);
+}
+
+void *
+kmem_zalloc(size_t size, km_flag_t flags)
+{
+ void *ptr;
+ ptr = malloc(size);
+
+ memset(ptr, 0, size);
+
+ return ptr;
+}
+
+void
+kmem_free(void *mem, size_t size)
+{
+ free(mem);
+}
+
+static void
+panic(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ printf("\n");
+ va_end(ap);
+ KASSERT(false);
+
+ /*NOTREACHED*/
+}
+
+static void
+uvm_pagefree(struct vm_page *pg)
+{
+ return;
+}
+
+#if defined(UVM_HOTPLUG)
+static void
+uvmpdpol_reinit(void)
+{
+ return;
+}
+#endif /* UVM_HOTPLUG */
+
+/* end - Provide Kernel API equivalents */
+
+
+#include "uvm/uvm_physseg.c"
+
+#include <atf-c.h>
+
+#define SIXTYFOUR_KILO (64 * 1024)
+#define ONETWENTYEIGHT_KILO (128 * 1024)
+#define TWOFIFTYSIX_KILO (256 * 1024)
+#define FIVEONETWO_KILO (512 * 1024)
+#define ONE_MEGABYTE (1024 * 1024)
+#define TWO_MEGABYTE (2 * 1024 * 1024)
+
+/* Sample Page Frame Numbers */
+#define VALID_START_PFN_1 atop(0)
+#define VALID_END_PFN_1 atop(ONE_MEGABYTE)
+#define VALID_AVAIL_START_PFN_1 atop(0)
+#define VALID_AVAIL_END_PFN_1 atop(ONE_MEGABYTE)
+
+#define VALID_START_PFN_2 atop(ONE_MEGABYTE + 1)
+#define VALID_END_PFN_2 atop(ONE_MEGABYTE * 2)
+#define VALID_AVAIL_START_PFN_2 atop(ONE_MEGABYTE + 1)
+#define VALID_AVAIL_END_PFN_2 atop(ONE_MEGABYTE * 2)
+
+#define VALID_START_PFN_3 atop((ONE_MEGABYTE * 2) + 1)
+#define VALID_END_PFN_3 atop(ONE_MEGABYTE * 3)
+#define VALID_AVAIL_START_PFN_3 atop((ONE_MEGABYTE * 2) + 1)
+#define VALID_AVAIL_END_PFN_3 atop(ONE_MEGABYTE * 3)
+
+#define VALID_START_PFN_4 atop((ONE_MEGABYTE * 3) + 1)
+#define VALID_END_PFN_4 atop(ONE_MEGABYTE * 4)
+#define VALID_AVAIL_START_PFN_4 atop((ONE_MEGABYTE * 3) + 1)
+#define VALID_AVAIL_END_PFN_4 atop(ONE_MEGABYTE * 4)
+
+/*
+ * Total number of pages (of 4K size each) should be 256 for 1MB of memory.
+ */
+#define PAGE_COUNT_1M 256
+
+/*
+ * A debug fucntion to print the content of upm.
+ */
+ static inline void
+ uvm_physseg_dump_seg(uvm_physseg_t upm)
+ {
+#if defined(DEBUG)
+ printf("%s: seg->start == %ld\n", __func__,
+ uvm_physseg_get_start(upm));
+ printf("%s: seg->end == %ld\n", __func__,
+ uvm_physseg_get_end(upm));
+ printf("%s: seg->avail_start == %ld\n", __func__,
+ uvm_physseg_get_avail_start(upm));
+ printf("%s: seg->avail_end == %ld\n", __func__,
+ uvm_physseg_get_avail_end(upm));
+
+ printf("====\n\n");
+#else
+ return;
+#endif /* DEBUG */
+ }
+
+/*
+ * Private accessor that gets the value of uvm_physseg_graph.nentries
+ */
+static int
+uvm_physseg_get_entries(void)
+{
+#if defined(UVM_HOTPLUG)
+ return uvm_physseg_graph.nentries;
+#else
+ return vm_nphysmem;
+#endif /* UVM_HOTPLUG */
+}
+
+#if !defined(UVM_HOTPLUG)
+static void *
+uvm_physseg_alloc(size_t sz)
+{
+ return &vm_physmem[vm_nphysseg++];
+}
+#endif
+
+/*
+ * Test Fixture SetUp().
+ */
+static void
+setup(void)
+{
+ /* Prerequisites for running certain calls in uvm_physseg */
+ uvmexp.pagesize = PAGE_SIZE;
+ uvmexp.npages = 0;
+ uvm.page_init_done = false;
+ uvm_physseg_init();
+}
+
+
+/* <---- Tests for Internal functions ----> */
+#if defined(UVM_HOTPLUG)
+ATF_TC(uvm_physseg_alloc_atboot_mismatch);
+ATF_TC_HEAD(uvm_physseg_alloc_atboot_mismatch, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "boot time uvm_physseg_alloc() sanity"
+ "size mismatch alloc() test.");
+}
+
+ATF_TC_BODY(uvm_physseg_alloc_atboot_mismatch, tc)
+{
+ uvm.page_init_done = false;
+
+ atf_tc_expect_signal(SIGABRT, "size mismatch alloc()");
+
+ uvm_physseg_alloc(sizeof(struct uvm_physseg) - 1);
+}
+
+ATF_TC(uvm_physseg_alloc_atboot_overrun);
+ATF_TC_HEAD(uvm_physseg_alloc_atboot_overrun, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "boot time uvm_physseg_alloc() sanity"
+ "array overrun alloc() test.");
+}
+
+ATF_TC_BODY(uvm_physseg_alloc_atboot_overrun, tc)
+{
+ uvm.page_init_done = false;
+
+ atf_tc_expect_signal(SIGABRT, "array overrun alloc()");
+
+ uvm_physseg_alloc((VM_PHYSSEG_MAX + 1) * sizeof(struct uvm_physseg));
+
+}
+
+ATF_TC(uvm_physseg_alloc_sanity);
+ATF_TC_HEAD(uvm_physseg_alloc_sanity, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "further uvm_physseg_alloc() sanity checks");
+}
+
+ATF_TC_BODY(uvm_physseg_alloc_sanity, tc)
+{
+
+ /* At boot time */
+ uvm.page_init_done = false;
+
+ /* Correct alloc */
+ ATF_REQUIRE(uvm_physseg_alloc(VM_PHYSSEG_MAX * sizeof(struct uvm_physseg)));
+
+ /* Retry static alloc()s as dynamic - we expect them to pass */
+ uvm.page_init_done = true;
+ ATF_REQUIRE(uvm_physseg_alloc(sizeof(struct uvm_physseg) - 1));
+ ATF_REQUIRE(uvm_physseg_alloc(2 * VM_PHYSSEG_MAX * sizeof(struct uvm_physseg)));
+}
+
+ATF_TC(uvm_physseg_free_atboot_mismatch);
+ATF_TC_HEAD(uvm_physseg_free_atboot_mismatch, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "boot time uvm_physseg_free() sanity"
+ "size mismatch free() test.");
+}
+
+ATF_TC_BODY(uvm_physseg_free_atboot_mismatch, tc)
+{
+ uvm.page_init_done = false;
+
+ atf_tc_expect_signal(SIGABRT, "size mismatch free()");
+
+ uvm_physseg_free(&uvm_physseg[0], sizeof(struct uvm_physseg) - 1);
+}
+
+ATF_TC(uvm_physseg_free_sanity);
+ATF_TC_HEAD(uvm_physseg_free_sanity, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "further uvm_physseg_free() sanity checks");
+}
+
+ATF_TC_BODY(uvm_physseg_free_sanity, tc)
+{
+
+ /* At boot time */
+ uvm.page_init_done = false;
+
+ struct uvm_physseg *seg;
+
+#if VM_PHYSSEG_MAX > 1
+ /*
+ * Note: free()ing the entire array is considered to be an
+ * error. Thus VM_PHYSSEG_MAX - 1.
+ */
+
+ seg = uvm_physseg_alloc((VM_PHYSSEG_MAX - 1) * sizeof(*seg));
+ uvm_physseg_free(seg, (VM_PHYSSEG_MAX - 1) * sizeof(struct uvm_physseg));
+#endif
+
+ /* Retry static alloc()s as dynamic - we expect them to pass */
+ uvm.page_init_done = true;
+
+ seg = uvm_physseg_alloc(sizeof(struct uvm_physseg) - 1);
+ uvm_physseg_free(seg, sizeof(struct uvm_physseg) - 1);
+
+ seg = uvm_physseg_alloc(2 * VM_PHYSSEG_MAX * sizeof(struct uvm_physseg));
+
+ uvm_physseg_free(seg, 2 * VM_PHYSSEG_MAX * sizeof(struct uvm_physseg));
+}
+
+#if VM_PHYSSEG_MAX > 1
+ATF_TC(uvm_physseg_atboot_free_leak);
+ATF_TC_HEAD(uvm_physseg_atboot_free_leak, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "does free() leak at boot ?\n"
+ "This test needs VM_PHYSSEG_MAX > 1)");
+}
+
+ATF_TC_BODY(uvm_physseg_atboot_free_leak, tc)
+{
+
+ /* At boot time */
+ uvm.page_init_done = false;
+
+ /* alloc to array size */
+ struct uvm_physseg *seg;
+ seg = uvm_physseg_alloc(VM_PHYSSEG_MAX * sizeof(*seg));
+
+ uvm_physseg_free(seg, sizeof(*seg));
+
+ atf_tc_expect_signal(SIGABRT, "array overrun on alloc() after leak");
+
+ ATF_REQUIRE(uvm_physseg_alloc(sizeof(struct uvm_physseg)));
+}
+#endif /* VM_PHYSSEG_MAX */
+#endif /* UVM_HOTPLUG */
+
+/*
+ * Note: This function replicates verbatim what happens in
+ * uvm_page.c:uvm_page_init().
+ *
+ * Please track any changes that happen there.
+ */
+static void
+uvm_page_init_fake(struct vm_page *pagearray, psize_t pagecount)
+{
+ uvm_physseg_t bank;
+ size_t n;
+
+ for (bank = uvm_physseg_get_first(),
+ uvm_physseg_seg_chomp_slab(bank, pagearray, pagecount);
+ uvm_physseg_valid_p(bank);
+ bank = uvm_physseg_get_next(bank)) {
+
+ n = uvm_physseg_get_end(bank) - uvm_physseg_get_start(bank);
+ uvm_physseg_seg_alloc_from_slab(bank, n);
+ uvm_physseg_init_seg(bank, pagearray);
+
+ /* set up page array pointers */
+ pagearray += n;
+ pagecount -= n;
+ }
+
+ uvm.page_init_done = true;
+}
+
+ATF_TC(uvm_physseg_plug);
+ATF_TC_HEAD(uvm_physseg_plug, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Test plug functionality.");
+}
+/* Note: We only do the second boot time plug if VM_PHYSSEG_MAX > 1 */
+ATF_TC_BODY(uvm_physseg_plug, tc)
+{
+ int nentries = 0; /* Count of entries via plug done so far */
+ uvm_physseg_t upm1;
+#if VM_PHYSSEG_MAX > 2
+ uvm_physseg_t upm2;
+#endif
+
+#if VM_PHYSSEG_MAX > 1
+ uvm_physseg_t upm3;
+#endif
+ uvm_physseg_t upm4;
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+ psize_t npages2 = (VALID_END_PFN_2 - VALID_START_PFN_2);
+ psize_t npages3 = (VALID_END_PFN_3 - VALID_START_PFN_3);
+ psize_t npages4 = (VALID_END_PFN_4 - VALID_START_PFN_4);
+ struct vm_page *pgs, *slab = malloc(sizeof(struct vm_page) * (npages1
+#if VM_PHYSSEG_MAX > 2
+ + npages2
+#endif
+ + npages3));
+
+ /* Fake early boot */
+
+ setup();
+
+ /* Vanilla plug x 2 */
+ ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_1, npages1, &upm1), true);
+ ATF_REQUIRE_EQ(++nentries, uvm_physseg_get_entries());
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+#if VM_PHYSSEG_MAX > 2
+ ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_2, npages2, &upm2), true);
+ ATF_REQUIRE_EQ(++nentries, uvm_physseg_get_entries());
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+#endif
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2 + npages3);
+
+ ATF_CHECK_EQ(npages1
+#if VM_PHYSSEG_MAX > 2
+ + npages2
+#endif
+ , uvmexp.npages);
+#if VM_PHYSSEG_MAX > 1
+ /* Scavenge plug - goes into the same slab */
+ ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_3, npages3, &upm3), true);
+ ATF_REQUIRE_EQ(++nentries, uvm_physseg_get_entries());
+ ATF_REQUIRE_EQ(npages1
+#if VM_PHYSSEG_MAX > 2
+ + npages2
+#endif
+ + npages3, uvmexp.npages);
+
+ /* Scavenge plug should fit right in the slab */
+ pgs = uvm_physseg_get_pg(upm3, 0);
+ ATF_REQUIRE(pgs > slab && pgs < (slab + npages1 + npages2 + npages3));
+#endif
+ /* Hot plug - goes into a brand new slab */
+ ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_4, npages4, &upm4), true);
+ /* The hot plug slab should have nothing to do with the original slab */
+ pgs = uvm_physseg_get_pg(upm4, 0);
+ ATF_REQUIRE(pgs < slab || pgs > (slab + npages1
+#if VM_PHYSSEG_MAX > 2
+ + npages2
+#endif
+ + npages3));
+
+}
+ATF_TC(uvm_physseg_unplug);
+ATF_TC_HEAD(uvm_physseg_unplug, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Test unplug functionality.");
+}
+ATF_TC_BODY(uvm_physseg_unplug, tc)
+{
+ paddr_t pa = 0;
+
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+ psize_t npages2 = (VALID_END_PFN_2 - VALID_START_PFN_2);
+ psize_t npages3 = (VALID_END_PFN_3 - VALID_START_PFN_3);
+
+ struct vm_page *slab = malloc(sizeof(struct vm_page) * (npages1 + npages2 + npages3));
+
+ uvm_physseg_t upm;
+
+ /* Boot time */
+ setup();
+
+ /* We start with zero segments */
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(atop(0), atop(ONE_MEGABYTE), NULL));
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+ /* Do we have an arbitrary offset in there ? */
+ uvm_physseg_find(atop(TWOFIFTYSIX_KILO), &pa);
+ ATF_REQUIRE_EQ(pa, atop(TWOFIFTYSIX_KILO));
+ ATF_REQUIRE_EQ(0, uvmexp.npages); /* Boot time sanity */
+
+#if VM_PHYSSEG_MAX == 1
+ /*
+ * This is the curious case at boot time, of having one
+ * extent(9) static entry per segment, which means that a
+ * fragmenting unplug will fail.
+ */
+ atf_tc_expect_signal(SIGABRT, "fragmenting unplug for single segment");
+
+ /*
+ * In order to test the fragmenting cases, please set
+ * VM_PHYSSEG_MAX > 1
+ */
+#endif
+ /* Now let's unplug from the middle */
+ ATF_REQUIRE_EQ(true, uvm_physseg_unplug(atop(TWOFIFTYSIX_KILO), atop(FIVEONETWO_KILO)));
+ /* verify that a gap exists at TWOFIFTYSIX_KILO */
+ pa = 0; /* reset */
+ uvm_physseg_find(atop(TWOFIFTYSIX_KILO), &pa);
+ ATF_REQUIRE_EQ(pa, 0);
+
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2 + npages3);
+ /* Account for the unplug */
+ ATF_CHECK_EQ(atop(FIVEONETWO_KILO), uvmexp.npages);
+
+ /* Original entry should fragment into two */
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ upm = uvm_physseg_find(atop(TWOFIFTYSIX_KILO + FIVEONETWO_KILO), NULL);
+
+ ATF_REQUIRE(uvm_physseg_valid_p(upm));
+
+ /* Now unplug the tail fragment - should swallow the complete entry */
+ ATF_REQUIRE_EQ(true, uvm_physseg_unplug(atop(TWOFIFTYSIX_KILO + FIVEONETWO_KILO), atop(TWOFIFTYSIX_KILO)));
+
+ /* The "swallow" above should have invalidated the handle */
+ ATF_REQUIRE_EQ(false, uvm_physseg_valid_p(upm));
+
+ /* Only the first one is left now */
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Unplug from the back */
+ ATF_REQUIRE_EQ(true, uvm_physseg_unplug(atop(ONETWENTYEIGHT_KILO), atop(ONETWENTYEIGHT_KILO)));
+ /* Shouldn't change the number of segments */
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Unplug from the front */
+ ATF_REQUIRE_EQ(true, uvm_physseg_unplug(0, atop(SIXTYFOUR_KILO)));
+ /* Shouldn't change the number of segments */
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Unplugging the final fragment should fail */
+ atf_tc_expect_signal(SIGABRT, "Unplugging the last segment");
+ ATF_REQUIRE_EQ(true, uvm_physseg_unplug(atop(SIXTYFOUR_KILO), atop(SIXTYFOUR_KILO)));
+}
+
+
+/* <---- end Tests for Internal functions ----> */
+
+/* Tests for functions exported via uvm_physseg.h */
+ATF_TC(uvm_physseg_init);
+ATF_TC_HEAD(uvm_physseg_init, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_init() call\
+ initializes the vm_physmem struct which holds the rb_tree.");
+}
+ATF_TC_BODY(uvm_physseg_init, tc)
+{
+ uvm_physseg_init();
+
+ ATF_REQUIRE_EQ(0, uvm_physseg_get_entries());
+}
+
+ATF_TC(uvm_page_physload_preload);
+ATF_TC_HEAD(uvm_page_physload_preload, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_physload() \
+ call works without a panic() in a preload scenario.");
+}
+ATF_TC_BODY(uvm_page_physload_preload, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Should return a valid handle */
+ ATF_REQUIRE(uvm_physseg_valid_p(upm));
+
+ /* No pages should be allocated yet */
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* After the first call one segment should exist */
+ ATF_CHECK_EQ(1, uvm_physseg_get_entries());
+
+ /* Insert more than one segment iff VM_PHYSSEG_MAX > 1 */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ /* Should return a valid handle */
+ ATF_REQUIRE(uvm_physseg_valid_p(upm));
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* After the second call two segments should exist */
+ ATF_CHECK_EQ(2, uvm_physseg_get_entries());
+#endif
+}
+
+ATF_TC(uvm_page_physload_postboot);
+ATF_TC_HEAD(uvm_page_physload_postboot, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_physload() \
+ panic()s in a post boot scenario.");
+}
+ATF_TC_BODY(uvm_page_physload_postboot, tc)
+{
+ uvm_physseg_t upm;
+
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+ psize_t npages2 = (VALID_END_PFN_2 - VALID_START_PFN_2);
+
+ struct vm_page *slab = malloc(sizeof(struct vm_page) * (npages1 + npages2));
+
+ setup();
+
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Should return a valid handle */
+ ATF_REQUIRE(uvm_physseg_valid_p(upm));
+
+ /* No pages should be allocated yet */
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* After the first call one segment should exist */
+ ATF_CHECK_EQ(1, uvm_physseg_get_entries());
+
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2);
+
+ atf_tc_expect_signal(SIGABRT,
+ "uvm_page_physload() called post boot");
+
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ /* Should return a valid handle */
+ ATF_REQUIRE(uvm_physseg_valid_p(upm));
+
+ ATF_REQUIRE_EQ(npages1 + npages2, uvmexp.npages);
+
+ /* After the second call two segments should exist */
+ ATF_CHECK_EQ(2, uvm_physseg_get_entries());
+}
+
+ATF_TC(uvm_physseg_handle_immutable);
+ATF_TC_HEAD(uvm_physseg_handle_immutable, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the uvm_physseg_t handle is \
+ immutable.");
+}
+ATF_TC_BODY(uvm_physseg_handle_immutable, tc)
+{
+ uvm_physseg_t upm;
+
+ /* We insert the segments in out of order */
+
+ setup();
+
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID_EMPTY, uvm_physseg_get_prev(upm));
+
+ /* Insert more than one segment iff VM_PHYSSEG_MAX > 1 */
+#if VM_PHYSSEG_MAX > 1
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ /* Fetch Previous, we inserted a lower value */
+ upm = uvm_physseg_get_prev(upm);
+
+#if !defined(UVM_HOTPLUG)
+ /*
+ * This test is going to fail for the Array Implementation but is
+ * expected to pass in the RB Tree implementation.
+ */
+ /* Failure can be expected iff there are more than one handles */
+ atf_tc_expect_fail("Mutable handle in static array impl.");
+#endif
+ ATF_CHECK(UVM_PHYSSEG_TYPE_INVALID_EMPTY != upm);
+ ATF_CHECK_EQ(VALID_START_PFN_1, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_1, uvm_physseg_get_end(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_seg_chomp_slab);
+ATF_TC_HEAD(uvm_physseg_seg_chomp_slab, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "The slab import code.()");
+
+}
+ATF_TC_BODY(uvm_physseg_seg_chomp_slab, tc)
+{
+ int err;
+ size_t i;
+ struct uvm_physseg *seg;
+ struct vm_page *slab, *pgs;
+ const size_t npages = UVM_PHYSSEG_BOOT_UNPLUG_MAX; /* Number of pages */
+
+ setup();
+
+ /* This is boot time */
+ slab = malloc(sizeof(struct vm_page) * npages * 2);
+
+ seg = uvm_physseg_alloc(sizeof(struct uvm_physseg));
+
+ uvm_physseg_seg_chomp_slab(PHYSSEG_NODE_TO_HANDLE(seg), slab, npages * 2);
+
+ /* Should be able to allocate two 128 * sizeof(*slab) */
+ ATF_REQUIRE_EQ(0, extent_alloc(seg->ext, sizeof(*slab), 1, 0, EX_BOUNDZERO, (void *)&pgs));
+ err = extent_free(seg->ext, (u_long) pgs, sizeof(*slab), EX_BOUNDZERO);
+
+#if VM_PHYSSEG_MAX == 1
+ /*
+ * free() needs an extra region descriptor, but we only have
+ * one! The classic alloc() at free() problem
+ */
+
+ ATF_REQUIRE_EQ(ENOMEM, err);
+#else
+ /* Try alloc/free at static time */
+ for (i = 0; i < npages; i++) {
+ ATF_REQUIRE_EQ(0, extent_alloc(seg->ext, sizeof(*slab), 1, 0, EX_BOUNDZERO, (void *)&pgs));
+ err = extent_free(seg->ext, (u_long) pgs, sizeof(*slab), EX_BOUNDZERO);
+ ATF_REQUIRE_EQ(0, err);
+ }
+#endif
+
+ /* Now setup post boot */
+ uvm.page_init_done = true;
+
+ uvm_physseg_seg_chomp_slab(PHYSSEG_NODE_TO_HANDLE(seg), slab, npages * 2);
+
+ /* Try alloc/free after uvm_page.c:uvm_page_init() as well */
+ for (i = 0; i < npages; i++) {
+ ATF_REQUIRE_EQ(0, extent_alloc(seg->ext, sizeof(*slab), 1, 0, EX_BOUNDZERO, (void *)&pgs));
+ err = extent_free(seg->ext, (u_long) pgs, sizeof(*slab), EX_BOUNDZERO);
+ ATF_REQUIRE_EQ(0, err);
+ }
+
+}
+
+ATF_TC(uvm_physseg_alloc_from_slab);
+ATF_TC_HEAD(uvm_physseg_alloc_from_slab, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "The slab alloc code.()");
+
+}
+ATF_TC_BODY(uvm_physseg_alloc_from_slab, tc)
+{
+ struct uvm_physseg *seg;
+ struct vm_page *slab, *pgs;
+ const size_t npages = UVM_PHYSSEG_BOOT_UNPLUG_MAX; /* Number of pages */
+
+ setup();
+
+ /* This is boot time */
+ slab = malloc(sizeof(struct vm_page) * npages * 2);
+
+ seg = uvm_physseg_alloc(sizeof(struct uvm_physseg));
+
+ uvm_physseg_seg_chomp_slab(PHYSSEG_NODE_TO_HANDLE(seg), slab, npages * 2);
+
+ pgs = uvm_physseg_seg_alloc_from_slab(PHYSSEG_NODE_TO_HANDLE(seg), npages);
+
+ ATF_REQUIRE(pgs != NULL);
+
+ /* Now setup post boot */
+ uvm.page_init_done = true;
+
+#if VM_PHYSSEG_MAX > 1
+ pgs = uvm_physseg_seg_alloc_from_slab(PHYSSEG_NODE_TO_HANDLE(seg), npages);
+ ATF_REQUIRE(pgs != NULL);
+#endif
+ atf_tc_expect_fail("alloc beyond extent");
+
+ pgs = uvm_physseg_seg_alloc_from_slab(PHYSSEG_NODE_TO_HANDLE(seg), npages);
+ ATF_REQUIRE(pgs != NULL);
+}
+
+ATF_TC(uvm_physseg_init_seg);
+ATF_TC_HEAD(uvm_physseg_init_seg, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if uvm_physseg_init_seg adds pages to"
+ "uvmexp.npages");
+}
+ATF_TC_BODY(uvm_physseg_init_seg, tc)
+{
+ struct uvm_physseg *seg;
+ struct vm_page *slab, *pgs;
+ const size_t npages = UVM_PHYSSEG_BOOT_UNPLUG_MAX; /* Number of pages */
+
+ setup();
+
+ /* This is boot time */
+ slab = malloc(sizeof(struct vm_page) * npages * 2);
+
+ seg = uvm_physseg_alloc(sizeof(struct uvm_physseg));
+
+ uvm_physseg_seg_chomp_slab(PHYSSEG_NODE_TO_HANDLE(seg), slab, npages * 2);
+
+ pgs = uvm_physseg_seg_alloc_from_slab(PHYSSEG_NODE_TO_HANDLE(seg), npages);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ seg->start = 0;
+ seg->end = npages;
+
+ seg->avail_start = 0;
+ seg->avail_end = npages;
+
+ uvm_physseg_init_seg(PHYSSEG_NODE_TO_HANDLE(seg), pgs);
+
+ ATF_REQUIRE_EQ(npages, uvmexp.npages);
+}
+
+#if 0
+ATF_TC(uvm_physseg_init_seg);
+ATF_TC_HEAD(uvm_physseg_init_seg, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_physload() \
+ call works without a panic() after Segment is inited.");
+}
+ATF_TC_BODY(uvm_physseg_init_seg, tc)
+{
+ uvm_physseg_t upm;
+ psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1);
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(0, uvmexp.npages);
+
+ /*
+ * Boot time physplug needs explicit external init,
+ * Duplicate what uvm_page.c:uvm_page_init() does.
+ * Note: not everything uvm_page_init() does gets done here.
+ * Read the source.
+ */
+ /* suck in backing slab, initialise extent. */
+ uvm_physseg_seg_chomp_slab(upm, pgs, npages);
+
+ /*
+ * Actual pgs[] allocation, from extent.
+ */
+ uvm_physseg_alloc_from_slab(upm, npages);
+
+ /* Now we initialize the segment */
+ uvm_physseg_init_seg(upm, pgs);
+
+ /* Done with boot simulation */
+ extent_init();
+ uvm.page_init_done = true;
+
+ /* We have total memory of 1MB */
+ ATF_CHECK_EQ(PAGE_COUNT_1M, uvmexp.npages);
+
+ upm =uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ /* We added another 1MB so PAGE_COUNT_1M + PAGE_COUNT_1M */
+ ATF_CHECK_EQ(PAGE_COUNT_1M + PAGE_COUNT_1M, uvmexp.npages);
+
+}
+#endif
+
+ATF_TC(uvm_physseg_get_start);
+ATF_TC_HEAD(uvm_physseg_get_start, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the start PFN is returned \
+ correctly from a segment created via uvm_page_physload().");
+}
+ATF_TC_BODY(uvm_physseg_get_start, tc)
+{
+ uvm_physseg_t upm;
+
+ /* Fake early boot */
+ setup();
+
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(VALID_START_PFN_1, uvm_physseg_get_start(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_start_invalid);
+ATF_TC_HEAD(uvm_physseg_get_start_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the invalid / error conditions \
+ correctly when uvm_physseg_get_start() is called with invalid \
+ parameter values.");
+}
+ATF_TC_BODY(uvm_physseg_get_start_invalid, tc)
+{
+ /* Check for pgs == NULL */
+ setup();
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Force other check conditions */
+ uvm.page_init_done = true;
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(true, uvm.page_init_done);
+
+ /* Invalid uvm_physseg_t */
+ ATF_CHECK_EQ((paddr_t) -1,
+ uvm_physseg_get_start(UVM_PHYSSEG_TYPE_INVALID));
+}
+
+ATF_TC(uvm_physseg_get_end);
+ATF_TC_HEAD(uvm_physseg_get_end, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the end PFN is returned \
+ correctly from a segment created via uvm_page_physload().");
+}
+ATF_TC_BODY(uvm_physseg_get_end, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(VALID_END_PFN_1, uvm_physseg_get_end(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_end_invalid);
+ATF_TC_HEAD(uvm_physseg_get_end_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the invalid / error conditions \
+ correctly when uvm_physseg_get_end() is called with invalid \
+ parameter values.");
+}
+ATF_TC_BODY(uvm_physseg_get_end_invalid, tc)
+{
+ /* Check for pgs == NULL */
+ setup();
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Force other check conditions */
+ uvm.page_init_done = true;
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(true, uvm.page_init_done);
+
+ /* Invalid uvm_physseg_t */
+ ATF_CHECK_EQ((paddr_t) -1,
+ uvm_physseg_get_end(UVM_PHYSSEG_TYPE_INVALID));
+}
+
+ATF_TC(uvm_physseg_get_avail_start);
+ATF_TC_HEAD(uvm_physseg_get_avail_start, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the avail_start PFN is \
+ returned correctly from a segment created via uvm_page_physload().");
+}
+ATF_TC_BODY(uvm_physseg_get_avail_start, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_1, uvm_physseg_get_avail_start(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2, uvm_physseg_get_avail_start(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_avail_start_invalid);
+ATF_TC_HEAD(uvm_physseg_get_avail_start_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the invalid / error conditions \
+ correctly when uvm_physseg_get_avail_start() is called with invalid\
+ parameter values.");
+}
+ATF_TC_BODY(uvm_physseg_get_avail_start_invalid, tc)
+{
+ /* Check for pgs == NULL */
+ setup();
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Force other check conditions */
+ uvm.page_init_done = true;
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(true, uvm.page_init_done);
+
+ /* Invalid uvm_physseg_t */
+ ATF_CHECK_EQ((paddr_t) -1,
+ uvm_physseg_get_avail_start(UVM_PHYSSEG_TYPE_INVALID));
+}
+
+ATF_TC(uvm_physseg_get_avail_end);
+ATF_TC_HEAD(uvm_physseg_get_avail_end, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the avail_end PFN is \
+ returned correctly from a segment created via uvm_page_physload().");
+}
+ATF_TC_BODY(uvm_physseg_get_avail_end, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_1, uvm_physseg_get_avail_end(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2, uvm_physseg_get_avail_end(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_avail_end_invalid);
+ATF_TC_HEAD(uvm_physseg_get_avail_end_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the invalid / error conditions \
+ correctly when uvm_physseg_get_avail_end() is called with invalid\
+ parameter values.");
+}
+ATF_TC_BODY(uvm_physseg_get_avail_end_invalid, tc)
+{
+ /* Check for pgs == NULL */
+ setup();
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Force other check conditions */
+ uvm.page_init_done = true;
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(true, uvm.page_init_done);
+
+ /* Invalid uvm_physseg_t */
+ ATF_CHECK_EQ((paddr_t) -1,
+ uvm_physseg_get_avail_end(UVM_PHYSSEG_TYPE_INVALID));
+}
+
+ATF_TC(uvm_physseg_get_next);
+ATF_TC_HEAD(uvm_physseg_get_next, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the pointer values for next \
+ segment using the uvm_physseg_get_next() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_next, tc)
+{
+ uvm_physseg_t upm;
+#if VM_PHYSSEG_MAX > 1
+ uvm_physseg_t upm_next;
+#endif
+
+ /* We insert the segments in ascending order */
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID_OVERFLOW,
+ uvm_physseg_get_next(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm_next = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ upm = uvm_physseg_get_next(upm); /* Fetch Next */
+
+ ATF_CHECK_EQ(upm_next, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+#endif
+
+ /* This test will be triggered only if there are 3 or more segments. */
+#if VM_PHYSSEG_MAX > 2
+ upm_next = uvm_page_physload(VALID_START_PFN_3, VALID_END_PFN_3,
+ VALID_AVAIL_START_PFN_3, VALID_AVAIL_END_PFN_3, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(3, uvm_physseg_get_entries());
+
+ upm = uvm_physseg_get_next(upm); /* Fetch Next */
+
+ ATF_CHECK_EQ(upm_next, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_3, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_3, uvm_physseg_get_end(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_next_invalid);
+ATF_TC_HEAD(uvm_physseg_get_next_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the invalid / error conditions \
+ correctly when uvm_physseg_get_next() is called with invalid \
+ parameter values.");
+}
+ATF_TC_BODY(uvm_physseg_get_next_invalid, tc)
+{
+ uvm_physseg_t upm = UVM_PHYSSEG_TYPE_INVALID;
+
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID, uvm_physseg_get_next(upm));
+}
+
+ATF_TC(uvm_physseg_get_prev);
+ATF_TC_HEAD(uvm_physseg_get_prev, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the pointer values for previous \
+ segment using the uvm_physseg_get_prev() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_prev, tc)
+{
+#if VM_PHYSSEG_MAX > 1
+ uvm_physseg_t upm;
+#endif
+ uvm_physseg_t upm_prev;
+
+
+ setup();
+ upm_prev = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID_EMPTY,
+ uvm_physseg_get_prev(upm_prev));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ /* Fetch Previous, we inserted a lower value */
+ upm = uvm_physseg_get_prev(upm);
+
+ ATF_CHECK_EQ(upm_prev, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_1, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_1, uvm_physseg_get_end(upm));
+#endif
+
+ /* This test will be triggered only if there are 3 or more segments. */
+#if VM_PHYSSEG_MAX > 2
+ uvm_page_physload(VALID_START_PFN_3, VALID_END_PFN_3,
+ VALID_AVAIL_START_PFN_3, VALID_AVAIL_END_PFN_3, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(3, uvm_physseg_get_entries());
+
+ /*
+ * This will return a UVM_PHYSSEG_TYPE_INVALID_EMPTY we are at the
+ * lowest
+ */
+ upm = uvm_physseg_get_prev(upm);
+
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID_EMPTY, upm);
+#endif
+}
+
+ATF_TC(uvm_physseg_get_prev_invalid);
+ATF_TC_HEAD(uvm_physseg_get_prev_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the invalid / error conditions \
+ correctly when uvm_physseg_get_prev() is called with invalid \
+ parameter values.");
+}
+ATF_TC_BODY(uvm_physseg_get_prev_invalid, tc)
+{
+ uvm_physseg_t upm = UVM_PHYSSEG_TYPE_INVALID;
+
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID, uvm_physseg_get_prev(upm));
+}
+
+ATF_TC(uvm_physseg_get_first);
+ATF_TC_HEAD(uvm_physseg_get_first, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the pointer values for first \
+ segment (lowest node) using the uvm_physseg_get_first() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_first, tc)
+{
+ uvm_physseg_t upm = UVM_PHYSSEG_TYPE_INVALID_EMPTY;
+ uvm_physseg_t upm_first;
+
+ /* Fake early boot */
+ setup();
+
+ /* No nodes exist */
+ ATF_CHECK_EQ(upm, uvm_physseg_get_first());
+
+ upm_first = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Pointer to first should be the least valued node */
+ upm = uvm_physseg_get_first();
+ ATF_CHECK_EQ(upm_first, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2, uvm_physseg_get_avail_end(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ /* Insert a node of lesser value */
+ upm_first = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_CHECK_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ /* Pointer to first should be the least valued node */
+ upm = uvm_physseg_get_first();
+ ATF_CHECK_EQ(upm_first, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_1, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_1, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_1, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_1, uvm_physseg_get_avail_end(upm));
+#endif
+
+ /* This test will be triggered only if there are 3 or more segments. */
+#if VM_PHYSSEG_MAX > 2
+ /* Insert a node of higher value */
+ upm_first =uvm_page_physload(VALID_START_PFN_3, VALID_END_PFN_3,
+ VALID_AVAIL_START_PFN_3, VALID_AVAIL_END_PFN_3, VM_FREELIST_DEFAULT);
+
+ ATF_CHECK_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(3, uvm_physseg_get_entries());
+
+ /* Pointer to first should be the least valued node */
+ upm = uvm_physseg_get_first();
+ ATF_CHECK(upm_first != upm);
+ ATF_CHECK_EQ(VALID_START_PFN_1, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_1, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_1, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_1, uvm_physseg_get_avail_end(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_last);
+ATF_TC_HEAD(uvm_physseg_get_last, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the pointer values for last \
+ segment using the uvm_physseg_get_last() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_last, tc)
+{
+ uvm_physseg_t upm = UVM_PHYSSEG_TYPE_INVALID_EMPTY;
+ uvm_physseg_t upm_last;
+
+ setup();
+
+ /* No nodes exist */
+ ATF_CHECK_EQ(upm, uvm_physseg_get_last());
+
+ upm_last = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Pointer to last should be the most valued node */
+ upm = uvm_physseg_get_last();
+ ATF_CHECK_EQ(upm_last, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_1, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_1, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_1, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_1, uvm_physseg_get_avail_end(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ /* Insert node of greater value */
+ upm_last = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ /* Pointer to last should be the most valued node */
+ upm = uvm_physseg_get_last();
+ ATF_CHECK_EQ(upm_last, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2, uvm_physseg_get_avail_end(upm));
+#endif
+
+ /* This test will be triggered only if there are 3 or more segments. */
+#if VM_PHYSSEG_MAX > 2
+ /* Insert node of greater value */
+ upm_last = uvm_page_physload(VALID_START_PFN_3, VALID_END_PFN_3,
+ VALID_AVAIL_START_PFN_3, VALID_AVAIL_END_PFN_3, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(3, uvm_physseg_get_entries());
+
+ /* Pointer to last should be the most valued node */
+ upm = uvm_physseg_get_last();
+ ATF_CHECK_EQ(upm_last, upm);
+ ATF_CHECK_EQ(VALID_START_PFN_3, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_3, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_3, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_3, uvm_physseg_get_avail_end(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_valid);
+ATF_TC_HEAD(uvm_physseg_valid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the pointer value for current \
+ segment is valid using the uvm_physseg_valid_p() call.");
+}
+ATF_TC_BODY(uvm_physseg_valid, tc)
+{
+ psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_REQUIRE_EQ(PAGE_COUNT_1M, uvmexp.npages);
+
+ ATF_CHECK_EQ(true, uvm_physseg_valid_p(upm));
+}
+
+ATF_TC(uvm_physseg_valid_invalid);
+ATF_TC_HEAD(uvm_physseg_valid_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the pointer value for current \
+ segment is invalid using the uvm_physseg_valid_p() call.");
+}
+ATF_TC_BODY(uvm_physseg_valid_invalid, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Force other check conditions */
+ uvm.page_init_done = true;
+
+ ATF_REQUIRE_EQ(true, uvm.page_init_done);
+
+ /* Invalid uvm_physseg_t */
+ ATF_CHECK_EQ(false, uvm_physseg_valid_p(UVM_PHYSSEG_TYPE_INVALID));
+
+ /*
+ * Without any pages initialized for segment, it is considered
+ * invalid
+ */
+ ATF_CHECK_EQ(false, uvm_physseg_valid_p(upm));
+}
+
+ATF_TC(uvm_physseg_get_highest);
+ATF_TC_HEAD(uvm_physseg_get_highest, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned PFN matches \
+ the highest PFN in use by the system.");
+}
+ATF_TC_BODY(uvm_physseg_get_highest, tc)
+{
+ setup();
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Only one segment so highest is the current */
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_1 - 1, uvm_physseg_get_highest_frame());
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ uvm_page_physload(VALID_START_PFN_3, VALID_END_PFN_3,
+ VALID_AVAIL_START_PFN_3, VALID_AVAIL_END_PFN_3, VM_FREELIST_DEFAULT);
+
+ /* PFN_3 > PFN_1 */
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_3 - 1, uvm_physseg_get_highest_frame());
+#endif
+
+ /* This test will be triggered only if there are 3 or more segments. */
+#if VM_PHYSSEG_MAX > 2
+ uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ /* PFN_3 > PFN_2 */
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_3 - 1, uvm_physseg_get_highest_frame());
+#endif
+}
+
+ATF_TC(uvm_physseg_get_free_list);
+ATF_TC_HEAD(uvm_physseg_get_free_list, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned Free List type \
+ of a segment matches the one returned from \
+ uvm_physseg_get_free_list() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_free_list, tc)
+{
+ uvm_physseg_t upm;
+
+ /* Fake early boot */
+ setup();
+
+ /* Insertions are made in ascending order */
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_CHECK_EQ(VM_FREELIST_DEFAULT, uvm_physseg_get_free_list(upm));
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_FIRST16);
+
+ ATF_CHECK_EQ(VM_FREELIST_FIRST16, uvm_physseg_get_free_list(upm));
+#endif
+
+ /* This test will be triggered only if there are 3 or more segments. */
+#if VM_PHYSSEG_MAX > 2
+ upm = uvm_page_physload(VALID_START_PFN_3, VALID_END_PFN_3,
+ VALID_AVAIL_START_PFN_3, VALID_AVAIL_END_PFN_3, VM_FREELIST_FIRST1G);
+
+ ATF_CHECK_EQ(VM_FREELIST_FIRST1G, uvm_physseg_get_free_list(upm));
+#endif
+}
+
+ATF_TC(uvm_physseg_get_start_hint);
+ATF_TC_HEAD(uvm_physseg_get_start_hint, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned start_hint value \
+ of a segment matches the one returned from \
+ uvm_physseg_get_start_hint() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_start_hint, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Will be Zero since no specific value is set during init */
+ ATF_CHECK_EQ(0, uvm_physseg_get_start_hint(upm));
+}
+
+ATF_TC(uvm_physseg_set_start_hint);
+ATF_TC_HEAD(uvm_physseg_set_start_hint, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned start_hint value \
+ of a segment matches the one set by the \
+ uvm_physseg_set_start_hint() call.");
+}
+ATF_TC_BODY(uvm_physseg_set_start_hint, tc)
+{
+ psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_CHECK_EQ(true, uvm_physseg_set_start_hint(upm, atop(128)));
+
+ /* Will be atop(128) since no specific value is set above */
+ ATF_CHECK_EQ(atop(128), uvm_physseg_get_start_hint(upm));
+}
+
+ATF_TC(uvm_physseg_set_start_hint_invalid);
+ATF_TC_HEAD(uvm_physseg_set_start_hint_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned value is false \
+ when an invalid segment matches the one trying to set by the \
+ uvm_physseg_set_start_hint() call.");
+}
+ATF_TC_BODY(uvm_physseg_set_start_hint_invalid, tc)
+{
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ /* Force other check conditions */
+ uvm.page_init_done = true;
+
+ ATF_REQUIRE_EQ(true, uvm.page_init_done);
+
+ ATF_CHECK_EQ(false, uvm_physseg_set_start_hint(upm, atop(128)));
+
+ /*
+ * Will be Zero since no specific value is set after the init
+ * due to failure
+ */
+ atf_tc_expect_signal(SIGABRT, "invalid uvm_physseg_t handle");
+
+ ATF_CHECK_EQ(0, uvm_physseg_get_start_hint(upm));
+}
+
+ATF_TC(uvm_physseg_get_pg);
+ATF_TC_HEAD(uvm_physseg_get_pg, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned vm_page struct \
+ is correct when fetched by uvm_physseg_get_pg() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_pg, tc)
+{
+ psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ struct vm_page *extracted_pg = NULL;
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* Now we initialize the segment */
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_REQUIRE_EQ(PAGE_COUNT_1M, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(NULL, extracted_pg);
+
+ /* Try fetching the 5th Page in the Segment */
+ extracted_pg = uvm_physseg_get_pg(upm, 5);
+
+ /* Values of phys_addr is n * PAGE_SIZE where n is the page number */
+ ATF_CHECK_EQ(5 * PAGE_SIZE, extracted_pg->phys_addr);
+
+ /* Try fetching the 113th Page in the Segment */
+ extracted_pg = uvm_physseg_get_pg(upm, 113);
+
+ ATF_CHECK_EQ(113 * PAGE_SIZE, extracted_pg->phys_addr);
+}
+
+#ifdef __HAVE_PMAP_PHYSSEG
+ATF_TC(uvm_physseg_get_pmseg);
+ATF_TC_HEAD(uvm_physseg_get_pmseg, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned pmap_physseg \
+ struct is correct when fetched by uvm_physseg_get_pmseg() call.");
+}
+ATF_TC_BODY(uvm_physseg_get_pmseg, tc)
+{
+ psize_t npages = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ struct pmap_physseg pmseg = { true };
+
+ struct pmap_physseg *extracted_pmseg = NULL;
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* Now we initialize the segment */
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_REQUIRE_EQ(PAGE_COUNT_1M, uvmexp.npages);
+
+ ATF_REQUIRE_EQ(NULL, extracted_pmseg);
+
+ ATF_REQUIRE_EQ(true, pmseg.dummy_variable);
+
+ /* Extract the current pmseg */
+ extracted_pmseg = uvm_physseg_get_pmseg(upm);
+
+ /*
+ * We can only check if it is not NULL
+ * We do not know the value it contains
+ */
+ ATF_CHECK(NULL != extracted_pmseg);
+
+ extracted_pmseg->dummy_variable = pmseg.dummy_variable;
+
+ /* Invert value to ensure test integrity */
+ pmseg.dummy_variable = false;
+
+ ATF_REQUIRE_EQ(false, pmseg.dummy_variable);
+
+ extracted_pmseg = uvm_physseg_get_pmseg(upm);
+
+ ATF_CHECK(NULL != extracted_pmseg);
+
+ ATF_CHECK_EQ(true, extracted_pmseg->dummy_variable);
+}
+#endif
+
+ATF_TC(vm_physseg_find);
+ATF_TC_HEAD(vm_physseg_find, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned segment number \
+ is correct when an PFN is passed into uvm_physseg_find() call. \
+ In addition to this the offset of the PFN from the start of \
+ segment is also set if the parameter is passed in as not NULL.");
+}
+ATF_TC_BODY(vm_physseg_find, tc)
+{
+ psize_t offset = (psize_t) -1;
+
+ uvm_physseg_t upm_first, result;
+#if VM_PHYSSEG_MAX > 1
+ uvm_physseg_t upm_second;
+#endif
+
+ setup();
+
+ upm_first = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ upm_second = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+#endif
+
+ /* Under ONE_MEGABYTE is segment upm_first */
+ result = uvm_physseg_find(atop(ONE_MEGABYTE - 1024), NULL);
+ ATF_CHECK_EQ(upm_first, result);
+ ATF_CHECK_EQ(uvm_physseg_get_start(upm_first),
+ uvm_physseg_get_start(result));
+ ATF_CHECK_EQ(uvm_physseg_get_end(upm_first),
+ uvm_physseg_get_end(result));
+ ATF_CHECK_EQ(uvm_physseg_get_avail_start(upm_first),
+ uvm_physseg_get_avail_start(result));
+ ATF_CHECK_EQ(uvm_physseg_get_avail_end(upm_first),
+ uvm_physseg_get_avail_end(result));
+
+ ATF_REQUIRE_EQ((psize_t) -1, offset);
+
+ /* This test will be triggered only if there are 2 or more segments. */
+#if VM_PHYSSEG_MAX > 1
+ /* Over ONE_MEGABYTE is segment upm_second */
+ result = uvm_physseg_find(atop(ONE_MEGABYTE + 8192), &offset);
+ ATF_CHECK_EQ(upm_second, result);
+ ATF_CHECK_EQ(uvm_physseg_get_start(upm_second),
+ uvm_physseg_get_start(result));
+ ATF_CHECK_EQ(uvm_physseg_get_end(upm_second),
+ uvm_physseg_get_end(result));
+ ATF_CHECK_EQ(uvm_physseg_get_avail_start(upm_second),
+ uvm_physseg_get_avail_start(result));
+ ATF_CHECK_EQ(uvm_physseg_get_avail_end(upm_second),
+ uvm_physseg_get_avail_end(result));
+
+ /* Offset is calculated based on PAGE_SIZE */
+ /* atop(ONE_MEGABYTE + (2 * PAGE_SIZE)) - VALID_START_PFN1 = 2 */
+ ATF_CHECK_EQ(2, offset);
+#else
+ /* Under ONE_MEGABYTE is segment upm_first */
+ result = uvm_physseg_find(atop(ONE_MEGABYTE - 12288), &offset);
+ ATF_CHECK_EQ(upm_first, result);
+ ATF_CHECK_EQ(uvm_physseg_get_start(upm_first),
+ uvm_physseg_get_start(result));
+ ATF_CHECK_EQ(uvm_physseg_get_end(upm_first),
+ uvm_physseg_get_end(result));
+ ATF_CHECK_EQ(uvm_physseg_get_avail_start(upm_first),
+ uvm_physseg_get_avail_start(result));
+ ATF_CHECK_EQ(uvm_physseg_get_avail_end(upm_first),
+ uvm_physseg_get_avail_end(result));
+
+ /* Offset is calculated based on PAGE_SIZE */
+ /* atop(ONE_MEGABYTE - (3 * PAGE_SIZE)) - VALID_START_PFN1 = 253 */
+ ATF_CHECK_EQ(253, offset);
+#endif
+}
+
+ATF_TC(vm_physseg_find_invalid);
+ATF_TC_HEAD(vm_physseg_find_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the returned segment number \
+ is (paddr_t) -1 when a non existant PFN is passed into \
+ uvm_physseg_find() call.");
+}
+ATF_TC_BODY(vm_physseg_find_invalid, tc)
+{
+ psize_t offset = (psize_t) -1;
+
+ setup();
+ uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* No segments over 3 MB exists at the moment */
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID,
+ uvm_physseg_find(atop(ONE_MEGABYTE * 3), NULL));
+
+ ATF_REQUIRE_EQ((psize_t) -1, offset);
+
+ /* No segments over 3 MB exists at the moment */
+ ATF_CHECK_EQ(UVM_PHYSSEG_TYPE_INVALID,
+ uvm_physseg_find(atop(ONE_MEGABYTE * 3), &offset));
+
+ ATF_CHECK_EQ((psize_t) -1, offset);
+}
+
+ATF_TC(uvm_page_physunload_start);
+ATF_TC_HEAD(uvm_page_physunload_start, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_physunload()\
+ call works without a panic(). Unloads from Start of the segment.");
+}
+ATF_TC_BODY(uvm_page_physunload_start, tc)
+{
+ /*
+ * Would uvmexp.npages reduce everytime an uvm_page_physunload is called?
+ */
+ psize_t npages = (VALID_END_PFN_2 - VALID_START_PFN_2);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, &p));
+
+ /*
+ * When called for first time, uvm_page_physload() removes the first PFN
+ *
+ * New avail start will be VALID_AVAIL_START_PFN_2 + 1
+ */
+ ATF_CHECK_EQ(VALID_START_PFN_2, atop(p));
+
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2 + 1,
+ uvm_physseg_get_avail_start(upm));
+
+ ATF_CHECK_EQ(VALID_START_PFN_2 + 1, uvm_physseg_get_start(upm));
+
+ /* Rest of the stuff should remain the same */
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2, uvm_physseg_get_avail_end(upm));
+}
+
+ATF_TC(uvm_page_physunload_end);
+ATF_TC_HEAD(uvm_page_physunload_end, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_physunload()\
+ call works without a panic(). Unloads from End of the segment.");
+}
+ATF_TC_BODY(uvm_page_physunload_end, tc)
+{
+ /*
+ * Would uvmexp.npages reduce everytime an uvm_page_physunload is called?
+ */
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+ /* Note: start != avail_start to remove from end. */
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2 + 1, VALID_AVAIL_END_PFN_2,
+ VM_FREELIST_DEFAULT);
+
+ p = 0;
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE(
+ uvm_physseg_get_avail_start(upm) != uvm_physseg_get_start(upm));
+
+ ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, &p));
+
+ /*
+ * Remember if X is the upper limit the actual valid pointer is X - 1
+ *
+ * For example if 256 is the upper limit for 1MB memory, last valid
+ * pointer is 256 - 1 = 255
+ */
+
+ ATF_CHECK_EQ(VALID_END_PFN_2 - 1, atop(p));
+
+ /*
+ * When called for second time, uvm_page_physload() removes the last PFN
+ *
+ * New avail end will be VALID_AVAIL_END_PFN_2 - 1
+ * New end will be VALID_AVAIL_PFN_2 - 1
+ */
+
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2 - 1, uvm_physseg_get_avail_end(upm));
+
+ ATF_CHECK_EQ(VALID_END_PFN_2 - 1, uvm_physseg_get_end(upm));
+
+ /* Rest of the stuff should remain the same */
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2 + 1,
+ uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+}
+
+ATF_TC(uvm_page_physunload_none);
+ATF_TC_HEAD(uvm_page_physunload_none, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic uvm_page_physunload()\
+ call works without a panic(). Does not unload from start or end \
+ because of non-aligned start / avail_start and end / avail_end \
+ respectively.");
+}
+ATF_TC_BODY(uvm_page_physunload_none, tc)
+{
+ psize_t npages = (VALID_END_PFN_2 - VALID_START_PFN_2);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+ /*
+ * Note: start != avail_start and end != avail_end.
+ *
+ * This prevents any unload from occuring.
+ */
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2 + 1, VALID_AVAIL_END_PFN_2 - 1,
+ VM_FREELIST_DEFAULT);
+
+ p = 0;
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_REQUIRE(
+ uvm_physseg_get_avail_start(upm) != uvm_physseg_get_start(upm));
+
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_CHECK_EQ(false, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, &p));
+
+ /* uvm_page_physload() will no longer unload memory */
+ ATF_CHECK_EQ(0, p);
+
+ /* Rest of the stuff should remain the same */
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2 + 1,
+ uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2 - 1,
+ uvm_physseg_get_avail_end(upm));
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+}
+
+ATF_TC(uvm_page_physunload_delete_start);
+ATF_TC_HEAD(uvm_page_physunload_delete_start, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the uvm_page_physunload() \
+ works when the segment gets small enough to be deleted scenario. \
+ NOTE: This one works deletes from start.");
+}
+ATF_TC_BODY(uvm_page_physunload_delete_start, tc)
+{
+ /*
+ * Would uvmexp.npages reduce everytime an uvm_page_physunload is called?
+ */
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+
+ /*
+ * Setup the Nuke from Starting point
+ */
+
+ upm = uvm_page_physload(VALID_END_PFN_1 - 1, VALID_END_PFN_1,
+ VALID_AVAIL_END_PFN_1 - 1, VALID_AVAIL_END_PFN_1,
+ VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* Insert more than one segment iff VM_PHYSSEG_MAX > 1 */
+#if VM_PHYSSEG_MAX > 1
+ uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+#endif
+
+#if VM_PHYSSEG_MAX == 1
+ atf_tc_expect_signal(SIGABRT,
+ "cannot uvm_page_physunload() the last segment");
+#endif
+
+ ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, &p));
+
+ ATF_CHECK_EQ(VALID_END_PFN_1 - 1, atop(p));
+
+ ATF_CHECK_EQ(1, uvm_physseg_get_entries());
+
+ /* The only node now is the one we inserted second. */
+ upm = uvm_physseg_get_first();
+
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2, uvm_physseg_get_avail_end(upm));
+}
+
+ATF_TC(uvm_page_physunload_delete_end);
+ATF_TC_HEAD(uvm_page_physunload_delete_end, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the uvm_page_physunload() \
+ works when the segment gets small enough to be deleted scenario. \
+ NOTE: This one works deletes from end.");
+}
+ATF_TC_BODY(uvm_page_physunload_delete_end, tc)
+{
+ /*
+ * Would uvmexp.npages reduce everytime an uvm_page_physunload is called?
+ */
+
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+
+ /*
+ * Setup the Nuke from Ending point
+ */
+
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_START_PFN_1 + 2,
+ VALID_AVAIL_START_PFN_1 + 1, VALID_AVAIL_START_PFN_1 + 2,
+ VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* Insert more than one segment iff VM_PHYSSEG_MAX > 1 */
+#if VM_PHYSSEG_MAX > 1
+ uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+#endif
+
+#if VM_PHYSSEG_MAX == 1
+ atf_tc_expect_signal(SIGABRT,
+ "cannot uvm_page_physunload() the last segment");
+#endif
+
+ ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, &p));
+
+ p = 0;
+
+ ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, &p));
+
+ ATF_CHECK_EQ(VALID_START_PFN_1 + 2, atop(p));
+
+ ATF_CHECK_EQ(1, uvm_physseg_get_entries());
+
+ /* The only node now is the one we inserted second. */
+ upm = uvm_physseg_get_first();
+
+ ATF_CHECK_EQ(VALID_START_PFN_2, uvm_physseg_get_start(upm));
+ ATF_CHECK_EQ(VALID_END_PFN_2, uvm_physseg_get_end(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_START_PFN_2, uvm_physseg_get_avail_start(upm));
+ ATF_CHECK_EQ(VALID_AVAIL_END_PFN_2, uvm_physseg_get_avail_end(upm));
+}
+
+ATF_TC(uvm_page_physunload_invalid);
+ATF_TC_HEAD(uvm_page_physunload_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the uvm_page_physunload() \
+ fails when then Free list does not match.");
+}
+ATF_TC_BODY(uvm_page_physunload_invalid, tc)
+{
+ psize_t npages = (VALID_END_PFN_2 - VALID_START_PFN_2);
+
+ struct vm_page *pgs = malloc(sizeof(struct vm_page) * npages);
+
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ uvm_physseg_init_seg(upm, pgs);
+
+ ATF_CHECK_EQ(false, uvm_page_physunload(upm, VM_FREELIST_FIRST4G, &p));
+}
+
+ATF_TC(uvm_page_physunload_force);
+ATF_TC_HEAD(uvm_page_physunload_force, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the basic \
+ uvm_page_physunload_force() including delete works without.");
+}
+ATF_TC_BODY(uvm_page_physunload_force, tc)
+{
+ /*
+ * Would uvmexp.npages reduce everytime an uvm_page_physunload is called?
+ */
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_1, VALID_END_PFN_1,
+ VALID_AVAIL_START_PFN_1, VALID_AVAIL_END_PFN_1, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ /* Insert more than one segment iff VM_PHYSSEG_MAX > 1 */
+#if VM_PHYSSEG_MAX > 1
+ /*
+ * We have couple of physloads done this is bacause of the fact that if
+ * we physunload all the PFs from a given range and we have only one
+ * segment in total a panic() is called
+ */
+ uvm_page_physload(VALID_START_PFN_2, VALID_END_PFN_2,
+ VALID_AVAIL_START_PFN_2, VALID_AVAIL_END_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+#endif
+
+#if VM_PHYSSEG_MAX == 1
+ atf_tc_expect_signal(SIGABRT,
+ "cannot uvm_page_physunload() the last segment");
+#endif
+
+ ATF_REQUIRE_EQ(VALID_AVAIL_START_PFN_1,
+ uvm_physseg_get_avail_start(upm));
+
+ for(paddr_t i = VALID_AVAIL_START_PFN_1;
+ i < VALID_AVAIL_END_PFN_1; i++) {
+ ATF_CHECK_EQ(true,
+ uvm_page_physunload_force(upm, VM_FREELIST_DEFAULT, &p));
+ ATF_CHECK_EQ(i, atop(p));
+
+ if(i + 1 < VALID_AVAIL_END_PFN_1)
+ ATF_CHECK_EQ(i + 1, uvm_physseg_get_avail_start(upm));
+ }
+
+ /*
+ * Now we try to retrieve the segment, which has been removed
+ * from the system through force unloading all the pages inside it.
+ */
+ upm = uvm_physseg_find(VALID_AVAIL_END_PFN_1 - 1, NULL);
+
+ /* It should no longer exist */
+ ATF_CHECK_EQ(NULL, upm);
+
+ ATF_CHECK_EQ(1, uvm_physseg_get_entries());
+}
+
+ATF_TC(uvm_page_physunload_force_invalid);
+ATF_TC_HEAD(uvm_page_physunload_force_invalid, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests if the invalid conditions for \
+ uvm_page_physunload_force_invalid().");
+}
+ATF_TC_BODY(uvm_page_physunload_force_invalid, tc)
+{
+ paddr_t p = 0;
+
+ uvm_physseg_t upm;
+
+ setup();
+ upm = uvm_page_physload(VALID_START_PFN_2, VALID_START_PFN_2+ 1,
+ VALID_START_PFN_2, VALID_START_PFN_2, VM_FREELIST_DEFAULT);
+
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ ATF_REQUIRE_EQ(0, uvmexp.npages);
+
+ ATF_CHECK_EQ(false,
+ uvm_page_physunload_force(upm, VM_FREELIST_DEFAULT, &p));
+
+ ATF_CHECK_EQ(0, p);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+#if defined(UVM_HOTPLUG)
+ /* Internal */
+ ATF_TP_ADD_TC(tp, uvm_physseg_alloc_atboot_mismatch);
+ ATF_TP_ADD_TC(tp, uvm_physseg_alloc_atboot_overrun);
+ ATF_TP_ADD_TC(tp, uvm_physseg_alloc_sanity);
+ ATF_TP_ADD_TC(tp, uvm_physseg_free_atboot_mismatch);
+ ATF_TP_ADD_TC(tp, uvm_physseg_free_sanity);
+#if VM_PHYSSEG_MAX > 1
+ ATF_TP_ADD_TC(tp, uvm_physseg_atboot_free_leak);
+#endif
+#endif /* UVM_HOTPLUG */
+
+ ATF_TP_ADD_TC(tp, uvm_physseg_plug);
+ ATF_TP_ADD_TC(tp, uvm_physseg_unplug);
+
+ /* Exported */
+ ATF_TP_ADD_TC(tp, uvm_physseg_init);
+ ATF_TP_ADD_TC(tp, uvm_page_physload_preload);
+ ATF_TP_ADD_TC(tp, uvm_page_physload_postboot);
+ ATF_TP_ADD_TC(tp, uvm_physseg_handle_immutable);
+ ATF_TP_ADD_TC(tp, uvm_physseg_seg_chomp_slab);
+ ATF_TP_ADD_TC(tp, uvm_physseg_alloc_from_slab);
+ ATF_TP_ADD_TC(tp, uvm_physseg_init_seg);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_start);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_start_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_end);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_end_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_avail_start);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_avail_start_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_avail_end);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_avail_end_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_next);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_next_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_prev);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_prev_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_first);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_last);
+ ATF_TP_ADD_TC(tp, uvm_physseg_valid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_valid_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_highest);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_free_list);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_start_hint);
+ ATF_TP_ADD_TC(tp, uvm_physseg_set_start_hint);
+ ATF_TP_ADD_TC(tp, uvm_physseg_set_start_hint_invalid);
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_pg);
+
+#ifdef __HAVE_PMAP_PHYSSEG
+ ATF_TP_ADD_TC(tp, uvm_physseg_get_pmseg);
+#endif
+ ATF_TP_ADD_TC(tp, vm_physseg_find);
+ ATF_TP_ADD_TC(tp, vm_physseg_find_invalid);
+
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_start);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_end);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_none);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_delete_start);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_delete_end);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_invalid);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_force);
+ ATF_TP_ADD_TC(tp, uvm_page_physunload_force_invalid);
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/sys/uvm/t_uvm_physseg_load.c b/contrib/netbsd-tests/sys/uvm/t_uvm_physseg_load.c
new file mode 100644
index 0000000..a150f69
--- /dev/null
+++ b/contrib/netbsd-tests/sys/uvm/t_uvm_physseg_load.c
@@ -0,0 +1,740 @@
+/* $NetBSD: t_uvm_physseg_load.c,v 1.2 2016/12/22 08:15:20 cherry Exp $ */
+
+/*-
+ * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Santhosh N. Raju <santhosh.raju@gmail.com> and
+ * by Cherry G. Mathew
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_uvm_physseg_load.c,v 1.2 2016/12/22 08:15:20 cherry Exp $");
+
+/*
+ * If this line is commented out tests related touvm_physseg_get_pmseg()
+ * wont run.
+ *
+ * Have a look at machine/uvm_physseg.h for more details.
+ */
+#define __HAVE_PMAP_PHYSSEG
+
+/*
+ * This is a dummy struct used for testing purposes
+ *
+ * In reality this struct would exist in the MD part of the code residing in
+ * machines/vmparam.h
+ */
+
+#ifdef __HAVE_PMAP_PHYSSEG
+struct pmap_physseg {
+ int dummy_variable; /* Dummy variable use for testing */
+};
+#endif
+
+/* Testing API - assumes userland */
+/* Provide Kernel API equivalents */
+#include <assert.h>
+#include <stdbool.h>
+#include <string.h> /* memset(3) et. al */
+#include <stdio.h> /* printf(3) */
+#include <stdlib.h> /* malloc(3) */
+#include <stdarg.h>
+#include <stddef.h>
+#include <time.h>
+
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
+
+#define UVM_HOTPLUG /* Enable hotplug with rbtree. */
+#define PMAP_STEAL_MEMORY
+#define DEBUG /* Enable debug functionality. */
+
+typedef unsigned long vaddr_t;
+typedef unsigned long paddr_t;
+typedef unsigned long psize_t;
+typedef unsigned long vsize_t;
+
+#include <uvm/uvm_physseg.h>
+#include <uvm/uvm_page.h>
+
+#ifndef DIAGNOSTIC
+#define KASSERTMSG(e, msg, ...) /* NOTHING */
+#define KASSERT(e) /* NOTHING */
+#else
+#define KASSERT(a) assert(a)
+#define KASSERTMSG(exp, ...) printf(__VA_ARGS__); assert((exp))
+#endif
+
+#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
+
+#define VM_NFREELIST 4
+#define VM_FREELIST_DEFAULT 0
+#define VM_FREELIST_FIRST16 3
+#define VM_FREELIST_FIRST1G 2
+#define VM_FREELIST_FIRST4G 1
+
+/*
+ * Used in tests when Array implementation is tested
+ */
+#if !defined(VM_PHYSSEG_MAX)
+#define VM_PHYSSEG_MAX 32
+#endif
+
+#define PAGE_SIZE 4096
+#define PAGE_SHIFT 12
+#define atop(x) (((paddr_t)(x)) >> PAGE_SHIFT)
+
+#define mutex_enter(l)
+#define mutex_exit(l)
+
+#define _SYS_KMEM_H_ /* Disallow the real kmem API (see below) */
+/* free(p) XXX: pgs management need more thought */
+#define kmem_alloc(size, flags) malloc(size)
+#define kmem_zalloc(size, flags) malloc(size)
+#define kmem_free(p, size) free(p)
+
+psize_t physmem;
+
+struct uvmexp uvmexp; /* decl */
+
+/*
+ * uvm structure borrowed from uvm.h
+ *
+ * Remember this is a dummy structure used within the ATF Tests and
+ * uses only necessary fields from the original uvm struct.
+ * See uvm/uvm.h for the full struct.
+ */
+
+struct uvm {
+ /* vm_page related parameters */
+
+ bool page_init_done; /* TRUE if uvm_page_init() finished */
+} uvm;
+
+static void
+panic(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ printf("\n");
+ va_end(ap);
+ KASSERT(false);
+
+ /*NOTREACHED*/
+}
+
+static void
+uvm_pagefree(struct vm_page *pg)
+{
+ return;
+}
+
+#if defined(UVM_HOTPLUG)
+static void
+uvmpdpol_reinit(void)
+{
+ return;
+}
+#endif /* UVM_HOTPLUG */
+
+/* end - Provide Kernel API equivalents */
+
+#include "uvm/uvm_physseg.c"
+
+#include <atf-c.h>
+
+#define ONE_MEGABYTE 1024 * 1024
+
+/* Sample Page Frame Numbers */
+#define VALID_START_PFN_1 atop(0)
+#define VALID_END_PFN_1 atop(ONE_MEGABYTE)
+#define VALID_AVAIL_START_PFN_1 atop(0)
+#define VALID_AVAIL_END_PFN_1 atop(ONE_MEGABYTE)
+
+#define VALID_START_PFN_2 atop(ONE_MEGABYTE + 1)
+#define VALID_END_PFN_2 atop(ONE_MEGABYTE * 2)
+#define VALID_AVAIL_START_PFN_2 atop(ONE_MEGABYTE + 1)
+#define VALID_AVAIL_END_PFN_2 atop(ONE_MEGABYTE * 2)
+
+#define VALID_START_PFN_3 atop((ONE_MEGABYTE * 2) + 1)
+#define VALID_END_PFN_3 atop(ONE_MEGABYTE * 3)
+#define VALID_AVAIL_START_PFN_3 atop((ONE_MEGABYTE * 2) + 1)
+#define VALID_AVAIL_END_PFN_3 atop(ONE_MEGABYTE * 3)
+
+#define VALID_START_PFN_4 atop(ONE_MEGABYTE + 1)
+#define VALID_END_PFN_4 atop(ONE_MEGABYTE * 128)
+#define VALID_AVAIL_START_PFN_4 atop(ONE_MEGABYTE + 1)
+#define VALID_AVAIL_END_PFN_4 atop(ONE_MEGABYTE * 128)
+
+#define VALID_START_PFN_5 atop(ONE_MEGABYTE + 1)
+#define VALID_END_PFN_5 atop(ONE_MEGABYTE * 256)
+#define VALID_AVAIL_START_PFN_5 atop(ONE_MEGABYTE + 1)
+#define VALID_AVAIL_END_PFN_5 atop(ONE_MEGABYTE * 256)
+
+/*
+ * Total number of pages (of 4K size each) should be 256 for 1MB of memory.
+ */
+#define PAGE_COUNT_1M 256
+
+/*
+ * The number of Page Frames to allot per segment
+ */
+#define PF_STEP 8
+
+/*
+ * A debug fucntion to print the content of upm.
+ */
+ static inline void
+ uvm_physseg_dump_seg(uvm_physseg_t upm)
+ {
+#if defined(DEBUG)
+ printf("%s: seg->start == %ld\n", __func__,
+ uvm_physseg_get_start(upm));
+ printf("%s: seg->end == %ld\n", __func__,
+ uvm_physseg_get_end(upm));
+ printf("%s: seg->avail_start == %ld\n", __func__,
+ uvm_physseg_get_avail_start(upm));
+ printf("%s: seg->avail_end == %ld\n", __func__,
+ uvm_physseg_get_avail_end(upm));
+
+ printf("====\n\n");
+#else
+ return;
+#endif /* DEBUG */
+ }
+
+/*
+ * Private accessor that gets the value of vm_physmem.nentries
+ */
+static int
+uvm_physseg_get_entries(void)
+{
+#if defined(UVM_HOTPLUG)
+ return uvm_physseg_graph.nentries;
+#else
+ return vm_nphysmem;
+#endif /* UVM_HOTPLUG */
+}
+
+/*
+ * Note: This function replicates verbatim what happens in
+ * uvm_page.c:uvm_page_init().
+ *
+ * Please track any changes that happen there.
+ */
+static void
+uvm_page_init_fake(struct vm_page *pagearray, psize_t pagecount)
+{
+ uvm_physseg_t bank;
+ size_t n;
+
+ for (bank = uvm_physseg_get_first(),
+ uvm_physseg_seg_chomp_slab(bank, pagearray, pagecount);
+ uvm_physseg_valid_p(bank);
+ bank = uvm_physseg_get_next(bank)) {
+
+ n = uvm_physseg_get_end(bank) - uvm_physseg_get_start(bank);
+ uvm_physseg_seg_alloc_from_slab(bank, n);
+ uvm_physseg_init_seg(bank, pagearray);
+
+ /* set up page array pointers */
+ pagearray += n;
+ pagecount -= n;
+ }
+
+ uvm.page_init_done = true;
+}
+
+/*
+ * PHYS_TO_VM_PAGE: find vm_page for a PA. used by MI code to get vm_pages
+ * back from an I/O mapping (ugh!). used in some MD code as well.
+ */
+static struct vm_page *
+uvm_phys_to_vm_page(paddr_t pa)
+{
+ paddr_t pf = atop(pa);
+ paddr_t off;
+ uvm_physseg_t psi;
+
+ psi = uvm_physseg_find(pf, &off);
+ if (psi != UVM_PHYSSEG_TYPE_INVALID)
+ return uvm_physseg_get_pg(psi, off);
+ return(NULL);
+}
+
+//static paddr_t
+//uvm_vm_page_to_phys(const struct vm_page *pg)
+//{
+//
+// return pg->phys_addr;
+//}
+
+/*
+ * XXX: To do, write control test cases for uvm_vm_page_to_phys().
+ */
+
+/* #define VM_PAGE_TO_PHYS(entry) uvm_vm_page_to_phys(entry) */
+
+#define PHYS_TO_VM_PAGE(pa) uvm_phys_to_vm_page(pa)
+
+/*
+ * Test Fixture SetUp().
+ */
+static void
+setup(void)
+{
+ /* Prerequisites for running certain calls in uvm_physseg */
+ uvmexp.pagesize = PAGE_SIZE;
+ uvmexp.npages = 0;
+ uvm.page_init_done = false;
+ uvm_physseg_init();
+}
+
+ATF_TC(uvm_physseg_100);
+ATF_TC_HEAD(uvm_physseg_100, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 100 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_100, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 100; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_1K);
+ATF_TC_HEAD(uvm_physseg_1K, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 1000 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_1K, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 1000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_10K);
+ATF_TC_HEAD(uvm_physseg_10K, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 10,000 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_10K, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 10000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_100K);
+ATF_TC_HEAD(uvm_physseg_100K, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 100,000 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_100K, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 100000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_1M);
+ATF_TC_HEAD(uvm_physseg_1M, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 1,000,000 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_1M, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 1000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_10M);
+ATF_TC_HEAD(uvm_physseg_10M, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 10,000,000 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_10M, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 10000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_100M);
+ATF_TC_HEAD(uvm_physseg_100M, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 100,000,000 calls, VM_PHYSSEG_MAX is 32.");
+}
+ATF_TC_BODY(uvm_physseg_100M, tc)
+{
+ paddr_t pa;
+
+ setup();
+
+ for(paddr_t i = VALID_START_PFN_1;
+ i < VALID_END_PFN_1; i += PF_STEP) {
+ uvm_page_physload(i, i + PF_STEP, i, i + PF_STEP,
+ VM_FREELIST_DEFAULT);
+ }
+
+ ATF_REQUIRE_EQ(VM_PHYSSEG_MAX, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(int i = 0; i < 100000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_1);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_1MB);
+ATF_TC_HEAD(uvm_physseg_1MB, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 10,000,000 calls, VM_PHYSSEG_MAX is 32 on 1 MB Segment.");
+}
+ATF_TC_BODY(uvm_physseg_1MB, t)
+{
+ paddr_t pa = 0;
+
+ paddr_t pf = 0;
+
+ psize_t pf_chunk_size = 0;
+
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ psize_t npages2 = (VALID_END_PFN_2 - VALID_START_PFN_2);
+
+ struct vm_page *slab = malloc(sizeof(struct vm_page) *
+ (npages1 + npages2));
+
+ setup();
+
+ /* We start with zero segments */
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_1, npages1, NULL));
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2);
+
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_2, npages2, NULL));
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(pf = VALID_START_PFN_2; pf < VALID_END_PFN_2; pf += PF_STEP) {
+ pf_chunk_size = (psize_t) random() % (psize_t) (PF_STEP - 1) + 1;
+ uvm_physseg_unplug(pf, pf_chunk_size);
+ }
+
+ for(int i = 0; i < 10000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_2);
+ if(pa < ctob(VALID_START_PFN_2))
+ pa += ctob(VALID_START_PFN_2);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_64MB);
+ATF_TC_HEAD(uvm_physseg_64MB, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 10,000,000 calls, VM_PHYSSEG_MAX is 32 on 64 MB Segment.");
+}
+ATF_TC_BODY(uvm_physseg_64MB, t)
+{
+ paddr_t pa = 0;
+
+ paddr_t pf = 0;
+
+ psize_t pf_chunk_size = 0;
+
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ psize_t npages2 = (VALID_END_PFN_3 - VALID_START_PFN_3);
+
+ struct vm_page *slab = malloc(sizeof(struct vm_page) *
+ (npages1 + npages2));
+
+ setup();
+
+ /* We start with zero segments */
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_1, npages1, NULL));
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2);
+
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_3, npages2, NULL));
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(pf = VALID_START_PFN_3; pf < VALID_END_PFN_3; pf += PF_STEP) {
+ pf_chunk_size = (psize_t) random() % (psize_t) (PF_STEP - 1) + 1;
+ uvm_physseg_unplug(pf, pf_chunk_size);
+ }
+
+ for(int i = 0; i < 10000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_3);
+ if(pa < ctob(VALID_START_PFN_3))
+ pa += ctob(VALID_START_PFN_3);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_128MB);
+ATF_TC_HEAD(uvm_physseg_128MB, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 10,000,000 calls, VM_PHYSSEG_MAX is 32 on 128 MB Segment.");
+}
+ATF_TC_BODY(uvm_physseg_128MB, t)
+{
+ paddr_t pa = 0;
+
+ paddr_t pf = 0;
+
+ psize_t pf_chunk_size = 0;
+
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ psize_t npages2 = (VALID_END_PFN_4 - VALID_START_PFN_4);
+
+ struct vm_page *slab = malloc(sizeof(struct vm_page)
+ * (npages1 + npages2));
+
+ setup();
+
+ /* We start with zero segments */
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_1, npages1, NULL));
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2);
+
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_2, npages2, NULL));
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(pf = VALID_START_PFN_4; pf < VALID_END_PFN_4; pf += PF_STEP) {
+ pf_chunk_size = (psize_t) random() % (psize_t) (PF_STEP - 1) + 1;
+ uvm_physseg_unplug(pf, pf_chunk_size);
+ }
+
+ for(int i = 0; i < 10000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_4);
+ if(pa < ctob(VALID_START_PFN_4))
+ pa += ctob(VALID_START_PFN_4);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TC(uvm_physseg_256MB);
+ATF_TC_HEAD(uvm_physseg_256MB, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Load test uvm_phys_to_vm_page() with \
+ 10,000,000 calls, VM_PHYSSEG_MAX is 32 on 256 MB Segment.");
+}
+ATF_TC_BODY(uvm_physseg_256MB, t)
+{
+ paddr_t pa = 0;
+
+ paddr_t pf = 0;
+
+ psize_t pf_chunk_size = 0;
+
+ psize_t npages1 = (VALID_END_PFN_1 - VALID_START_PFN_1);
+
+ psize_t npages2 = (VALID_END_PFN_5 - VALID_START_PFN_5);
+
+ struct vm_page *slab = malloc(sizeof(struct vm_page) * (npages1 + npages2));
+
+ setup();
+
+ /* We start with zero segments */
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_1, npages1, NULL));
+ ATF_REQUIRE_EQ(1, uvm_physseg_get_entries());
+
+ /* Post boot: Fake all segments and pages accounted for. */
+ uvm_page_init_fake(slab, npages1 + npages2);
+
+ ATF_REQUIRE_EQ(true, uvm_physseg_plug(VALID_START_PFN_2, npages2, NULL));
+ ATF_REQUIRE_EQ(2, uvm_physseg_get_entries());
+
+ srandom((unsigned)time(NULL));
+ for(pf = VALID_START_PFN_5; pf < VALID_END_PFN_5; pf += PF_STEP) {
+ pf_chunk_size = (psize_t) random() % (psize_t) (PF_STEP - 1) + 1;
+ uvm_physseg_unplug(pf, pf_chunk_size);
+ }
+
+ for(int i = 0; i < 10000000; i++) {
+ pa = (paddr_t) random() % (paddr_t) ctob(VALID_END_PFN_5);
+ if(pa < ctob(VALID_END_PFN_5))
+ pa += ctob(VALID_START_PFN_5);
+ PHYS_TO_VM_PAGE(pa);
+ }
+
+ ATF_CHECK_EQ(true, true);
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ /* Fixed memory size tests. */
+ ATF_TP_ADD_TC(tp, uvm_physseg_100);
+ ATF_TP_ADD_TC(tp, uvm_physseg_1K);
+ ATF_TP_ADD_TC(tp, uvm_physseg_10K);
+ ATF_TP_ADD_TC(tp, uvm_physseg_100K);
+ ATF_TP_ADD_TC(tp, uvm_physseg_1M);
+ ATF_TP_ADD_TC(tp, uvm_physseg_10M);
+ ATF_TP_ADD_TC(tp, uvm_physseg_100M);
+
+#if defined(UVM_HOTPLUG)
+ /* Variable memory size tests. */
+ ATF_TP_ADD_TC(tp, uvm_physseg_1MB);
+ ATF_TP_ADD_TC(tp, uvm_physseg_64MB);
+ ATF_TP_ADD_TC(tp, uvm_physseg_128MB);
+ ATF_TP_ADD_TC(tp, uvm_physseg_256MB);
+#endif /* UVM_HOTPLUG */
+
+ return atf_no_error();
+}
diff --git a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
index 95f0778..558b074 100755
--- a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
+++ b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_grep.sh,v 1.2 2013/05/17 15:39:17 christos Exp $
+# $NetBSD: t_grep.sh,v 1.3 2017/01/14 20:43:52 christos Exp $
#
# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -43,20 +43,9 @@ binary_head()
}
binary_body()
{
- # Begin FreeBSD
- #
- # Generate stable output instead of depending on uname to match the
- # branded OS name of /bin/sh
- if true; then
dd if=/dev/zero count=1 of=test.file
echo -n "foobar" >> test.file
atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep foobar test.file
- else
- # End FreeBSD
- atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep $(uname) /bin/sh
- # Begin FreeBSD
- fi
- # End FreeBSD
}
atf_test_case recurse
@@ -70,15 +59,7 @@ recurse_body()
echo -e "cod\ndover sole\nhaddock\nhalibut\npilchard" > recurse/d/fish
echo -e "cod\nhaddock\nplaice" > recurse/a/f/favourite-fish
- # Begin FreeBSD
- if true; then
- atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" -x "grep -r haddock recurse | sort"
- else
- # End FreeBSD
- atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" grep -r haddock recurse
- # Begin FreeBSD
- fi
- # End FreeBSD
+ atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" -x "grep -r haddock recurse | sort"
}
atf_test_case recurse_symlink
diff --git a/contrib/netbsd-tests/usr.bin/mixerctl/t_mixerctl.sh b/contrib/netbsd-tests/usr.bin/mixerctl/t_mixerctl.sh
new file mode 100755
index 0000000..94c0bdf
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/mixerctl/t_mixerctl.sh
@@ -0,0 +1,51 @@
+# $NetBSD: t_mixerctl.sh,v 1.1 2017/01/02 15:40:09 christos Exp $
+
+atf_test_case noargs_usage
+noargs_usage_head() {
+ atf_set "descr" "Ensure mixerctl(1) with no args prints a usage message"
+}
+noargs_usage_body() {
+ atf_check -s exit:0 -o not-empty -e ignore \
+ mixerctl
+}
+
+atf_test_case showvalue
+showvalue_head() {
+ atf_set "descr" "Ensure mixerctl(1) can print the value for all variables"
+}
+showvalue_body() {
+ for var in $(mixerctl -a | awk -F= '{print $1}'); do
+ atf_check -s exit:0 -e ignore -o match:"^${var}=" \
+ mixerctl ${var}
+ done
+}
+
+atf_test_case nflag
+nflag_head() {
+ atf_set "descr" "Ensure 'mixerctl -n' actually suppresses some output"
+}
+nflag_body() {
+ varname="$(mixerctl -a | head -1 | awk -F= '{print $1}')"
+
+ atf_check -s exit:0 -o match:"${varname}" -e ignore \
+ mixerctl ${varname}
+
+ atf_check -s exit:0 -o not-match:"${varname}" -e ignore \
+ mixerctl -n ${varname}
+}
+
+atf_test_case nonexistant_device
+nonexistant_device_head() {
+ atf_set "descr" "Ensure mixerctl(1) complains if provided a nonexistant mixer device"
+}
+nonexistant_device_body() {
+ atf_check -s not-exit:0 -o ignore -e match:"No such file" \
+ mixerctl -d /a/b/c/d/e
+}
+
+atf_init_test_cases() {
+ atf_add_test_case noargs_usage
+ atf_add_test_case showvalue
+ atf_add_test_case nflag
+ atf_add_test_case nonexistant_device
+}
diff --git a/contrib/netbsd-tests/usr.bin/uniq/d_basic.in b/contrib/netbsd-tests/usr.bin/uniq/d_basic.in
new file mode 100644
index 0000000..52a24bc
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/d_basic.in
@@ -0,0 +1,4 @@
+1
+12
+1
+1
diff --git a/contrib/netbsd-tests/usr.bin/uniq/d_basic.out b/contrib/netbsd-tests/usr.bin/uniq/d_basic.out
new file mode 100644
index 0000000..d44fcba
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/d_basic.out
@@ -0,0 +1,3 @@
+1
+12
+1
diff --git a/contrib/netbsd-tests/usr.bin/uniq/d_counts.out b/contrib/netbsd-tests/usr.bin/uniq/d_counts.out
new file mode 100644
index 0000000..bb1c86b
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/d_counts.out
@@ -0,0 +1,6 @@
+ 1 #01 foo0 bar0 foo1 bar1
+ 1 #02 bar0 foo1 bar1 foo1
+ 1 #03 foo0 bar0 foo1 bar1
+ 1 #04
+ 2 #05 foo0 bar0 foo1 bar1
+ 1 #07 bar0 foo1 bar1 foo0
diff --git a/contrib/netbsd-tests/usr.bin/uniq/d_input.in b/contrib/netbsd-tests/usr.bin/uniq/d_input.in
new file mode 100644
index 0000000..c32c44d
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/d_input.in
@@ -0,0 +1,7 @@
+#01 foo0 bar0 foo1 bar1
+#02 bar0 foo1 bar1 foo1
+#03 foo0 bar0 foo1 bar1
+#04
+#05 foo0 bar0 foo1 bar1
+#06 foo0 bar0 foo1 bar1
+#07 bar0 foo1 bar1 foo0
diff --git a/contrib/netbsd-tests/usr.bin/uniq/d_show_duplicates.out b/contrib/netbsd-tests/usr.bin/uniq/d_show_duplicates.out
new file mode 100644
index 0000000..45f4be7
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/d_show_duplicates.out
@@ -0,0 +1 @@
+#05 foo0 bar0 foo1 bar1
diff --git a/contrib/netbsd-tests/usr.bin/uniq/d_show_uniques.out b/contrib/netbsd-tests/usr.bin/uniq/d_show_uniques.out
new file mode 100644
index 0000000..1cc2ecb
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/d_show_uniques.out
@@ -0,0 +1,5 @@
+#01 foo0 bar0 foo1 bar1
+#02 bar0 foo1 bar1 foo1
+#03 foo0 bar0 foo1 bar1
+#04
+#07 bar0 foo1 bar1 foo0
diff --git a/contrib/netbsd-tests/usr.bin/uniq/t_uniq.sh b/contrib/netbsd-tests/usr.bin/uniq/t_uniq.sh
new file mode 100755
index 0000000..d90a4d5
--- /dev/null
+++ b/contrib/netbsd-tests/usr.bin/uniq/t_uniq.sh
@@ -0,0 +1,97 @@
+# $NetBSD: t_uniq.sh,v 1.1 2016/10/22 14:13:39 abhinav Exp $
+#
+# Copyright (c) 2016 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Abhinav Upadhyay
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+atf_test_case basic
+basic_head()
+{
+ atf_set "descr" "Checks the basic functionality"
+}
+basic_body()
+{
+ atf_check -o file:$(atf_get_srcdir)/d_basic.out uniq \
+ $(atf_get_srcdir)/d_basic.in
+}
+
+atf_test_case test_counts
+test_counts_head()
+{
+ atf_set "descr" "Tests the -c option, comparing each line of the input" \
+ "file data starting from the second field"
+}
+test_counts_body()
+{
+ atf_check -o file:$(atf_get_srcdir)/d_counts.out uniq -c -f 1 \
+ $(atf_get_srcdir)/d_input.in
+}
+
+atf_test_case show_duplicates
+show_duplicates_head()
+{
+ atf_set "descr" "Checks the -d option, comparing each line of the input" \
+ "file data starting from the second field"
+}
+show_duplicates_body()
+{
+ atf_check -o file:$(atf_get_srcdir)/d_show_duplicates.out uniq -d -f 1 \
+ $(atf_get_srcdir)/d_input.in
+}
+
+atf_test_case show_uniques
+show_uniques_head()
+{
+ atf_set "descr" "Checks the -u option, comparing each line of the input" \
+ "file data starting from the second field"
+}
+show_uniques_body()
+{
+ atf_check -o file:$(atf_get_srcdir)/d_show_uniques.out uniq -u -f 1 \
+ $(atf_get_srcdir)/d_input.in
+}
+
+atf_test_case show_duplicates_from_third_character
+show_duplicates_from_third_character_head()
+{
+ atf_set "descr" "Checks the -d option, comparing each line of the input" \
+ "file data starting from the third character (-s option)"
+}
+show_duplicates_from_third_character_body()
+{
+ atf_check -o empty uniq -d -s 2 $(atf_get_srcdir)/d_input.in
+
+}
+
+atf_init_test_cases()
+{
+ atf_add_test_case basic
+ atf_add_test_case test_counts
+ atf_add_test_case show_duplicates
+ atf_add_test_case show_uniques
+ atf_add_test_case show_duplicates_from_third_character
+}
diff --git a/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh b/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
index d84dd3b..58fc7db 100755
--- a/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
+++ b/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_mtree.sh,v 1.6 2013/02/05 16:49:42 christos Exp $
+# $NetBSD: t_mtree.sh,v 1.7 2017/01/14 20:45:16 christos Exp $
#
# Copyright (c) 2009, 2012 The NetBSD Foundation, Inc.
# All rights reserved.
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index 7358b44..e84a06a 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -648,6 +648,8 @@
..
uuencode
..
+ uniq
+ ..
xargs
..
xinstall
diff --git a/lib/libc/tests/hash/Makefile b/lib/libc/tests/hash/Makefile
index 1e2cd29..7811d45 100644
--- a/lib/libc/tests/hash/Makefile
+++ b/lib/libc/tests/hash/Makefile
@@ -32,8 +32,7 @@ ${PACKAGE}DATA_FILES+= data/sha1test2-out
LIBADD+= md
LIBADD.sha2_test+= crypto
-CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh/openbsd-compat
-CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh
+CFLAGS.h_hash+= -I${SRCTOP}/lib/libnetbsd
.include "../Makefile.netbsd-tests"
diff --git a/lib/libc/tests/regex/Makefile b/lib/libc/tests/regex/Makefile
index c4f4351..b16f503 100644
--- a/lib/libc/tests/regex/Makefile
+++ b/lib/libc/tests/regex/Makefile
@@ -6,7 +6,8 @@ PACKAGE= tests
BINDIR= ${TESTSDIR}
-IMPLEMENTATION?= -DREGEX_SPENCER
+# SKIP_LEFTASSOC -> these testcases fail on FreeBSD.
+IMPLEMENTATION?= -DREGEX_SPENCER -DSKIP_LEFTASSOC
CFLAGS.h_regex+=-I${TESTSRC} -I${.CURDIR:H:H}/regex
PROGS+= h_regex
diff --git a/tests/sys/fs/tmpfs/Makefile b/tests/sys/fs/tmpfs/Makefile
index 63facd1..388d911 100644
--- a/tests/sys/fs/tmpfs/Makefile
+++ b/tests/sys/fs/tmpfs/Makefile
@@ -41,12 +41,17 @@ ${PACKAGE}FILESDIR= ${TESTSDIR}
PROGS+= h_tools
BINDIR.h_tools= ${TESTSDIR}
+ATF_TESTS_SH_SED_mknod_test= \
+ -e 's,mknod pipe p,mkfifo pipe,g' \
+ -e 's,mknod dir/pipe p,mkfifo dir/pipe,g'
+
ATF_TESTS_SH_SED_mount_test= \
-e 's,-o -g,-o gid=,g' \
-e 's,-o -m,-o mode=,g' \
-e 's,-o -s,-o size=,g' \
-e 's,-o -u,-o uid=,g' \
-e 's,mount_${FILESYSTEM},mount -t ${FILESYSTEM},g'
+ATF_TESTS_SH_SED_readdir_test= -e 's,mknod fifo p,mkfifo fifo,g'
ATF_TESTS_SH_SED_sizes_test= -e 's,-o -s,-o size=,g'
ATF_TESTS_SH_SED_statvfs_test= -e 's,-o -s,-o size=,g'
ATF_TESTS_SH_SED_vnode_leak_test= -e 's,-o -s,-o size=,g'
diff --git a/usr.bin/uniq/Makefile b/usr.bin/uniq/Makefile
index 2bcf18e..c6ca369 100644
--- a/usr.bin/uniq/Makefile
+++ b/usr.bin/uniq/Makefile
@@ -1,6 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <src.opts.mk>
+
PROG= uniq
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/uniq/tests/Makefile b/usr.bin/uniq/tests/Makefile
new file mode 100644
index 0000000..06a384e
--- /dev/null
+++ b/usr.bin/uniq/tests/Makefile
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+PACKAGE= tests
+
+NETBSD_ATF_TESTS_SH= uniq_test
+
+${PACKAGE}FILES+= d_basic.in
+${PACKAGE}FILES+= d_basic.out
+${PACKAGE}FILES+= d_counts.out
+${PACKAGE}FILES+= d_input.in
+${PACKAGE}FILES+= d_show_duplicates.out
+${PACKAGE}FILES+= d_show_uniques.out
+
+.include <netbsd-tests.test.mk>
+
+.include <bsd.test.mk>
diff --git a/usr.bin/uniq/tests/Makefile.depend b/usr.bin/uniq/tests/Makefile.depend
new file mode 100644
index 0000000..f80275d
--- /dev/null
+++ b/usr.bin/uniq/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
OpenPOWER on IntegriCloud