summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-01-14 02:26:46 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-01-14 02:26:46 +0000
commita72f1252fc5ae69e7e7690fce28695d5e6e37db1 (patch)
treec7dfa57d1673e901f140be5e9f02cf2a42baa4dc
parentb6bd3eb5f3c023fc20d2df000e818962e609ae01 (diff)
downloadsrc-test2-a72f1252fc5ae69e7e7690fce28695d5e6e37db1.tar.gz
src-test2-a72f1252fc5ae69e7e7690fce28695d5e6e37db1.zip
Notes
-rw-r--r--dev/cgd/t_cgd_3des.c4
-rw-r--r--dev/cgd/t_cgd_aes.c4
-rw-r--r--dev/cgd/t_cgd_blowfish.c4
-rw-r--r--dev/scsipi/t_cd.c4
-rw-r--r--dev/sysmon/t_swwdog.c4
-rw-r--r--fs/common/h_fsmacros.h4
-rw-r--r--fs/ffs/h_quota2_tests.c4
-rw-r--r--fs/ffs/t_fifos.c4
-rw-r--r--fs/ffs/t_mount.c4
-rw-r--r--fs/ffs/t_quota2_1.c4
-rw-r--r--fs/ffs/t_quota2_remount.c4
-rw-r--r--fs/ffs/t_snapshot.c4
-rw-r--r--fs/ffs/t_snapshot_log.c4
-rw-r--r--fs/ffs/t_snapshot_v2.c4
-rw-r--r--fs/hfs/t_pathconvert.c4
-rw-r--r--fs/kernfs/t_basic.c4
-rw-r--r--fs/lfs/t_pr.c4
-rw-r--r--fs/msdosfs/t_snapshot.c4
-rw-r--r--fs/nfs/t_mountd.c4
-rw-r--r--fs/nullfs/t_basic.c4
-rw-r--r--fs/ptyfs/t_nullpts.c4
-rw-r--r--fs/ptyfs/t_ptyfs.c4
-rw-r--r--fs/puffs/t_basic.c4
-rw-r--r--fs/puffs/t_fuzz.c4
-rw-r--r--fs/puffs/t_io.c4
-rw-r--r--fs/tmpfs/t_renamerace.c4
-rw-r--r--fs/umapfs/t_basic.c4
-rw-r--r--fs/union/t_pr.c4
-rw-r--r--fs/vfs/t_full.c4
-rw-r--r--fs/vfs/t_io.c4
-rw-r--r--fs/vfs/t_renamerace.c4
-rw-r--r--fs/vfs/t_ro.c4
-rw-r--r--fs/vfs/t_union.c4
-rw-r--r--fs/vfs/t_unpriv.c4
-rw-r--r--fs/vfs/t_vfsops.c4
-rw-r--r--fs/vfs/t_vnops.c4
-rw-r--r--include/sys/t_socket.c4
-rw-r--r--kernel/kqueue/read/t_fifo.c6
-rw-r--r--kernel/kqueue/read/t_file.c6
-rw-r--r--kernel/kqueue/read/t_file2.c6
-rw-r--r--kernel/kqueue/read/t_pipe.c6
-rw-r--r--kernel/kqueue/read/t_ttypty.c6
-rw-r--r--kernel/kqueue/t_ioctl.c6
-rw-r--r--kernel/kqueue/t_proc1.c6
-rw-r--r--kernel/kqueue/t_proc2.c6
-rw-r--r--kernel/kqueue/t_proc3.c6
-rw-r--r--kernel/kqueue/t_sig.c6
-rw-r--r--kernel/kqueue/write/t_fifo.c6
-rw-r--r--kernel/kqueue/write/t_pipe.c6
-rw-r--r--kernel/kqueue/write/t_ttypty.c6
-rw-r--r--kernel/t_extent.c6
-rw-r--r--kernel/t_filedesc.c6
-rw-r--r--kernel/t_lock.c6
-rw-r--r--kernel/t_ptrace.c6
-rw-r--r--kernel/t_ptrace_wait.c206
-rw-r--r--kernel/t_pty.c6
-rw-r--r--kernel/t_rnd.c6
-rw-r--r--lib/libc/gen/t_glob.c6
-rw-r--r--lib/libc/regex/debug.c7
-rw-r--r--lib/libc/regex/t_exhaust.c18
-rw-r--r--lib/libc/regex/t_regex_att.c6
-rw-r--r--lib/libc/sys/t_clock_gettime.c9
-rw-r--r--lib/libc/sys/t_connect.c7
-rw-r--r--lib/libc/sys/t_dup.c5
-rw-r--r--lib/libc/sys/t_getrusage.c6
-rw-r--r--lib/libc/sys/t_link.c5
-rw-r--r--lib/libc/sys/t_listen.c4
-rw-r--r--lib/libc/sys/t_mmap.c7
-rw-r--r--lib/libc/sys/t_msgctl.c5
-rw-r--r--lib/libc/sys/t_msgrcv.c5
-rw-r--r--lib/libc/sys/t_msgsnd.c5
-rw-r--r--lib/libc/sys/t_nanosleep.c6
-rw-r--r--lib/libc/sys/t_pipe.c7
-rw-r--r--lib/libc/sys/t_pipe2.c15
-rw-r--r--lib/libc/sys/t_posix_fadvise.c6
-rw-r--r--lib/libc/sys/t_revoke.c5
-rw-r--r--lib/libc/sys/t_select.c10
-rw-r--r--lib/libc/sys/t_setrlimit.c5
-rw-r--r--lib/libc/sys/t_sigaction.c10
-rw-r--r--lib/libc/sys/t_sigqueue.c21
-rw-r--r--lib/libc/sys/t_socketpair.c6
-rw-r--r--lib/libc/sys/t_stat.c6
-rw-r--r--lib/libc/sys/t_truncate.c10
-rw-r--r--lib/libc/sys/t_umask.c5
-rw-r--r--lib/libc/sys/t_unlink.c9
-rw-r--r--lib/libc/sys/t_wait.c7
-rw-r--r--lib/libc/sys/t_write.c8
-rw-r--r--lib/libm/t_ilogb.c9
-rw-r--r--lib/libm/t_scalbn.c7
-rw-r--r--lib/libposix/t_rename.c6
-rw-r--r--lib/librumpclient/t_fd.c4
-rw-r--r--lib/semaphore/sem.c4
-rw-r--r--libexec/ld.elf_so/t_dlerror-cleared.c4
-rw-r--r--libexec/ld.elf_so/t_dlerror-false.c4
-rw-r--r--libexec/ld.elf_so/t_dlinfo.c4
-rw-r--r--libexec/ld.elf_so/t_ifunc.c4
-rw-r--r--modules/t_builtin.c4
-rw-r--r--net/bpf/t_bpf.c6
-rw-r--r--net/bpf/t_mbuf.c6
-rw-r--r--net/bpfilter/t_bpfilter.c6
-rw-r--r--net/bpfjit/t_bpfjit.c6
-rw-r--r--net/bpfjit/t_cop.c6
-rw-r--r--net/bpfjit/t_extmem.c6
-rw-r--r--net/bpfjit/t_mbuf.c6
-rw-r--r--net/carp/t_basic.c6
-rw-r--r--net/config/netconfig.c6
-rw-r--r--net/icmp/t_forward.c6
-rw-r--r--net/icmp/t_ping.c6
-rw-r--r--net/if_loop/t_pr.c6
-rwxr-xr-xnet/ndp/t_ra.sh80
-rw-r--r--net/net/t_raw.c4
-rw-r--r--rump/modautoload/t_modautoload.c4
-rw-r--r--rump/rumpkern/t_kern.c4
-rw-r--r--rump/rumpkern/t_lwproc.c4
-rw-r--r--rump/rumpkern/t_modcmd.c4
-rw-r--r--rump/rumpkern/t_modlinkset.c4
-rw-r--r--rump/rumpkern/t_signals.c4
-rw-r--r--rump/rumpkern/t_threads.c4
-rw-r--r--rump/rumpkern/t_tsleep.c4
-rw-r--r--rump/rumpkern/t_vm.c4
-rw-r--r--rump/rumpvfs/t_basic.c4
-rw-r--r--rump/rumpvfs/t_etfs.c4
-rw-r--r--rump/rumpvfs/t_p2kifs.c4
123 files changed, 606 insertions, 347 deletions
diff --git a/dev/cgd/t_cgd_3des.c b/dev/cgd/t_cgd_3des.c
index 91e81f45ec5e..a79ac740d45d 100644
--- a/dev/cgd/t_cgd_3des.c
+++ b/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/dev/cgd/t_cgd_aes.c b/dev/cgd/t_cgd_aes.c
index 9416333a2d71..edda1eb71aa1 100644
--- a/dev/cgd/t_cgd_aes.c
+++ b/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/dev/cgd/t_cgd_blowfish.c b/dev/cgd/t_cgd_blowfish.c
index 958ebaccf6ad..93aa834aaa41 100644
--- a/dev/cgd/t_cgd_blowfish.c
+++ b/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/dev/scsipi/t_cd.c b/dev/scsipi/t_cd.c
index 58e61a564ea0..6e856de187ca 100644
--- a/dev/scsipi/t_cd.c
+++ b/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/dev/sysmon/t_swwdog.c b/dev/sysmon/t_swwdog.c
index 1635884447ea..5e5fd991e1ba 100644
--- a/dev/sysmon/t_swwdog.c
+++ b/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/fs/common/h_fsmacros.h b/fs/common/h_fsmacros.h
index b295cf28104c..eb8376873b2f 100644
--- a/fs/common/h_fsmacros.h
+++ b/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/fs/ffs/h_quota2_tests.c b/fs/ffs/h_quota2_tests.c
index 59f3ea3b0917..71cf3b4958f1 100644
--- a/fs/ffs/h_quota2_tests.c
+++ b/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/fs/ffs/t_fifos.c b/fs/ffs/t_fifos.c
index fe1d4254a352..10b50bbd792d 100644
--- a/fs/ffs/t_fifos.c
+++ b/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/fs/ffs/t_mount.c b/fs/ffs/t_mount.c
index 6a8f74f455f8..20960953406b 100644
--- a/fs/ffs/t_mount.c
+++ b/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/fs/ffs/t_quota2_1.c b/fs/ffs/t_quota2_1.c
index 333f3c712708..22cd5d24512a 100644
--- a/fs/ffs/t_quota2_1.c
+++ b/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/fs/ffs/t_quota2_remount.c b/fs/ffs/t_quota2_remount.c
index f648856bbf70..d843cf891b4b 100644
--- a/fs/ffs/t_quota2_remount.c
+++ b/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/fs/ffs/t_snapshot.c b/fs/ffs/t_snapshot.c
index 180a8ccd92b0..f661bec2634c 100644
--- a/fs/ffs/t_snapshot.c
+++ b/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/fs/ffs/t_snapshot_log.c b/fs/ffs/t_snapshot_log.c
index e1ce17e1006a..31b28e53df2d 100644
--- a/fs/ffs/t_snapshot_log.c
+++ b/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/fs/ffs/t_snapshot_v2.c b/fs/ffs/t_snapshot_v2.c
index 393f3d41a6c3..b27929cb12d8 100644
--- a/fs/ffs/t_snapshot_v2.c
+++ b/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/fs/hfs/t_pathconvert.c b/fs/hfs/t_pathconvert.c
index 307de709be8b..056726a1a6c2 100644
--- a/fs/hfs/t_pathconvert.c
+++ b/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/fs/kernfs/t_basic.c b/fs/kernfs/t_basic.c
index e5ba4a77e1b7..77acd1149c66 100644
--- a/fs/kernfs/t_basic.c
+++ b/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/fs/lfs/t_pr.c b/fs/lfs/t_pr.c
index 97cb1dbbbf77..ed676d8bf9b0 100644
--- a/fs/lfs/t_pr.c
+++ b/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/fs/msdosfs/t_snapshot.c b/fs/msdosfs/t_snapshot.c
index 8b5708f843a3..449e62545ab7 100644
--- a/fs/msdosfs/t_snapshot.c
+++ b/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/fs/nfs/t_mountd.c b/fs/nfs/t_mountd.c
index b6c15287791c..6272587d71a0 100644
--- a/fs/nfs/t_mountd.c
+++ b/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/fs/nullfs/t_basic.c b/fs/nullfs/t_basic.c
index 21dfccdb80f1..d54f7739bafc 100644
--- a/fs/nullfs/t_basic.c
+++ b/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/fs/ptyfs/t_nullpts.c b/fs/ptyfs/t_nullpts.c
index 9265f32ffa0a..fcc7e47f6215 100644
--- a/fs/ptyfs/t_nullpts.c
+++ b/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/fs/ptyfs/t_ptyfs.c b/fs/ptyfs/t_ptyfs.c
index 90001b92ee94..108c344c343c 100644
--- a/fs/ptyfs/t_ptyfs.c
+++ b/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/fs/puffs/t_basic.c b/fs/puffs/t_basic.c
index 735108d64f44..4b5b7b81b2a4 100644
--- a/fs/puffs/t_basic.c
+++ b/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/fs/puffs/t_fuzz.c b/fs/puffs/t_fuzz.c
index 1d249c0a8be1..b2e000d07e5c 100644
--- a/fs/puffs/t_fuzz.c
+++ b/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/fs/puffs/t_io.c b/fs/puffs/t_io.c
index 37c386c83d5a..72b5d85e23ff 100644
--- a/fs/puffs/t_io.c
+++ b/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/fs/tmpfs/t_renamerace.c b/fs/tmpfs/t_renamerace.c
index 044937a930c8..d7c10e4c6679 100644
--- a/fs/tmpfs/t_renamerace.c
+++ b/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/fs/umapfs/t_basic.c b/fs/umapfs/t_basic.c
index 259f6fe8c11b..c9b2d9b7a5dc 100644
--- a/fs/umapfs/t_basic.c
+++ b/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/fs/union/t_pr.c b/fs/union/t_pr.c
index 2d0c0c84db49..fc70bcadf36b 100644
--- a/fs/union/t_pr.c
+++ b/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/fs/vfs/t_full.c b/fs/vfs/t_full.c
index f338a0221f0a..51347deca70d 100644
--- a/fs/vfs/t_full.c
+++ b/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/fs/vfs/t_io.c b/fs/vfs/t_io.c
index 23c3a157f802..b7f652936e10 100644
--- a/fs/vfs/t_io.c
+++ b/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/fs/vfs/t_renamerace.c b/fs/vfs/t_renamerace.c
index 809c380c5e22..63cfb4479c89 100644
--- a/fs/vfs/t_renamerace.c
+++ b/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/fs/vfs/t_ro.c b/fs/vfs/t_ro.c
index b1e1179956b0..f7f45813e7b7 100644
--- a/fs/vfs/t_ro.c
+++ b/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/fs/vfs/t_union.c b/fs/vfs/t_union.c
index bdcef939354e..5da1ea1ff39b 100644
--- a/fs/vfs/t_union.c
+++ b/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/fs/vfs/t_unpriv.c b/fs/vfs/t_unpriv.c
index 6da771b45bcd..6536c21d9572 100644
--- a/fs/vfs/t_unpriv.c
+++ b/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/fs/vfs/t_vfsops.c b/fs/vfs/t_vfsops.c
index 1bcee89e573d..bbed9f9d3089 100644
--- a/fs/vfs/t_vfsops.c
+++ b/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/fs/vfs/t_vnops.c b/fs/vfs/t_vnops.c
index 978fadb04c26..7da53c8d4386 100644
--- a/fs/vfs/t_vnops.c
+++ b/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/include/sys/t_socket.c b/include/sys/t_socket.c
index f60941c1ab1a..9db224780180 100644
--- a/include/sys/t_socket.c
+++ b/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/kernel/kqueue/read/t_fifo.c b/kernel/kqueue/read/t_fifo.c
index 5908547693c5..290fda74dd4a 100644
--- a/kernel/kqueue/read/t_fifo.c
+++ b/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/kernel/kqueue/read/t_file.c b/kernel/kqueue/read/t_file.c
index 233517297964..6200f74134d9 100644
--- a/kernel/kqueue/read/t_file.c
+++ b/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/kernel/kqueue/read/t_file2.c b/kernel/kqueue/read/t_file2.c
index c77d2830e93d..733caebbf1e4 100644
--- a/kernel/kqueue/read/t_file2.c
+++ b/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/kernel/kqueue/read/t_pipe.c b/kernel/kqueue/read/t_pipe.c
index d8e05f262e38..7cb3eab89ccc 100644
--- a/kernel/kqueue/read/t_pipe.c
+++ b/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/kernel/kqueue/read/t_ttypty.c b/kernel/kqueue/read/t_ttypty.c
index 3a42fd3927fb..89b1dc2ec4ca 100644
--- a/kernel/kqueue/read/t_ttypty.c
+++ b/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/kernel/kqueue/t_ioctl.c b/kernel/kqueue/t_ioctl.c
index d996fdfbd575..78b058733457 100644
--- a/kernel/kqueue/t_ioctl.c
+++ b/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/kernel/kqueue/t_proc1.c b/kernel/kqueue/t_proc1.c
index 07d5a3c0279d..947e6e317a0a 100644
--- a/kernel/kqueue/t_proc1.c
+++ b/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/kernel/kqueue/t_proc2.c b/kernel/kqueue/t_proc2.c
index e70fcb279d1a..2d905ed740d9 100644
--- a/kernel/kqueue/t_proc2.c
+++ b/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,7 +32,7 @@
#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 $");
#include <sys/event.h>
#include <sys/time.h>
@@ -47,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/kernel/kqueue/t_proc3.c b/kernel/kqueue/t_proc3.c
index b77510becec7..6def4094b1bf 100644
--- a/kernel/kqueue/t_proc3.c
+++ b/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,7 +30,7 @@
*/
#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 $");
#include <sys/event.h>
#include <sys/time.h>
@@ -45,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/kernel/kqueue/t_sig.c b/kernel/kqueue/t_sig.c
index 4fc075847c89..e0efe825a46b 100644
--- a/kernel/kqueue/t_sig.c
+++ b/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,7 +32,7 @@
#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 $");
#include <sys/event.h>
#include <sys/ioctl.h>
@@ -48,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/kernel/kqueue/write/t_fifo.c b/kernel/kqueue/write/t_fifo.c
index 82b256cb625c..fe375b8fa943 100644
--- a/kernel/kqueue/write/t_fifo.c
+++ b/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/kernel/kqueue/write/t_pipe.c b/kernel/kqueue/write/t_pipe.c
index 459a1f7ad0b2..5b2ca8c22f5e 100644
--- a/kernel/kqueue/write/t_pipe.c
+++ b/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/kernel/kqueue/write/t_ttypty.c b/kernel/kqueue/write/t_ttypty.c
index 6983910f9573..45a67500f5b8 100644
--- a/kernel/kqueue/write/t_ttypty.c
+++ b/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/kernel/t_extent.c b/kernel/t_extent.c
index faefafae5f8d..57dfc2b6780f 100644
--- a/kernel/t_extent.c
+++ b/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/kernel/t_filedesc.c b/kernel/t_filedesc.c
index 6b367ee701c7..a938d6f0b178 100644
--- a/kernel/t_filedesc.c
+++ b/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/kernel/t_lock.c b/kernel/t_lock.c
index 3704afb14bc0..bd83abe97933 100644
--- a/kernel/t_lock.c
+++ b/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/kernel/t_ptrace.c b/kernel/t_ptrace.c
index 074a953a93e7..dc0bbdb6e14b 100644
--- a/kernel/t_ptrace.c
+++ b/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/kernel/t_ptrace_wait.c b/kernel/t_ptrace_wait.c
index e502a034eb1b..d8935904c516 100644
--- a/kernel/t_ptrace_wait.c
+++ b/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.57 2017/01/13 23:22:12 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.57 2017/01/13 23:22:12 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -48,7 +48,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 +65,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)
{
@@ -1296,12 +1297,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 +1478,196 @@ 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 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)
{
@@ -5015,6 +5200,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);
diff --git a/kernel/t_pty.c b/kernel/t_pty.c
index fccfc17b6eda..3b079ef616ba 100644
--- a/kernel/t_pty.c
+++ b/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/kernel/t_rnd.c b/kernel/t_rnd.c
index 86461308daa4..ae9ef5572023 100644
--- a/kernel/t_rnd.c
+++ b/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/lib/libc/gen/t_glob.c b/lib/libc/gen/t_glob.c
index ff62b638e12c..d741d939a43d 100644
--- a/lib/libc/gen/t_glob.c
+++ b/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.4 2017/01/13 21:30: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.4 2017/01/13 21:30:41 christos Exp $");
#include <atf-c.h>
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_glob.c,v 1.3 2013/01/02 11:28:48 martin Exp $");
#include <string.h>
#include <errno.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#ifdef DEBUG
diff --git a/lib/libc/regex/debug.c b/lib/libc/regex/debug.c
index c1528b9e8c95..e9ad4316198f 100644
--- a/lib/libc/regex/debug.c
+++ b/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,14 +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>
+#include <wchar.h>
+#include <wctype.h>
/* Don't sort these! */
#include "utils.h"
diff --git a/lib/libc/regex/t_exhaust.c b/lib/libc/regex/t_exhaust.c
index 468492c293aa..f9bd276f63d6 100644
--- a/lib/libc/regex/t_exhaust.c
+++ b/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,14 +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>
+#include <string.h>
#ifndef REGEX_MAXSIZE
#define REGEX_MAXSIZE 9999
@@ -176,14 +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");
- atf_tc_set_md_var(tc, "require.memory", "120M");
+ atf_tc_set_md_var(tc, "require.memory", "64M");
}
ATF_TC_BODY(regcomp_too_big, tc)
{
regex_t re;
+ struct rlimit limit;
int e;
+ limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024;
+ ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1);
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/lib/libc/regex/t_regex_att.c b/lib/libc/regex/t_regex_att.c
index beaeb04043bf..0425b6f2c58c 100644
--- a/lib/libc/regex/t_regex_att.c
+++ b/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.2 2017/01/14 00:50:56 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#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.2 2017/01/14 00:50:56 christos Exp $");
#include <sys/param.h>
@@ -374,7 +374,7 @@ checkmatches(const char *matches, size_t nm, const regmatch_t *pm,
" cur=%d, max=%zu", res, l, len - off);
off += l;
}
- ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno);
+ ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno);
free(res);
}
diff --git a/lib/libc/sys/t_clock_gettime.c b/lib/libc/sys/t_clock_gettime.c
index 69890fdf0523..a319b09bce73 100644
--- a/lib/libc/sys/t_clock_gettime.c
+++ b/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,22 +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>
-#include <machine/int_limits.h>
#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>
-#include "../../../h_macros.h"
+#include "h_macros.h"
#define MINPOSDIFF 15000000 /* 15 ms for now */
#define TIMEOUT 5
diff --git a/lib/libc/sys/t_connect.c b/lib/libc/sys/t_connect.c
index 9981090a5a70..a920d3def0ff 100644
--- a/lib/libc/sys/t_connect.c
+++ b/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>
@@ -52,6 +53,9 @@ ATF_TC_BODY(connect_low_port, tc)
slist = socket(AF_INET, SOCK_STREAM, 0);
sd = socket(AF_INET, SOCK_STREAM, 0);
+ ATF_REQUIRE(sd > 0);
+ ATF_REQUIRE(slist > 0);
+
/* bind listening socket */
memset(&sinlist, 0, sizeof(sinlist));
sinlist.sin_family = AF_INET;
@@ -88,6 +92,7 @@ ATF_TC_BODY(connect_low_port, tc)
ATF_REQUIRE(ntohs(sin.sin_port) <= IPPORT_RESERVEDMAX);
close(sd);
+ close(slist);
}
ATF_TC(connect_foreign_family);
diff --git a/lib/libc/sys/t_dup.c b/lib/libc/sys/t_dup.c
index a2623c09e7ef..93ad718c5497 100644
--- a/lib/libc/sys/t_dup.c
+++ b/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,6 +39,7 @@ __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>
diff --git a/lib/libc/sys/t_getrusage.c b/lib/libc/sys/t_getrusage.c
index 3aebb3dde9b9..90d74acf7b14 100644
--- a/lib/libc/sys/t_getrusage.c
+++ b/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,7 +47,7 @@ static void sighandler(int);
static const size_t maxiter = 2000;
static void
-sighandler(int signo)
+sighandler(int signo __unused)
{
/* Nothing. */
}
diff --git a/lib/libc/sys/t_link.c b/lib/libc/sys/t_link.c
index b58c4c9e6d8f..a6d894cc0894 100644
--- a/lib/libc/sys/t_link.c
+++ b/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,6 +37,7 @@ __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>
diff --git a/lib/libc/sys/t_listen.c b/lib/libc/sys/t_listen.c
index 71201d30af91..9f3f9b8413e2 100644
--- a/lib/libc/sys/t_listen.c
+++ b/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>
@@ -106,6 +107,7 @@ ATF_TC_BODY(listen_low_port, tc)
int sd, val;
sd = socket(AF_INET, SOCK_STREAM, 0);
+ ATF_REQUIRE_MSG(sd != -1, "socket failed: %s", strerror(errno));
val = IP_PORTRANGE_LOW;
if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE, &val,
diff --git a/lib/libc/sys/t_mmap.c b/lib/libc/sys/t_mmap.c
index 963b3c5cebeb..3dc1e7f92fe3 100644
--- a/lib/libc/sys/t_mmap.c
+++ b/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.11 2017/01/13 20:43:11 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
* 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.11 2017/01/13 20:43:11 christos Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@@ -444,6 +444,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);
}
@@ -496,6 +497,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/lib/libc/sys/t_msgctl.c b/lib/libc/sys/t_msgctl.c
index 1e74d60703ed..9f99980ae4ca 100644
--- a/lib/libc/sys/t_msgctl.c
+++ b/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>
diff --git a/lib/libc/sys/t_msgrcv.c b/lib/libc/sys/t_msgrcv.c
index e32be262aa15..522ceb82cd38 100644
--- a/lib/libc/sys/t_msgrcv.c
+++ b/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>
diff --git a/lib/libc/sys/t_msgsnd.c b/lib/libc/sys/t_msgsnd.c
index 54937897435f..598882131a7d 100644
--- a/lib/libc/sys/t_msgsnd.c
+++ b/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>
diff --git a/lib/libc/sys/t_nanosleep.c b/lib/libc/sys/t_nanosleep.c
index 317d66766408..1ad6661c808f 100644
--- a/lib/libc/sys/t_nanosleep.c
+++ b/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,7 +45,7 @@ __RCSID("$NetBSD: t_nanosleep.c,v 1.3 2013/03/31 16:47:16 christos Exp $");
#include <unistd.h>
static void
-handler(int signo)
+handler(int signo __unused)
{
/* Nothing. */
}
diff --git a/lib/libc/sys/t_pipe.c b/lib/libc/sys/t_pipe.c
index b30b94df702f..df8f1edd1d16 100644
--- a/lib/libc/sys/t_pipe.c
+++ b/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,6 +153,7 @@ ATF_TC_BODY(pipe_restart, tc)
ATF_REQUIRE_EQ(WEXITSTATUS(st), 0);
}
+ free(f);
}
ATF_TP_ADD_TCS(tp)
diff --git a/lib/libc/sys/t_pipe2.c b/lib/libc/sys/t_pipe2.c
index 51f22406a01b..12a9394b7f2b 100644
--- a/lib/libc/sys/t_pipe2.c
+++ b/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>
@@ -53,7 +53,8 @@ run(int flags)
while ((i = open("/", O_RDONLY)) < 3)
ATF_REQUIRE(i != -1);
- ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+ ATF_REQUIRE_MSG(closefrom(3) != -1, "closefrom failed: %s",
+ strerror(errno));
ATF_REQUIRE(pipe2(fd, flags) == 0);
@@ -110,9 +111,10 @@ ATF_TC_BODY(pipe2_consume, tc)
{
struct rlimit rl;
int err, filedes[2];
+ int old;
- err = fcntl(4, F_CLOSEM);
- ATF_REQUIRE(err == 0);
+ ATF_REQUIRE_MSG(closefrom(4) != -1, "closefrom failed: %s",
+ strerror(errno));
err = getrlimit(RLIMIT_NOFILE, &rl);
ATF_REQUIRE(err == 0);
@@ -121,12 +123,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.
*/
+ old = rl.rlim_cur;
rl.rlim_cur = 4;
err = setrlimit(RLIMIT_NOFILE, &rl);
ATF_REQUIRE(err == 0);
err = pipe2(filedes, O_CLOEXEC);
ATF_REQUIRE(err == -1);
+ rl.rlim_cur = old;
+ err = setrlimit(RLIMIT_NOFILE, &rl);
}
ATF_TC(pipe2_nonblock);
diff --git a/lib/libc/sys/t_posix_fadvise.c b/lib/libc/sys/t_posix_fadvise.c
index da4e7461c8af..813bfb8cba11 100644
--- a/lib/libc/sys/t_posix_fadvise.c
+++ b/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/lib/libc/sys/t_revoke.c b/lib/libc/sys/t_revoke.c
index 10fd6d64a00b..2fb1ae83fdda 100644
--- a/lib/libc/sys/t_revoke.c
+++ b/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>
@@ -167,6 +167,7 @@ ATF_TC_BODY(revoke_perm, tc)
if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS)
atf_tc_fail("revoke(2) did not obey permissions");
+ (void)close(fd);
ATF_REQUIRE(unlink(path) == 0);
}
diff --git a/lib/libc/sys/t_select.c b/lib/libc/sys/t_select.c
index 4316acf133d9..04a684a8cdea 100644
--- a/lib/libc/sys/t_select.c
+++ b/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,13 +47,13 @@
static sig_atomic_t keep_going = 1;
static void
-sig_handler(int signum)
+sig_handler(int signum __unused)
{
keep_going = 0;
}
static void
-sigchld(int signum)
+sigchld(int signum __unused)
{
}
@@ -82,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;
@@ -127,6 +127,7 @@ child(const struct timespec *ts)
"after timeout %s != %s",
prmask(&nset, nbuf, sizeof(nbuf)),
prmask(&oset, obuf, sizeof(obuf)));
+ _exit(0);
}
ATF_TC(pselect_sigmask);
@@ -146,6 +147,7 @@ ATF_TC_BODY(pselect_sigmask, tc)
switch (pid = fork()) {
case 0:
child(NULL);
+ /*NOTREACHED*/
case -1:
err(1, "fork");
default:
diff --git a/lib/libc/sys/t_setrlimit.c b/lib/libc/sys/t_setrlimit.c
index a38943e12458..bf7ae488f01d 100644
--- a/lib/libc/sys/t_setrlimit.c
+++ b/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>
@@ -122,6 +122,7 @@ out:
if (lim != 0)
atf_tc_fail("failed to set limit (%d)", lim);
+ free(buf);
}
ATF_TC(setrlimit_current);
diff --git a/lib/libc/sys/t_sigaction.c b/lib/libc/sys/t_sigaction.c
index f0e68bae77b9..4bbf421c6204 100644
--- a/lib/libc/sys/t_sigaction.c
+++ b/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,12 +41,12 @@ __RCSID("$NetBSD: t_sigaction.c,v 1.3 2014/11/04 00:20:19 justin Exp $");
#include <atf-c.h>
-#include "../../../h_macros.h"
+#include "h_macros.h"
static bool handler_called = false;
static void
-handler(int signo)
+handler(int signo __unused)
{
handler_called = true;
}
@@ -79,7 +79,7 @@ wait_and_check_child(const pid_t pid, const char *fail_message)
}
static void
-catch(int sig)
+catch(int sig __unused)
{
return;
}
diff --git a/lib/libc/sys/t_sigqueue.c b/lib/libc/sys/t_sigqueue.c
index f48d7919f0f7..317ee591162a 100644
--- a/lib/libc/sys/t_sigqueue.c
+++ b/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,12 +30,13 @@
*/
#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>
@@ -46,7 +47,7 @@ static void handler(int, siginfo_t *, void *);
static int value;
static void
-handler(int signo, siginfo_t *info, void *data)
+handler(int signo __unused, siginfo_t *info, void *data __unused)
{
value = info->si_value.sival_int;
kill(0, SIGINFO);
@@ -107,9 +108,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;
+ printf("Signal #%zu: signo: %d\n", (size_t)count, signo);
}
static int
@@ -176,7 +178,8 @@ ATF_TC_BODY(sigqueue_rt, tc)
sigset_t mask, orig;
sigemptyset(&mask);
for (size_t i = 0; i < CNT; i++)
- sigaddset(&mask, signals[i]);
+ if (sigaddset(&mask, signals[i]) == -1)
+ warn("sigaddset");
ATF_REQUIRE(sigprocmask(SIG_BLOCK, &mask, &orig) != -1);
@@ -185,13 +188,17 @@ ATF_TC_BODY(sigqueue_rt, tc)
ATF_REQUIRE(sigprocmask(SIG_UNBLOCK, &mask, &orig) != -1);
sleep(1);
- ATF_REQUIRE_MSG((size_t)count == ndelivered,
+ ATF_CHECK_MSG((size_t)count == ndelivered,
"count %zu != ndelivered %zu", (size_t)count, ndelivered);
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]);
+ if ((size_t)count > ndelivered)
+ for (size_t i = ndelivered; i < (size_t)count; i++)
+ printf("Undelivered signal #%zu: %d\n", i, ordered[i]);
+
for (size_t i = 0; i < ndelivered; i++)
ATF_REQUIRE(sigaction(signals[i], &oact[i], NULL) != -1);
}
diff --git a/lib/libc/sys/t_socketpair.c b/lib/libc/sys/t_socketpair.c
index 532629c3998d..266d738ccb0f 100644
--- a/lib/libc/sys/t_socketpair.c
+++ b/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>
@@ -63,7 +63,7 @@ run(int flags)
while ((i = open("/", O_RDONLY)) < 3)
ATF_REQUIRE(i != -1);
- ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+ ATF_REQUIRE(closefrom(3) != -1);
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
diff --git a/lib/libc/sys/t_stat.c b/lib/libc/sys/t_stat.c
index 0312e2f2f6db..adb32bb11efc 100644
--- a/lib/libc/sys/t_stat.c
+++ b/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>
@@ -392,6 +393,7 @@ 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);
}
diff --git a/lib/libc/sys/t_truncate.c b/lib/libc/sys/t_truncate.c
index 50a9cbaad4ec..5b96a20c9da9 100644
--- a/lib/libc/sys/t_truncate.c
+++ b/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,13 +29,14 @@
* 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>
@@ -149,6 +150,7 @@ ATF_TC_HEAD(truncate_err, tc)
ATF_TC_BODY(truncate_err, tc)
{
+ char buf[PATH_MAX];
errno = 0;
ATF_REQUIRE_ERRNO(EFAULT, truncate((void *)-1, 999) == -1);
@@ -160,7 +162,9 @@ ATF_TC_BODY(truncate_err, tc)
ATF_REQUIRE_ERRNO(ENOENT, truncate("/a/b/c/d/e/f/g", 999) == -1);
errno = 0;
- ATF_REQUIRE_ERRNO(EACCES, truncate("/usr/bin/fpr", 999) == -1);
+ snprintf(buf, sizeof(buf), "%s/truncate_test.root_owned",
+ atf_tc_get_config_var(tc, "srcdir"));
+ ATF_REQUIRE_ERRNO(EACCES, truncate(buf, 999) == -1);
}
ATF_TP_ADD_TCS(tp)
diff --git a/lib/libc/sys/t_umask.c b/lib/libc/sys/t_umask.c
index 748cbdcf1ada..fb3e405b5aa2 100644
--- a/lib/libc/sys/t_umask.c
+++ b/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,6 +129,7 @@ ATF_TC_BODY(umask_open, tc)
if (fd < 0)
continue;
+ (void)close(fd);
(void)memset(&st, 0, sizeof(struct stat));
if (stat(path, &st) != 0) {
diff --git a/lib/libc/sys/t_unlink.c b/lib/libc/sys/t_unlink.c
index 38bff4cf9a5c..6b05a0859b08 100644
--- a/lib/libc/sys/t_unlink.c
+++ b/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.3 2017/01/13 19:33:03 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.3 2017/01/13 19:33:03 christos Exp $");
#include <sys/stat.h>
@@ -107,8 +107,11 @@ ATF_TC_HEAD(unlink_fifo, tc)
ATF_TC_BODY(unlink_fifo, tc)
{
+ int fd;
- ATF_REQUIRE(mkfifo(path, 0666) == 0);
+ ATF_REQUIRE_MSG((fd = mkfifo(path, 0666)) == 0,
+ "mkfifo failed: %s", strerror(errno));
+ (void)close(fd);
ATF_REQUIRE(unlink(path) == 0);
errno = 0;
diff --git a/lib/libc/sys/t_wait.c b/lib/libc/sys/t_wait.c
index 163709bf3e78..fb8d6357904a 100644
--- a/lib/libc/sys/t_wait.c
+++ b/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,16 +29,17 @@
* 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>
diff --git a/lib/libc/sys/t_write.c b/lib/libc/sys/t_write.c
index 2b1324a0f900..576ce7e7c0b5 100644
--- a/lib/libc/sys/t_write.c
+++ b/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,15 +29,15 @@
#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>
-#include <sys/syslimits.h>
#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>
@@ -49,7 +49,7 @@ static bool fail = false;
static const char *path = "write";
static void
-sighandler(int signo)
+sighandler(int signo __unused)
{
fail = false;
}
diff --git a/lib/libm/t_ilogb.c b/lib/libm/t_ilogb.c
index 8e3d2990ce79..1d35cb64127b 100644
--- a/lib/libm/t_ilogb.c
+++ b/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,15 +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 $");
#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/lib/libm/t_scalbn.c b/lib/libm/t_scalbn.c
index 586c2c3bc621..4bf00c3415d1 100644
--- a/lib/libm/t_scalbn.c
+++ b/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,6 +81,7 @@ ATF_TC_BODY(scalbn_val, tc)
double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0;
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,
@@ -222,6 +223,7 @@ ATF_TC_BODY(scalbnf_val, tc)
double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0;
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,
@@ -366,6 +368,7 @@ ATF_TC_BODY(scalbnl_val, tc)
long double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0;
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/lib/libposix/t_rename.c b/lib/libposix/t_rename.c
index 85b2b95b3a68..8c18ec50168d 100644
--- a/lib/libposix/t_rename.c
+++ b/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/lib/librumpclient/t_fd.c b/lib/librumpclient/t_fd.c
index 6e6d9470e7a1..70182ab8c515 100644
--- a/lib/librumpclient/t_fd.c
+++ b/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/lib/semaphore/sem.c b/lib/semaphore/sem.c
index 5967b88d3fff..6af9b0d97bd3 100644
--- a/lib/semaphore/sem.c
+++ b/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/libexec/ld.elf_so/t_dlerror-cleared.c b/libexec/ld.elf_so/t_dlerror-cleared.c
index 03940c2de013..47c7f55bb285 100644
--- a/libexec/ld.elf_so/t_dlerror-cleared.c
+++ b/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/libexec/ld.elf_so/t_dlerror-false.c b/libexec/ld.elf_so/t_dlerror-false.c
index 8b80c260d630..31b96e8c18c1 100644
--- a/libexec/ld.elf_so/t_dlerror-false.c
+++ b/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/libexec/ld.elf_so/t_dlinfo.c b/libexec/ld.elf_so/t_dlinfo.c
index a15ba5d5a909..7b12528f9f54 100644
--- a/libexec/ld.elf_so/t_dlinfo.c
+++ b/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/libexec/ld.elf_so/t_ifunc.c b/libexec/ld.elf_so/t_ifunc.c
index 1c85672af5f7..68468d4483d4 100644
--- a/libexec/ld.elf_so/t_ifunc.c
+++ b/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/modules/t_builtin.c b/modules/t_builtin.c
index 0d9a3f0dc129..79845b85c553 100644
--- a/modules/t_builtin.c
+++ b/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/net/bpf/t_bpf.c b/net/bpf/t_bpf.c
index 95ca2fc48de7..5d7716c9738d 100644
--- a/net/bpf/t_bpf.c
+++ b/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.6 2017/01/13 21:30:42 christos 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.6 2017/01/13 21:30:42 christos 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);
diff --git a/net/bpf/t_mbuf.c b/net/bpf/t_mbuf.c
index 965dd02e285b..2076dc26aead 100644
--- a/net/bpf/t_mbuf.c
+++ b/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/net/bpfilter/t_bpfilter.c b/net/bpfilter/t_bpfilter.c
index 460b43e62d9b..15a9ab6e2c16 100644
--- a/net/bpfilter/t_bpfilter.c
+++ b/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/net/bpfjit/t_bpfjit.c b/net/bpfjit/t_bpfjit.c
index 58db1e06a083..06c3d97b734f 100644
--- a/net/bpfjit/t_bpfjit.c
+++ b/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/net/bpfjit/t_cop.c b/net/bpfjit/t_cop.c
index 5a007e6510a5..502c588e4a9b 100644
--- a/net/bpfjit/t_cop.c
+++ b/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/net/bpfjit/t_extmem.c b/net/bpfjit/t_extmem.c
index 915c4366467e..51761ec06128 100644
--- a/net/bpfjit/t_extmem.c
+++ b/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/net/bpfjit/t_mbuf.c b/net/bpfjit/t_mbuf.c
index 489ef802d9ab..d3a2b994c5a9 100644
--- a/net/bpfjit/t_mbuf.c
+++ b/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/net/carp/t_basic.c b/net/carp/t_basic.c
index fe2e6b5f2f66..681b8bb179a7 100644
--- a/net/carp/t_basic.c
+++ b/net/carp/t_basic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.5 2011/06/26 13:13:31 christos Exp $ */
+/* $NetBSD: t_basic.c,v 1.6 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_basic.c,v 1.5 2011/06/26 13:13:31 christos Exp $");
+__RCSID("$NetBSD: t_basic.c,v 1.6 2017/01/13 21:30:42 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -52,7 +52,7 @@ __RCSID("$NetBSD: t_basic.c,v 1.5 2011/06/26 13:13:31 christos Exp $");
#include <signal.h>
#include "../config/netconfig.c"
-#include "../../h_macros.h"
+#include "h_macros.h"
static bool oknow = false;
diff --git a/net/config/netconfig.c b/net/config/netconfig.c
index c2f9dd477896..6fe37cc23da3 100644
--- a/net/config/netconfig.c
+++ b/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/net/icmp/t_forward.c b/net/icmp/t_forward.c
index d4180271b449..346614c07151 100644
--- a/net/icmp/t_forward.c
+++ b/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/net/icmp/t_ping.c b/net/icmp/t_ping.c
index 68a00c7c2237..b3327e10e9e2 100644
--- a/net/icmp/t_ping.c
+++ b/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/net/if_loop/t_pr.c b/net/if_loop/t_pr.c
index a22953f933b2..ee4f68472c82 100644
--- a/net/if_loop/t_pr.c
+++ b/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/net/ndp/t_ra.sh b/net/ndp/t_ra.sh
index b2345704f462..69f227af498e 100755
--- a/net/ndp/t_ra.sh
+++ b/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/net/net/t_raw.c b/net/net/t_raw.c
index ef3262dfa372..5c483a180de5 100644
--- a/net/net/t_raw.c
+++ b/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/rump/modautoload/t_modautoload.c b/rump/modautoload/t_modautoload.c
index 2c21a90b664b..b45dae540993 100644
--- a/rump/modautoload/t_modautoload.c
+++ b/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/rump/rumpkern/t_kern.c b/rump/rumpkern/t_kern.c
index fcaf1f8178de..15b258605ba9 100644
--- a/rump/rumpkern/t_kern.c
+++ b/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/rump/rumpkern/t_lwproc.c b/rump/rumpkern/t_lwproc.c
index 6e78d0219e2b..f31997982c79 100644
--- a/rump/rumpkern/t_lwproc.c
+++ b/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/rump/rumpkern/t_modcmd.c b/rump/rumpkern/t_modcmd.c
index 032e31296a98..e48bcb53dbf7 100644
--- a/rump/rumpkern/t_modcmd.c
+++ b/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/rump/rumpkern/t_modlinkset.c b/rump/rumpkern/t_modlinkset.c
index a4d34bb913fd..7d725dc7cc07 100644
--- a/rump/rumpkern/t_modlinkset.c
+++ b/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/rump/rumpkern/t_signals.c b/rump/rumpkern/t_signals.c
index e113af29a1fa..ba0c0ea36fb2 100644
--- a/rump/rumpkern/t_signals.c
+++ b/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/rump/rumpkern/t_threads.c b/rump/rumpkern/t_threads.c
index 24155ec7ca14..2931fa60d148 100644
--- a/rump/rumpkern/t_threads.c
+++ b/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/rump/rumpkern/t_tsleep.c b/rump/rumpkern/t_tsleep.c
index efd9f4c4b270..126a89de5280 100644
--- a/rump/rumpkern/t_tsleep.c
+++ b/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/rump/rumpkern/t_vm.c b/rump/rumpkern/t_vm.c
index 4445983dcb56..ddb005c8eeae 100644
--- a/rump/rumpkern/t_vm.c
+++ b/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/rump/rumpvfs/t_basic.c b/rump/rumpvfs/t_basic.c
index c136558b579b..278d99eb31c3 100644
--- a/rump/rumpvfs/t_basic.c
+++ b/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/rump/rumpvfs/t_etfs.c b/rump/rumpvfs/t_etfs.c
index 787f5e6eb9df..5935bead8ee6 100644
--- a/rump/rumpvfs/t_etfs.c
+++ b/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/rump/rumpvfs/t_p2kifs.c b/rump/rumpvfs/t_p2kifs.c
index c94e5e19200e..ec2423cf5b95 100644
--- a/rump/rumpvfs/t_p2kifs.c
+++ b/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)