CVS commit: src/distrib/sets/lists/debug

2015-04-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  9 17:56:30 UTC 2015

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
add new test


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/distrib/sets/lists/debug/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.109 src/distrib/sets/lists/debug/mi:1.110
--- src/distrib/sets/lists/debug/mi:1.109	Sun Apr  5 02:37:25 2015
+++ src/distrib/sets/lists/debug/mi	Thu Apr  9 13:56:30 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.109 2015/04/05 06:37:25 martin Exp $
+# $NetBSD: mi,v 1.110 2015/04/09 17:56:30 christos Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -1870,6 +1870,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_nan_inf.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_round.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/ieeefp/t_subnormal.debug		tests-obsolete		obsolete
+./usr/libdata/debug/usr/tests/lib/libc/inet/t_inet_addr.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/inet/t_inet_network.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_ctype1.debug		tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/locale/t_ctype2.debug		tests-obsolete		obsolete



CVS commit: src

2015-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Apr  9 19:47:05 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c
src/external/cddl/osnet/dist/uts/common/fs/zfs/sys: zfs_znode.h
src/tests/fs/vfs: t_vnops.c

Log Message:
Advisory locking for zfs.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
cvs rdiff -u -r1.6 -r1.7 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h
cvs rdiff -u -r1.48 -r1.49 src/tests/fs/vfs/t_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.19 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.20
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.19	Thu Apr  9 19:35:55 2015
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Thu Apr  9 19:47:05 2015
@@ -5674,6 +5674,36 @@ zfs_netbsd_pathconf(void *v)
 #define	zfs_netbsd_unlock	genfs_unlock
 #define	zfs_netbsd_islocked	genfs_islocked
 
+static int
+zfs_netbsd_advlock(void *v)
+{
+	struct vop_advlock_args /* {
+		struct vnode *a_vp;
+		void *a_id;
+		int a_op;
+		struct flock *a_fl;
+		int a_flags;
+	} */ *ap = v;
+	struct vnode *vp;
+	struct znode *zp;
+	struct zfsvfs *zfsvfs;
+	int error;
+
+	vp = ap->a_vp;
+	KASSERT(vp != NULL);
+	zp = VTOZ(vp);
+	KASSERT(zp != NULL);
+	zfsvfs = zp->z_zfsvfs;
+	KASSERT(zfsvfs != NULL);
+
+	ZFS_ENTER(zfsvfs);
+	ZFS_VERIFY_ZP(zp);
+	error = lf_advlock(ap, &zp->z_lockf, zp->z_phys->zp_size);
+	ZFS_EXIT(zfsvfs);
+
+	return error;
+}
+
 /*
 int
 zfs_netbsd_getpages(void *v)
@@ -5753,8 +5783,8 @@ const struct vnodeopv_entry_desc zfs_vno
 	{ &vop_putpages_desc,		zfs_netbsd_putpages },
 	{ &vop_mmap_desc,		zfs_netbsd_mmap },
 	{ &vop_islocked_desc,		zfs_netbsd_islocked },
-#ifdef notyet
 	{ &vop_advlock_desc,		zfs_netbsd_advlock },
+#ifdef notyet
 	{ &vop_fcntl_desc,		zfs_netbsd_fcntl },
 	{ &vop_bmap_desc,		zfs_netbsd_bmap },
 	{ &vop_strategy_desc,		zfs_netbsd_strategy },		

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h:1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h:1.7
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h:1.6	Fri Dec  5 09:13:32 2014
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h	Thu Apr  9 19:47:05 2015
@@ -222,6 +222,10 @@ typedef struct znode {
 	 */
 	znode_phys_t	*z_phys;	/* pointer to persistent znode */
 	dmu_buf_t	*z_dbuf;	/* buffer containing the z_phys */
+	/*
+	 * NetBSD-specific fields.
+	 */
+	struct lockf	*z_lockf;	/* Head of byte-level lock list. */
 } znode_t;
 
 

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.48 src/tests/fs/vfs/t_vnops.c:1.49
--- src/tests/fs/vfs/t_vnops.c:1.48	Thu Apr  9 05:32:53 2015
+++ src/tests/fs/vfs/t_vnops.c	Thu Apr  9 19:47:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.48 2015/04/09 05:32:53 riastradh Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.49 2015/04/09 19:47:05 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -678,9 +678,6 @@ fcntl_lock(const atf_tc_t *tc, const cha
 	RL(fd = rump_sys_open(TESTFILE, O_RDWR | O_CREAT, 0755));
 	RL(rump_sys_ftruncate(fd, 8192));
 
-	/* PR kern/43321 */
-	if (FSTYPE_ZFS(tc))
-		atf_tc_expect_fail("PR kern/47656: Test known to be broken");
 	RL(rump_sys_fcntl(fd, F_SETLK, &l));
 
 	/* Next, we fork and try to lock the same area */
@@ -814,9 +811,6 @@ fcntl_getlock_pids(const atf_tc_t *tc, c
 
 		RL(rump_sys_ftruncate(fd[i], sz));
 
-		if (FSTYPE_ZFS(tc))
-			atf_tc_expect_fail("PR kern/47656: Test known to be "
-			"broken");
 		if (i < __arraycount(lock)) {
 			RL(rump_sys_fcntl(fd[i], F_SETLK, &lock[i]));
 			expect[i].l_pid = pid[i];



CVS commit: src/tests/fs/vfs

2015-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Apr  9 19:51:13 UTC 2015

Modified Files:
src/tests/fs/vfs: t_unpriv.c

Log Message:
Apparently I fixed t_unpriv:zfs_owner and didn't notice.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/fs/vfs/t_unpriv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/fs/vfs/t_unpriv.c
diff -u src/tests/fs/vfs/t_unpriv.c:1.11 src/tests/fs/vfs/t_unpriv.c:1.12
--- src/tests/fs/vfs/t_unpriv.c:1.11	Fri Aug 29 17:39:18 2014
+++ src/tests/fs/vfs/t_unpriv.c	Thu Apr  9 19:51:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_unpriv.c,v 1.11 2014/08/29 17:39:18 gson Exp $	*/
+/*	$NetBSD: t_unpriv.c,v 1.12 2015/04/09 19:51:13 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -55,8 +55,6 @@ owner(const atf_tc_t *tc, const char *mp
 	rump_pub_lwproc_rfork(RUMP_RFCFDG);
 	if (rump_sys_setuid(1) == -1)
 		atf_tc_fail_errno("setuid");
-	if (FSTYPE_ZFS(tc))
-		atf_tc_expect_fail("PR kern/47656: Test known to be broken");
 if (rump_sys_chown(".", 1, -1) != -1 || errno != EPERM)
 		atf_tc_fail_errno("chown");
 if (rump_sys_chmod(".", ) != -1 || errno != EPERM) 



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2015-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Apr  9 20:18:28 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Pass NetBSD VA_UTIMES_NULL through to ZFS as Solaris ATTR_UTIME.

Makes t_unpriv:zfs_times fail the wrong way instead of silently
allowing the change.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.20 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.21
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.20	Thu Apr  9 19:47:05 2015
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Thu Apr  9 20:18:28 2015
@@ -5153,9 +5153,12 @@ zfs_netbsd_setattr(void *v)
 	xvattr_t xvap;
 	u_long fflags;
 	uint64_t zflags;
+	int flags = 0;
 
 	vattr_init_mask(vap);
 	vap->va_mask &= ~AT_NOSET;
+	if (ISSET(vap->va_vaflags, VA_UTIMES_NULL))
+		flags |= ATTR_UTIME;
 
 	xva_init(&xvap);
 	xvap.xva_vattr = *vap;
@@ -5216,7 +5219,7 @@ zfs_netbsd_setattr(void *v)
 		xvap.xva_xoptattrs.xoa_nodump);
 #undef	FLAG_CHANGE
 	}
-	return (zfs_setattr(vp, (vattr_t *)&xvap, 0, cred, NULL));
+	return (zfs_setattr(vp, (vattr_t *)&xvap, flags, cred, NULL));
 }
 
 static int



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2015-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Apr  9 19:35:56 UTC 2015

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Remove some vestigial #if 0 sections.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.18 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.19
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.18	Wed Apr  9 22:41:38 2014
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Thu Apr  9 19:35:55 2015
@@ -4959,15 +4959,6 @@ zfs_netbsd_create(void *v)
 	KASSERT(cnp->cn_nameptr != NULL);
 	KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-	/*
-	 * ZFS doesn't require dvp to be BSD-locked, and the caller
-	 * expects us to drop this lock anyway, so we might as well
-	 * drop it early to encourage concurrency.
-	 */
-	VOP_UNLOCK(dvp);
-#endif
-
 	vattr_init_mask(vap);
 	mode = vap->va_mode & ALLPERMS;
 
@@ -5001,15 +4992,6 @@ zfs_netbsd_remove(void *v)
 	KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 	KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
 
-#if 0
-	/*
-	 * ZFS doesn't require dvp to be BSD-locked, and the caller
-	 * expects us to drop this lock anyway, so we might as well
-	 * drop it early to encourage concurrency.
-	 */
-	VOP_UNLOCK(dvp);
-#endif
-
 	/*
 	 * zfs_remove will look up the entry again itself, so discard vp.
 	 */
@@ -5052,15 +5034,6 @@ zfs_netbsd_mkdir(void *v)
 	KASSERT(cnp->cn_nameptr != NULL);
 	KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-	/*
-	 * ZFS doesn't require dvp to be BSD-locked, and the caller
-	 * expects us to drop this lock anyway, so we might as well
-	 * drop it early to encourage concurrency.
-	 */
-	VOP_UNLOCK(dvp);
-#endif
-
 	vattr_init_mask(vap);
 
 	error = zfs_mkdir(dvp, __UNCONST(cnp->cn_nameptr), vap, vpp,
@@ -5092,15 +5065,6 @@ zfs_netbsd_rmdir(void *v)
 	KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 	KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
 
-#if 0
-	/*
-	 * ZFS doesn't require dvp to be BSD-locked, and the caller
-	 * expects us to drop this lock anyway, so we might as well
-	 * drop it early to encourage concurrency.
-	 */
-	VOP_UNLOCK(dvp);
-#endif
-
 	/*
 	 * zfs_rmdir will look up the entry again itself, so discard vp.
 	 */
@@ -5354,15 +5318,6 @@ zfs_netbsd_symlink(void *v)
 	KASSERT(cnp->cn_nameptr != NULL);
 	KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-	/*
-	 * ZFS doesn't require dvp to be BSD-locked, and the caller
-	 * expects us to drop this lock anyway, so we might as well
-	 * drop it early to encourage concurrency.
-	 */
-	VOP_UNLOCK(dvp);
-#endif
-
 	vap->va_type = VLNK;	/* Netbsd: Syscall only sets va_mode. */
 	vattr_init_mask(vap);
 
@@ -5568,15 +5523,6 @@ zfs_netbsd_link(void *v)
 	KASSERT(cnp->cn_nameptr != NULL);
 	KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-	/*
-	 * ZFS doesn't require dvp to be BSD-locked, and the caller
-	 * expects us to drop this lock anyway, so we might as well
-	 * drop it early to encourage concurrency.
-	 */
-	VOP_UNLOCK(dvp);
-#endif
-
 	error = zfs_link(dvp, vp, __UNCONST(cnp->cn_nameptr), cnp->cn_cred,
 	NULL, 0);
 
@@ -5724,33 +5670,9 @@ zfs_netbsd_pathconf(void *v)
 	return (error);
 }
 
-#if 1
-#  define	zfs_netbsd_lock		genfs_lock
-#  define	zfs_netbsd_unlock	genfs_unlock
-#  define	zfs_netbsd_islocked	genfs_islocked
-#else
-int
-zfs_netbsd_lock(void *v)
-{
-	struct vop_lock_args *ap = v;
-
-	return 0;
-}
-
-int
-zfs_netbsd_unlock(void *v)
-{
-
-	return 0;
-}
-
-static int
-zfs_netbsd_islocked(void *v)
-{
-
-	return LK_EXCLUSIVE;
-}
-#endif
+#define	zfs_netbsd_lock		genfs_lock
+#define	zfs_netbsd_unlock	genfs_unlock
+#define	zfs_netbsd_islocked	genfs_islocked
 
 /*
 int



CVS commit: src/usr.bin/make

2015-04-09 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Thu Apr  9 18:21:01 UTC 2015

Modified Files:
src/usr.bin/make: job.c make.1

Log Message:
jobs mode handles '-' very differently to compat mode, but this is not
reflected in make.1
Also fix handling to match the behavior described in the comment
of JobPrintCommand (only matters if shell sets hasErrCtl).

A better long term solution is needed since the current behavior
is sub-optimal wrt '-' and different from all other makes.

Reviewed by: christos


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/usr.bin/make/job.c
cvs rdiff -u -r1.243 -r1.244 src/usr.bin/make/make.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.177 src/usr.bin/make/job.c:1.178
--- src/usr.bin/make/job.c:1.177	Wed Jul 16 15:33:41 2014
+++ src/usr.bin/make/job.c	Thu Apr  9 18:21:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.177 2014/07/16 15:33:41 christos Exp $	*/
+/*	$NetBSD: job.c,v 1.178 2015/04/09 18:21:01 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.177 2014/07/16 15:33:41 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.178 2015/04/09 18:21:01 sjg Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.177 2014/07/16 15:33:41 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.178 2015/04/09 18:21:01 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -715,7 +715,6 @@ JobPrintCommand(void *cmdp, void *jobp)
 	shutUp = DEBUG(LOUD) ? FALSE : TRUE;
 	break;
 	case '-':
-	job->flags |= JOB_IGNERR;
 	errOff = TRUE;
 	break;
 	case '+':
@@ -794,6 +793,7 @@ JobPrintCommand(void *cmdp, void *jobp)
 		 * to ignore errors. Set cmdTemplate to use the weirdness
 		 * instead of the simple "%s\n" template.
 		 */
+		job->flags |= JOB_IGNERR;
 		if (!(job->flags & JOB_SILENT) && !shutUp) {
 			if (commandShell->hasEchoCtl) {
 DBPRINTF("%s\n", commandShell->echoOff);

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.243 src/usr.bin/make/make.1:1.244
--- src/usr.bin/make/make.1:1.243	Sun Sep 14 08:47:19 2014
+++ src/usr.bin/make/make.1	Thu Apr  9 18:21:01 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.243 2014/09/14 08:47:19 apb Exp $
+.\"	$NetBSD: make.1,v 1.244 2015/04/09 18:21:01 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -481,6 +481,7 @@ This is similar to the effect of the .MA
 except that the effect can be limited to a single line of a script.
 A
 .Ql Ic \-
+in compatibility mode 
 causes any non-zero exit status of the command line to be ignored.
 .Pp
 When
@@ -495,6 +496,15 @@ If the command contains any shell meta c
 it will be passed to the shell; otherwise
 .Nm
 will attempt direct execution.
+If a line starts with
+.Ql Ic \- 
+and the shell has ErrCtl enabled then failure of the command line
+will be ignored as in compatibility mode.
+Otherwise 
+.Ql Ic \-
+affects the entire job;
+the script will stop at the first command line that fails,
+but the target will not be deemed to have failed.
 .Pp
 Makefiles should be written so that the mode of
 .Nm



CVS commit: src

2015-04-09 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Thu Apr  9 16:47:57 UTC 2015

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/inet: Makefile t_inet_network.c
Added Files:
src/tests/lib/libc/inet: t_inet_addr.c

Log Message:
Split inet_addr(3) tests from t_inet_network into stand-alone t_inet_addr,
so that t_inet_network only contains tests for inet_network(3).


To generate a diff of this commit:
cvs rdiff -u -r1.615 -r1.616 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/inet/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/inet/t_inet_addr.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/inet/t_inet_network.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.615 src/distrib/sets/lists/tests/mi:1.616
--- src/distrib/sets/lists/tests/mi:1.615	Sun Apr  5 06:37:25 2015
+++ src/distrib/sets/lists/tests/mi	Thu Apr  9 16:47:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.615 2015/04/05 06:37:25 martin Exp $
+# $NetBSD: mi,v 1.616 2015/04/09 16:47:57 ginsbach Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2454,6 +2454,7 @@
 ./usr/tests/lib/libc/inet			tests-lib-tests
 ./usr/tests/lib/libc/inet/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/inet/Kyuafile		tests-lib-tests		atf,kyua
+./usr/tests/lib/libc/inet/t_inet_addr		tests-lib-tests		atf
 ./usr/tests/lib/libc/inet/t_inet_network	tests-lib-tests		atf
 ./usr/tests/lib/libc/locale			tests-lib-tests
 ./usr/tests/lib/libc/locale/Atffile		tests-lib-tests		atf

Index: src/tests/lib/libc/inet/Makefile
diff -u src/tests/lib/libc/inet/Makefile:1.1 src/tests/lib/libc/inet/Makefile:1.2
--- src/tests/lib/libc/inet/Makefile:1.1	Thu Jan 13 13:53:49 2011
+++ src/tests/lib/libc/inet/Makefile	Thu Apr  9 16:47:56 2015
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.1 2011/01/13 13:53:49 pgoyette Exp $
+# $NetBSD: Makefile,v 1.2 2015/04/09 16:47:56 ginsbach Exp $
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/lib/libc/inet
 
-TESTS_C+=	t_inet_network
+TESTS_C+=	t_inet_addr t_inet_network
 
 .include 

Index: src/tests/lib/libc/inet/t_inet_network.c
diff -u src/tests/lib/libc/inet/t_inet_network.c:1.3 src/tests/lib/libc/inet/t_inet_network.c:1.4
--- src/tests/lib/libc/inet/t_inet_network.c:1.3	Fri Jul 15 11:27:23 2011
+++ src/tests/lib/libc/inet/t_inet_network.c	Thu Apr  9 16:47:56 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: t_inet_network.c,v 1.3 2011/07/15 11:27:23 jruoho Exp $ */
+/* $NetBSD: t_inet_network.c,v 1.4 2015/04/09 16:47:56 ginsbach Exp $ */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -32,79 +32,17 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_inet_network.c,v 1.3 2011/07/15 11:27:23 jruoho Exp $");
+__RCSID("$NetBSD: t_inet_network.c,v 1.4 2015/04/09 16:47:56 ginsbach Exp $");
 
 #include 
 
 #include 
-#include 
-#include 
 
 #define H_REQUIRE(input, expected)	\
 	ATF_REQUIRE_EQ_MSG(inet_network(input), (in_addr_t) expected,	\
 	"inet_network(%s) returned: 0x%08X, expected: %s", #input,	\
 	inet_network(input), #expected)
 
-ATF_TC(inet_addr_basic);
-ATF_TC_HEAD(inet_addr_basic, tc)
-{
-	atf_tc_set_md_var(tc, "descr", "Checks inet_addr(3)");
-}
-
-ATF_TC_BODY(inet_addr_basic, tc)
-{
-	static const char *addrs[] = {
-		"127.0.0.1", "99.99.99.99", "0.0.0.0", "255.255.255.255" };
-
-	struct in_addr ia;
-	const char *ian;
-	in_addr_t addr;
-	size_t i;
-
-	for (i = 0; i < __arraycount(addrs); i++) {
-
-		(void)fprintf(stderr, "checking %s\n", addrs[i]);;
-
-		addr = inet_addr(addrs[i]);
-		ia.s_addr = addr;
-		ian = inet_ntoa(ia);
-
-		ATF_REQUIRE(ian != NULL);
-		ATF_CHECK(strcmp(ian, addrs[i]) == 0);
-	}
-}
-
-ATF_TC(inet_addr_err);
-ATF_TC_HEAD(inet_addr_err, tc)
-{
-	atf_tc_set_md_var(tc, "descr", "Invalid addresses with inet_addr(3)");
-}
-
-ATF_TC_BODY(inet_addr_err, tc)
-{
-	static const char *addrs[] = {
-		". . . .", "1.2.3.", "0.0.0.256", "255.255.255.256",
-		"",
-		"a.b.c.d", "0x0.0x1.0x2.0x3", "-1.-1.-1.-1", "", " "};
-
-	struct in_addr ia;
-	const char *ian;
-	in_addr_t addr;
-	size_t i;
-
-	for (i = 0; i < __arraycount(addrs); i++) {
-
-		(void)fprintf(stderr, "checking %s\n", addrs[i]);;
-
-		addr = inet_addr(addrs[i]);
-		ia.s_addr = addr;
-		ian = inet_ntoa(ia);
-
-		ATF_REQUIRE(ian != NULL);
-		ATF_CHECK(strcmp(ian, addrs[i]) != 0);
-	}
-}
-
 ATF_TC(inet_network_basic);
 ATF_TC_HEAD(inet_network_basic, tc)
 {
@@ -161,8 +99,6 @@ ATF_TC_BODY(inet_network_err, tc)
 ATF_TP_ADD_TCS(tp)
 {
 
-	ATF_TP_ADD_TC(tp, inet_addr_basic);
-	ATF_TP_ADD_TC(tp, inet_addr_err);
 	ATF_TP_ADD_TC(tp, inet_network_basic);
 	ATF_TP_ADD_TC(tp, inet_network_err);
 

Added files:

Index: src/tests/lib/libc/inet/t_inet_addr.c
diff -u /dev/null src/tests/lib/libc/ine

CVS commit: src

2015-04-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Apr  9 10:55:23 UTC 2015

Modified Files:
src/etc/etc.evbarm: Makefile.inc
Added Files:
src/distrib/utils/embedded/conf: armv7.conf
Removed Files:
src/distrib/utils/embedded/conf: beagleboard.conf

Log Message:
Rename beagleboard.img to armv7.img. The new image includes the same
kernels as beagleboard.img plus support for Raspberry Pi 2, ODROID-C1,
Cubieboard2, Cubietruck, Hummingbird A31, and Banana Pi.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/utils/embedded/conf/armv7.conf
cvs rdiff -u -r1.18 -r0 src/distrib/utils/embedded/conf/beagleboard.conf
cvs rdiff -u -r1.71 -r1.72 src/etc/etc.evbarm/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.71 src/etc/etc.evbarm/Makefile.inc:1.72
--- src/etc/etc.evbarm/Makefile.inc:1.71	Mon Mar 16 22:18:14 2015
+++ src/etc/etc.evbarm/Makefile.inc	Thu Apr  9 10:55:23 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.71 2015/03/16 22:18:14 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.72 2015/04/09 10:55:23 jmcneill Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -133,7 +133,7 @@ __mkimage: .USE
 	TOOL_MTREE=${TOOL_MTREE} \
 	HOST_SH=${HOST_SH} \
 	${HOST_SH} ${MKIMAGE} -x -h ${.TARGET:S/smp_//} -D ${DESTDIR} \
-	-K ${.ALLSRC} -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
+	-S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \
 	${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz
 
 ARCHES.arm=		armv4 xscale armv5t armv6 armv7
@@ -162,23 +162,21 @@ BUILD_KERNELS+=		${board}_INSTALL
 KERNEL_SETS+=		${KERNEL_SETS.${arch}}
 .endfor
 
-.if !empty(KERNEL_SETS:MBEAGLEBOARD) && !empty(KERNEL_SETS:MBEAGLEBONE)
-smp_beagleboard: ${IMAGE.kern}/netbsd-BEAGLEBOARD.ub.gz __mkimage
-#XXX ${IMAGE.kern}/netbsd-BEAGLEBONE.ub.gz
-.if empty(ALL_KERNELS) || (!empty(ALL_KERNELS:MBEAGLEBOARD) && !empty(ALL_KERNELS:MBEAGLEBONE))
-SNAP_MD_POST_DEPS+=	smp_beagleboard
-.endif
+.if !empty(MACHINE_ARCH:M*armv7*) && empty(ALL_KERNELS)
+smp_armv7: __mkimage
+MKI_OPTS.smp_armv7=	-K ${IMAGE.kern}
+SNAP_MD_POST_DEPS+=	smp_armv7
 .endif
 
 .if !empty(KERNEL_SETS:MRPI)
-smp_rpi: ${IMAGE.kern}/netbsd-RPI.bin.gz __mkimage
-#XXX ${IMAGE.kern}/netbsd-RPI2.bin.gz
+smp_rpi: __mkimage
 .if empty(ALL_KERNELS) || !empty(ALL_KERNELS:MRPI)
+MKI_OPTS.smp_rpi=	-K ${IMAGE.kern}/netbsd-RPI.bin.gz
 SNAP_MD_POST_DEPS+=	smp_rpi
 .endif
-MKI_OPTS.smp_rpi_inst="-b"
 smp_rpi_inst: ${IMAGE.instk}/netbsd-RPI_INSTALL.bin.gz __mkimage
 .if empty(ALL_KERNELS) || !empty(ALL_KERNELS:MRPI_INSTALL)
+MKI_OPTS.smp_rpi_inst=	-b -K ${IMAGE.instk}/netbsd-RPI_INSTALL.bin.gz
 SNAP_MD_POST_DEPS+=	smp_rpi_inst
 .endif
 .endif

Added files:

Index: src/distrib/utils/embedded/conf/armv7.conf
diff -u /dev/null src/distrib/utils/embedded/conf/armv7.conf:1.1
--- /dev/null	Thu Apr  9 10:55:23 2015
+++ src/distrib/utils/embedded/conf/armv7.conf	Thu Apr  9 10:55:23 2015
@@ -0,0 +1,126 @@
+# $NetBSD: armv7.conf,v 1.1 2015/04/09 10:55:23 jmcneill Exp $
+# ARMv7 customization script used by mkimage
+#
+board=armv7
+console=fb
+
+. ${DIR}/conf/evbarm.conf
+
+kernels_beagle="BEAGLEBOARD BEAGLEBONE"
+kernels_awin="BPI CUBIEBOARD CUBIETRUCK HUMMINGBIRD_A31"
+kernels_rpi="RPI2"
+kernels_amlogic="ODROID-C1"
+
+make_filesystems() {
+	make_filesystems_evbarm
+}
+
+make_label() {
+	make_label_evbarm
+}
+
+make_fstab() {
+	make_fstab_evbarm
+}
+
+customize() {
+	customize_evbarm
+	cat >> ${mnt}/etc/rc.conf << EOF
+mdnsd=YES
+wscons=YES
+devpubd=YES
+EOF
+}
+
+populate_beagle() {
+	bboard_kernelimg=netbsd-BEAGLEBOARD.ub
+	bboard_loadaddr=8100
+	bbone_kernelimg=netbsd-BEAGLEBONE.ub
+	bbone_loadaddr=8200
+
+	# Create a uEnv.txt to auto boot the correct kernel
+	cat >> ${mnt}/boot/uEnv.txt << EOF
+loaduimage=if test \$board = am335x; then fatload mmc 0 ${bbone_loadaddr} ${bbone_kernelimg}; bootm ${bbone_loadaddr} root=ld0a; else fatload mmc 0 ${bboard_loadaddr} ${bboard_kernelimg}; bootm ${bboard_loadaddr} root=ld0a; fi
+EOF
+}
+
+populate_awin() {
+	cat >> ${mnt}/boot/uEnv.txt << EOF
+bootargs=root=ld0a console=${console}
+uenvcmd=mmc dev 0; mmc rescan; if test \$fdtfile = sun7i-a20-cubieboard2.dtb; then setenv kernel netbsd-CUBIEBOARD2.ub; elif test \$fdtfile = sun7i-a20-cubietruck.dtb; then setenv kernel netbsd-CUBIETRUCK.ub; elif test \$fdtfile = sun6i-a31-hummingbird.dtb; then setenv kernel netbsd-HUMMINGBIRD_A31.ub; elif test \$fdtfile = sun7i-a20-bananapi.dtb; then setenv kernel netbsd-BPI.ub; fi; fatload mmc 0:1 8200 ${kernel}; bootm 8200
+EOF
+}
+
+populate_rpi() {
+	firmwaredir=${src}/external/broadcom/rpi-firmware/dist
+	firmwarefiles="LICENCE.broadcom bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf"
+
+	# RPI2 kernel needs to be installed as kernel7.img
+	if [ -f "${mnt}/boot/netbsd-RPI2.bin" ]; then
+

CVS commit: src/sys/arch/arm/omap

2015-04-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Apr  9 21:33:54 UTC 2015

Modified Files:
src/sys/arch/arm/omap: omap4430_intr.h omap5430_intr.h

Log Message:
Add #define __HAVE_PIC_PENDING_INTRS for the non-GIC PICs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/omap4430_intr.h \
src/sys/arch/arm/omap/omap5430_intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/omap/omap4430_intr.h
diff -u src/sys/arch/arm/omap/omap4430_intr.h:1.2 src/sys/arch/arm/omap/omap4430_intr.h:1.3
--- src/sys/arch/arm/omap/omap4430_intr.h:1.2	Sat Sep  1 00:05:36 2012
+++ src/sys/arch/arm/omap/omap4430_intr.h	Thu Apr  9 21:33:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap4430_intr.h,v 1.2 2012/09/01 00:05:36 matt Exp $	*/
+/*	$NetBSD: omap4430_intr.h,v 1.3 2015/04/09 21:33:54 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -44,8 +44,9 @@
 #define	PIC_MAXMAXSOURCES	(PIC_MAXSOURCES+6*32)
 
 /*
- * The BCM53xx uses a generic interrupt controller so pull that stuff.
+ * The OMAP4 uses a generic interrupt controller so pull in that stuff.
  */
+#define __HAVE_PIC_PENDING_INTRS
 #include 
 #include   /* A9 Timer PPIs */
 
Index: src/sys/arch/arm/omap/omap5430_intr.h
diff -u src/sys/arch/arm/omap/omap5430_intr.h:1.2 src/sys/arch/arm/omap/omap5430_intr.h:1.3
--- src/sys/arch/arm/omap/omap5430_intr.h:1.2	Wed Apr  9 19:50:01 2014
+++ src/sys/arch/arm/omap/omap5430_intr.h	Thu Apr  9 21:33:54 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap5430_intr.h,v 1.2 2014/04/09 19:50:01 matt Exp $	*/
+/*	$NetBSD: omap5430_intr.h,v 1.3 2015/04/09 21:33:54 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -40,8 +40,9 @@
 #define PIC_MAXMAXSOURCES	(PIC_MAXSOURCES+8*32)
 
 /*
- * The BCM53xx uses a generic interrupt controller so pull that stuff.
+ * The OMAP5 uses a generic interrupt controller so pull in that stuff.
  */
+#define __HAVE_PIC_PENDING_INTRS
 #include 
 #include   /* Generic Timer PPIs */
 



CVS commit: src/usr.bin/make

2015-04-09 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Thu Apr  9 18:22:08 UTC 2015

Modified Files:
src/usr.bin/make: make.1

Log Message:
Forgot to tweak date


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/usr.bin/make/make.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.244 src/usr.bin/make/make.1:1.245
--- src/usr.bin/make/make.1:1.244	Thu Apr  9 18:21:01 2015
+++ src/usr.bin/make/make.1	Thu Apr  9 18:22:08 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.244 2015/04/09 18:21:01 sjg Exp $
+.\"	$NetBSD: make.1,v 1.245 2015/04/09 18:22:08 sjg Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd September 13, 2014
+.Dd April 9, 2014
 .Dt MAKE 1
 .Os
 .Sh NAME