Commit more accepted upstream changes from <NetBSD>/tests/...

This includes a number of accepted patches for:
- lib/libc/sys
- lib/libm

christos was also nice enough to do the heavy lifting with the h_macros.h
#includes so testcases which use h_macros.h now can work more easily with
the FreeBSD tree's layout for contrib/netbsd-tests vs the testcases.
This commit is contained in:
Enji Cooper 2017-01-14 02:26:46 +00:00
parent b6bd3eb5f3
commit a72f1252fc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/NetBSD/tests/dist/; revision=312106
123 changed files with 607 additions and 348 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -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 *, \

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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"
/*

View File

@ -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

View File

@ -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(...) \

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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,

View File

@ -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)

View File

@ -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;

View File

@ -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"

View File

@ -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"

View File

@ -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)) \

View File

@ -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)

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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

View File

@ -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"

View File

@ -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 <regex.h>
#include <string.h>
#include <stdlib.h>
#include <err.h>
#include <sys/resource.h>
#include <atf-c.h>
#include <err.h>
#include <regex.h>
#include <stdio.h>
#include <stdlib.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);

View File

@ -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);
}

View File

@ -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

View File

@ -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);

View File

@ -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>

View File

@ -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. */
}

View File

@ -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>

View File

@ -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,

View File

@ -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;
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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. */
}

View File

@ -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)

View File

@ -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);

View File

@ -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>

View File

@ -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);
}

View File

@ -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:

View File

@ -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 @@ ATF_TC_BODY(setrlimit_basic, tc)
if (lim != 0)
atf_tc_fail("failed to set limit (%d)", lim);
free(buf);
}
ATF_TC(setrlimit_current);

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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)

View File

@ -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) {

View File

@ -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;

View File

@ -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>

View File

@ -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;
}

View File

@ -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 { \

View File

@ -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,

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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);

View File

@ -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"

View File

@ -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);

View File

@ -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)

View File

@ -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"

Some files were not shown because too many files have changed in this diff Show More