CVS commit: src/tests/fs/psshfs

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sat Mar 16 07:54:04 UTC 2013

Modified Files:
src/tests/fs/psshfs: t_psshfs.sh

Log Message:
Use /bin/sh for a temporary script instead of querying the name of the
shell from atf-config.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/psshfs/t_psshfs.sh

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/psshfs/t_psshfs.sh
diff -u src/tests/fs/psshfs/t_psshfs.sh:1.6 src/tests/fs/psshfs/t_psshfs.sh:1.7
--- src/tests/fs/psshfs/t_psshfs.sh:1.6	Fri Aug 12 04:14:00 2011
+++ src/tests/fs/psshfs/t_psshfs.sh	Sat Mar 16 07:54:04 2013
@@ -1,4 +1,4 @@
-# $NetBSD: t_psshfs.sh,v 1.6 2011/08/12 04:14:00 riastradh Exp $
+# $NetBSD: t_psshfs.sh,v 1.7 2013/03/16 07:54:04 jmmv Exp $
 #
 # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -145,7 +145,7 @@ inode_nos_body() {
 	touch root/file4
 
 	cat ne_inodes.sh EOF
-#! $(atf-config -t atf_shell)
+#! /bin/sh
 #
 # Compares the inodes of the two given files and returns true if they are
 # different; false otherwise.



CVS commit: src/sys/dev/usb

2013-03-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 16 12:05:03 UTC 2013

Modified Files:
src/sys/dev/usb: dwc_otg.c

Log Message:
Fix misunderstanding of how to handle wMaxPacketSize.

The *_host_{setup,data}_[tr]x routines already split transfers into  mps
units, so there no reason to do it in *_setup_{ctrl,data}_chain. Fix
short_pkt handling in the process.

This gives urtwn a fighting change to Tx large packets.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/usb/dwc_otg.c

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

Modified files:

Index: src/sys/dev/usb/dwc_otg.c
diff -u src/sys/dev/usb/dwc_otg.c:1.47 src/sys/dev/usb/dwc_otg.c:1.48
--- src/sys/dev/usb/dwc_otg.c:1.47	Sat Feb 23 08:22:05 2013
+++ src/sys/dev/usb/dwc_otg.c	Sat Mar 16 12:05:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc_otg.c,v 1.47 2013/02/23 08:22:05 skrll Exp $	*/
+/*	$NetBSD: dwc_otg.c,v 1.48 2013/03/16 12:05:02 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.47 2013/02/23 08:22:05 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: dwc_otg.c,v 1.48 2013/03/16 12:05:02 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -2987,7 +2987,7 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 	return 0;	/* complete */
 
 /*
- * Else we need to transmit a short
+ * Else we need to transmit a 0 length
  * packet:
  */
 			}
@@ -3682,7 +3682,6 @@ dwc_otg_setup_ctrl_chain(usbd_xfer_handl
 	uint32_t len = UGETW(req-wLength);
 	struct dwc_otg_std_temp temp;	/* XXX */
 	struct dwc_otg_td *td;
-	int done;
 
 	DPRINTFN(3, type=0x%02x, request=0x%02x, wValue=0x%04x,
 	wIndex=0x%04x len=%d, addr=%d, endpt=%d, dir=%s, speed=%d\n,
@@ -3712,11 +3711,8 @@ dwc_otg_setup_ctrl_chain(usbd_xfer_handl
 	temp.short_pkt = 1;		/* We're 8 bytes this is short for HS */
 	temp.setup_alt_next = 0;	/* XXXNH */
 
-	DPRINTF(SE temp.len %d temp.pc %p\n, temp.len, temp.buf);
-
 	dwc_otg_setup_standard_chain_sub(temp);
 
-	done = 0;
 	KASSERT((temp.buf == NULL) == (temp.len == 0));
 	if (dir == UT_READ) {
 		temp.func = dwc_otg_host_data_rx;
@@ -3725,22 +3721,15 @@ dwc_otg_setup_ctrl_chain(usbd_xfer_handl
 	}
 
 	/* Optional Data stage */
-	while (done != len) {
+	if (len != 0) {
 
 		/* DATA0 / DATA1 message */
 
-		temp.buf = len ? KERNADDR(xfer-dmabuf, done) : NULL;
-		temp.len = len - done;
+		temp.buf = KERNADDR(xfer-dmabuf, 0);
+		temp.len = len;
 		temp.short_pkt = ( (xfer-flags  USBD_FORCE_SHORT_XFER) ? 0 : 1);
 
-		if (temp.len  UGETW(ed-wMaxPacketSize))
-			temp.len = UGETW(ed-wMaxPacketSize);
-
 		dwc_otg_setup_standard_chain_sub(temp);
-
-		done += temp.len;
-		if (temp.len)
-			temp.buf = (char *)KERNADDR(xfer-dmabuf, 0) + done;
 	}
 
 	/* Status Stage */
@@ -3783,9 +3772,6 @@ dwc_otg_setup_data_chain(usbd_xfer_handl
 	uint8_t dir = UE_GET_DIR(ed-bEndpointAddress);
 	struct dwc_otg_std_temp temp;	/* XXX */
 	struct dwc_otg_td *td;
-	int off;
-	int done;
-	int len;
 
 	DPRINTFN(3, xfer=%p, len=%d, flags=%d, addr=%d, endpt=%d, dir %s\n,
 	xfer, xfer-length, xfer-flags, dev-address,
@@ -3806,30 +3792,27 @@ dwc_otg_setup_data_chain(usbd_xfer_handl
 	temp.did_stall = 0; /* !xfer-flags_int.control_stall; */
 	temp.func = NULL;
 
-	done = 0;
 	if (dir == UE_DIR_IN) {
 		temp.func = dwc_otg_host_data_rx;
 	} else {
 		temp.func = dwc_otg_host_data_tx;
 	}
 
-	/* Data stage */
-	off = 0;
-	len = xfer-length;
-	while (len  0) {
-		/* DATA0 / DATA1 message */
-		temp.buf = KERNADDR(xfer-dmabuf, off);
-		temp.len = MIN(len, UGETW(ed-wMaxPacketSize));
-		temp.short_pkt = (xfer-flags  USBD_FORCE_SHORT_XFER) ? 0 : 1;
-		if (len = UGETW(ed-wMaxPacketSize))
-			temp.setup_alt_next = 0;
+	/* DATA0 / DATA1 message */
+	temp.buf = KERNADDR(xfer-dmabuf, 0);
+	temp.len = xfer-length;
+	if (temp.len == 0) {
 
-		dwc_otg_setup_standard_chain_sub(temp);
+		/* make sure that we send an USB packet */
 
-		len -= temp.len;
-		off += temp.len;
+		temp.short_pkt = 0;
+
+	} else {
+		temp.short_pkt = (xfer-flags  USBD_FORCE_SHORT_XFER) ? 0 : 1;
 	}
 
+	dwc_otg_setup_standard_chain_sub(temp);
+
 	/* must have at least one frame! */
 	td = temp.td;
 	dxfer-td_transfer_last = td;



CVS commit: src/sys

2013-03-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Mar 16 15:48:21 UTC 2013

Modified Files:
src/sys/arch/evbarm/conf: std.rpi
src/sys/dev/usb: if_urtwnvar.h

Log Message:
As a workaround for the Raspberry PI, only allow 1 TX transfer to be
active at once.

XXX This might affect all host controllers


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/std.rpi
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_urtwnvar.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/evbarm/conf/std.rpi
diff -u src/sys/arch/evbarm/conf/std.rpi:1.6 src/sys/arch/evbarm/conf/std.rpi:1.7
--- src/sys/arch/evbarm/conf/std.rpi:1.6	Tue Feb 19 10:58:35 2013
+++ src/sys/arch/evbarm/conf/std.rpi	Sat Mar 16 15:48:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: std.rpi,v 1.6 2013/02/19 10:58:35 skrll Exp $
+#	$NetBSD: std.rpi,v 1.7 2013/03/16 15:48:21 skrll Exp $
 #
 # standard NetBSD/evbarm for Raspberry Pi options
 
@@ -13,6 +13,7 @@ options 	__HAVE_FAST_SOFTINTS		# should 
 options 	__HAVE_CPU_UAREA_ALLOC_IDLELWP
 options 	TPIDRPRW_IS_CURCPU
 options 	KERNEL_BASE_EXT=0xc000
+options 	URTWN_DOTG_WORKAROUND
 
 options 	EVBARM_BOARDTYPE=rpi
 makeoptions	BOARDMKFRAG=${THISARM}/conf/mk.rpi

Index: src/sys/dev/usb/if_urtwnvar.h
diff -u src/sys/dev/usb/if_urtwnvar.h:1.5 src/sys/dev/usb/if_urtwnvar.h:1.6
--- src/sys/dev/usb/if_urtwnvar.h:1.5	Tue Mar 12 14:19:34 2013
+++ src/sys/dev/usb/if_urtwnvar.h	Sat Mar 16 15:48:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwnvar.h,v 1.5 2013/03/12 14:19:34 christos Exp $	*/
+/*	$NetBSD: if_urtwnvar.h,v 1.6 2013/03/16 15:48:21 skrll Exp $	*/
 /*	$OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $	*/
 
 /*-
@@ -23,7 +23,12 @@
  * Driver definitions.
  */
 #define URTWN_RX_LIST_COUNT		1
+#ifndef URTWN_DOTG_WORKAROUND
 #define URTWN_TX_LIST_COUNT		8
+#else
+#define URTWN_TX_LIST_COUNT		1
+#endif
+
 #define URTWN_HOST_CMD_RING_COUNT	32
 
 #define URTWN_RXBUFSZ	(16 * 1024)



CVS commit: src/distrib/utils/sysinst

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 17:10:18 UTC 2013

Modified Files:
src/distrib/utils/sysinst: defs.h msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl util.c

Log Message:
add debugging sets


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/distrib/utils/sysinst/defs.h
cvs rdiff -u -r1.71 -r1.72 src/distrib/utils/sysinst/msg.mi.de
cvs rdiff -u -r1.176 -r1.177 src/distrib/utils/sysinst/msg.mi.en
cvs rdiff -u -r1.48 -r1.49 src/distrib/utils/sysinst/msg.mi.es
cvs rdiff -u -r1.130 -r1.131 src/distrib/utils/sysinst/msg.mi.fr
cvs rdiff -u -r1.87 -r1.88 src/distrib/utils/sysinst/msg.mi.pl
cvs rdiff -u -r1.180 -r1.181 src/distrib/utils/sysinst/util.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/utils/sysinst/defs.h
diff -u src/distrib/utils/sysinst/defs.h:1.163 src/distrib/utils/sysinst/defs.h:1.164
--- src/distrib/utils/sysinst/defs.h:1.163	Fri Jun 22 16:54:39 2012
+++ src/distrib/utils/sysinst/defs.h	Sat Mar 16 13:10:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.163 2012/06/22 20:54:39 abs Exp $	*/
+/*	$NetBSD: defs.h,v 1.164 2013/03/16 17:10:16 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -130,6 +130,10 @@ enum {
 SET_GNUSRC,
 SET_XSRC,
 
+/* Debug sets */
+SET_DEBUG,
+SET_XDEBUG,
+
 SET_LAST,
 SET_GROUP,		/* Start of submenu */
 SET_GROUP_END,	/* End of submenu */
@@ -155,6 +159,9 @@ enum {
 /* All source sets */
 #define SET_SOURCE SET_SYSSRC, SET_SRC, SET_SHARESRC, SET_GNUSRC, SET_XSRC
 
+/* All debug sets */
+#define SET_DEBUGGING SET_DEBUG, SET_XDEBUG
+
 /* Set list flags */
 #define SFLAG_MINIMAL	1
 #define	SFLAG_NOX	2

Index: src/distrib/utils/sysinst/msg.mi.de
diff -u src/distrib/utils/sysinst/msg.mi.de:1.71 src/distrib/utils/sysinst/msg.mi.de:1.72
--- src/distrib/utils/sysinst/msg.mi.de:1.71	Thu Oct 25 11:05:22 2012
+++ src/distrib/utils/sysinst/msg.mi.de	Sat Mar 16 13:10:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.71 2012/10/25 15:05:22 tsutsui Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.72 2013/03/16 17:10:16 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -850,6 +850,12 @@ message set_gnusrc
 message set_xsrc
 {X11 Quelltexte}
 
+message set_debug
+{Debuggen Sets}
+
+message set_xdebug
+{Debuggen X11 Sets}
+
 message cur_distsets_row
 {%-27s %3s}
 

Index: src/distrib/utils/sysinst/msg.mi.en
diff -u src/distrib/utils/sysinst/msg.mi.en:1.176 src/distrib/utils/sysinst/msg.mi.en:1.177
--- src/distrib/utils/sysinst/msg.mi.en:1.176	Thu Oct 25 11:05:22 2012
+++ src/distrib/utils/sysinst/msg.mi.en	Sat Mar 16 13:10:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.176 2012/10/25 15:05:22 tsutsui Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.177 2013/03/16 17:10:16 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -790,6 +790,12 @@ message set_gnusrc
 message set_xsrc
 {X11 sources}
 
+message set_debug
+{debug sets}
+
+message set_xdebug
+{debug X11 sets}
+
 message cur_distsets_row
 {%-27s %3s}
 

Index: src/distrib/utils/sysinst/msg.mi.es
diff -u src/distrib/utils/sysinst/msg.mi.es:1.48 src/distrib/utils/sysinst/msg.mi.es:1.49
--- src/distrib/utils/sysinst/msg.mi.es:1.48	Thu Oct 25 11:05:22 2012
+++ src/distrib/utils/sysinst/msg.mi.es	Sat Mar 16 13:10:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.es,v 1.48 2012/10/25 15:05:22 tsutsui Exp $	*/
+/*	$NetBSD: msg.mi.es,v 1.49 2013/03/16 17:10:17 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -814,6 +814,12 @@ message set_gnusrc
 message set_xsrc
 {X11 sources}
 
+message set_debug
+{debug sets}
+
+message set_xdebug
+{debug X11 sets}
+
 message cur_distsets_row
 {%-27s %3s}
 

Index: src/distrib/utils/sysinst/msg.mi.fr
diff -u src/distrib/utils/sysinst/msg.mi.fr:1.130 src/distrib/utils/sysinst/msg.mi.fr:1.131
--- src/distrib/utils/sysinst/msg.mi.fr:1.130	Thu Oct 25 11:05:23 2012
+++ src/distrib/utils/sysinst/msg.mi.fr	Sat Mar 16 13:10:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.130 2012/10/25 15:05:23 tsutsui Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.131 2013/03/16 17:10:17 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -870,6 +870,12 @@ message set_gnusrc
 message set_xsrc
 {Sources X11}
 
+message set_debug
+{Debug}
+
+message set_xdebug
+{Debug X11}
+
 message cur_distsets_row
 {%-33s %3s}
 

Index: src/distrib/utils/sysinst/msg.mi.pl
diff -u src/distrib/utils/sysinst/msg.mi.pl:1.87 src/distrib/utils/sysinst/msg.mi.pl:1.88
--- src/distrib/utils/sysinst/msg.mi.pl:1.87	Thu Oct 25 11:05:23 2012
+++ src/distrib/utils/sysinst/msg.mi.pl	Sat Mar 16 13:10:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.pl,v 1.87 2012/10/25 15:05:23 tsutsui Exp $	*/
+/*	$NetBSD: msg.mi.pl,v 1.88 2013/03/16 17:10:17 christos Exp $	*/
 /*	Based on english version: */
 /*	NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat 

CVS commit: src/sys/rump/net/lib/libvirtif

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 21:37:04 UTC 2013

Modified Files:
src/sys/rump/net/lib/libvirtif: rumpcomp_user.c

Log Message:
fix the build!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/net/lib/libvirtif/rumpcomp_user.c

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

Modified files:

Index: src/sys/rump/net/lib/libvirtif/rumpcomp_user.c
diff -u src/sys/rump/net/lib/libvirtif/rumpcomp_user.c:1.2 src/sys/rump/net/lib/libvirtif/rumpcomp_user.c:1.3
--- src/sys/rump/net/lib/libvirtif/rumpcomp_user.c:1.2	Wed Mar 13 17:17:32 2013
+++ src/sys/rump/net/lib/libvirtif/rumpcomp_user.c	Sat Mar 16 17:37:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpcomp_user.c,v 1.2 2013/03/13 21:17:32 pooka Exp $	*/
+/*	$NetBSD: rumpcomp_user.c,v 1.3 2013/03/16 21:37:04 christos Exp $	*/
 
 /*
  * Copyright (c) 2013 Antti Kantee.  All Rights Reserved.
@@ -25,6 +25,7 @@
  * SUCH DAMAGE.
  */
 
+#ifndef _KERNEL
 #include sys/types.h
 #include sys/ioctl.h
 #include sys/uio.h
@@ -180,3 +181,4 @@ rumpcomp_virtif_destroy(struct virtif_us
 
 	rumpuser_component_schedule(cookie);
 }
+#endif



CVS commit: src/sys/rump

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 21:38:21 UTC 2013

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Fix the build w/o DESTDIR


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.74 src/sys/rump/Makefile.rump:1.75
--- src/sys/rump/Makefile.rump:1.74	Fri Mar 15 08:42:18 2013
+++ src/sys/rump/Makefile.rump	Sat Mar 16 17:38:21 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.74 2013/03/15 12:42:18 pooka Exp $
+#	$NetBSD: Makefile.rump,v 1.75 2013/03/16 21:38:21 christos Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -83,22 +83,27 @@ DPSRCS+=	${RUMPTOP}/Makefile.rump
 # Support for component-specific hypercalls
 #
 
+
 .ifdef RUMPCOMP_USER
+.if empty(DESTDIR)
+DESTDIR=/
+.endif
+BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR}
 rumpcomp_user.d: rumpcomp_user.c
 	${_MKTARGET_CREATE}
-	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS:U-isysroot ${DESTDIR}} ${RUMPCOMP_USER_CPPFLAGS} ${.CURDIR}/rumpcomp_user.c
+	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:M*.c}
 
 rumpcomp_user.o: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS:U-isysroot ${DESTDIR}} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.CURDIR}/rumpcomp_user.c
+	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:M*.c}
 
 rumpcomp_user.pico: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS:U-isysroot ${DESTDIR}} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.CURDIR}/rumpcomp_user.c
+	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:M*.c}
 
 rumpcomp_user.po: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS:U-isysroot ${DESTDIR}} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.CURDIR}/rumpcomp_user.c
+	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:M*.c}
 
 RUMPCOMP_USEROBJ=rumpcomp_user.*o
 SRCS+=rumpcomp_user.c



CVS commit: src/distrib/utils/sysinst

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 22:16:02 UTC 2013

Modified Files:
src/distrib/utils/sysinst: defs.h util.c

Log Message:
fix debugging sets


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/distrib/utils/sysinst/defs.h
cvs rdiff -u -r1.181 -r1.182 src/distrib/utils/sysinst/util.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/utils/sysinst/defs.h
diff -u src/distrib/utils/sysinst/defs.h:1.164 src/distrib/utils/sysinst/defs.h:1.165
--- src/distrib/utils/sysinst/defs.h:1.164	Sat Mar 16 13:10:16 2013
+++ src/distrib/utils/sysinst/defs.h	Sat Mar 16 18:16:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.164 2013/03/16 17:10:16 christos Exp $	*/
+/*	$NetBSD: defs.h,v 1.165 2013/03/16 22:16:02 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -132,7 +132,7 @@ enum {
 
 /* Debug sets */
 SET_DEBUG,
-SET_XDEBUG,
+SET_X11_DEBUG,
 
 SET_LAST,
 SET_GROUP,		/* Start of submenu */
@@ -160,7 +160,7 @@ enum {
 #define SET_SOURCE SET_SYSSRC, SET_SRC, SET_SHARESRC, SET_GNUSRC, SET_XSRC
 
 /* All debug sets */
-#define SET_DEBUGGING SET_DEBUG, SET_XDEBUG
+#define SET_DEBUGGING SET_DEBUG, SET_X11_DEBUG
 
 /* Set list flags */
 #define SFLAG_MINIMAL	1

Index: src/distrib/utils/sysinst/util.c
diff -u src/distrib/utils/sysinst/util.c:1.181 src/distrib/utils/sysinst/util.c:1.182
--- src/distrib/utils/sysinst/util.c:1.181	Sat Mar 16 13:10:17 2013
+++ src/distrib/utils/sysinst/util.c	Sat Mar 16 18:16:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.181 2013/03/16 17:10:17 christos Exp $	*/
+/*	$NetBSD: util.c,v 1.182 2013/03/16 22:16:02 christos Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -68,7 +68,7 @@
 #define MD_SETS_SELECTED_NOX SET_KERNEL_1, SET_SYSTEM, SET_MD
 #endif
 #ifndef MD_SETS_VALID
-#define MD_SETS_VALID SET_KERNEL, SET_SYSTEM, SET_X11, SET_MD, SET_SOURCE SET_DEBUGGING
+#define MD_SETS_VALID SET_KERNEL, SET_SYSTEM, SET_X11, SET_MD, SET_SOURCE, SET_DEBUGGING
 #endif
 
 #define MAX_CD_DEVS	256	/* how many cd drives do we expect to attach */



CVS commit: src/tools/binstall

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 22:32:50 UTC 2013

Modified Files:
src/tools/binstall: Makefile

Log Message:
no man pages for tools build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tools/binstall/Makefile

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

Modified files:

Index: src/tools/binstall/Makefile
diff -u src/tools/binstall/Makefile:1.10 src/tools/binstall/Makefile:1.11
--- src/tools/binstall/Makefile:1.10	Fri Mar 15 22:51:25 2013
+++ src/tools/binstall/Makefile	Sat Mar 16 18:32:50 2013
@@ -1,5 +1,6 @@
-#	$NetBSD: Makefile,v 1.10 2013/03/16 02:51:25 christos Exp $
+#	$NetBSD: Makefile,v 1.11 2013/03/16 22:32:50 christos Exp $
 
+NOMAN=
 .include bsd.own.mk
 
 HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-install
@@ -11,7 +12,6 @@ CPPFLAGS+=	-DTARGET_STRIP=\${STRIP}\
 # from ${TOOLDIR}.
 NOCOMPATLIB=
 
-
 # Use uninstalled copy of host-mkdep
 HOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep  ${PRINTOBJDIR}
 HOST_MKDEP=	${HOST_MKDEP_OBJ}/host-mkdep



CVS commit: src/sys/arch/sparc64/include

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 23:04:23 UTC 2013

Modified Files:
src/sys/arch/sparc64/include: asm.h locore.h

Log Message:
move the useful macros somewhere where they can be used in userland.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc64/include/asm.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc64/include/locore.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/sparc64/include/asm.h
diff -u src/sys/arch/sparc64/include/asm.h:1.19 src/sys/arch/sparc64/include/asm.h:1.20
--- src/sys/arch/sparc64/include/asm.h:1.19	Sat Jul 20 07:52:21 2002
+++ src/sys/arch/sparc64/include/asm.h	Sat Mar 16 19:04:22 2013
@@ -1,3 +1,66 @@
-/*   $NetBSD: asm.h,v 1.19 2002/07/20 11:52:21 mrg Exp $*/
+/*   $NetBSD: asm.h,v 1.20 2013/03/16 23:04:22 christos Exp $*/
 
 #include sparc/asm.h
+
+/*
+ * Here are some defines to try to maintain consistency but still
+ * support 32-and 64-bit compilers.
+ */
+#ifdef _LP64
+/* reg that points to base of data/text segment */
+#define	BASEREG	%g4
+/* first constants for storage allocation */
+#define LNGSZ		8
+#define LNGSHFT		3
+#define PTRSZ		8
+#define PTRSHFT		3
+#define POINTER		.xword
+#define ULONG		.xword
+/* Now instructions to load/store pointers  long ints */
+#define LDLNG		ldx
+#define LDULNG		ldx
+#define STLNG		stx
+#define STULNG		stx
+#define LDPTR		ldx
+#define LDPTRA		ldxa
+#define STPTR		stx
+#define STPTRA		stxa
+#define	CASPTR		casxa
+/* Now something to calculate the stack bias */
+#define STKB		BIAS
+#define	CCCR		%xcc
+#else
+#define	BASEREG		%g0
+#define LNGSZ		4
+#define LNGSHFT		2
+#define PTRSZ		4
+#define PTRSHFT		2
+#define POINTER		.word
+#define ULONG		.word
+/* Instructions to load/store pointers  long ints */
+#define LDLNG		ldsw
+#define LDULNG		lduw
+#define STLNG		stw
+#define STULNG		stw
+#define LDPTR		lduw
+#define LDPTRA		lduwa
+#define STPTR		stw
+#define STPTRA		stwa
+#define	CASPTR		casa
+#define STKB		0
+#define	CCCR		%icc
+#endif
+
+#if defined(_KERNEL) || defined(_RUMPKERNEL)
+/* Give this real authority: reset the machine */
+#define NOTREACHED	sir
+#else
+#define NOTREACHED
+#endif
+
+/* if  32, copy by bytes, memcpy, kcopy, ... */
+#define	BCOPY_SMALL	32
+
+/* use as needed to align things on longword boundaries */
+#define	_ALIGN	.align 8
+#define ICACHE_ALIGN	.align	32

Index: src/sys/arch/sparc64/include/locore.h
diff -u src/sys/arch/sparc64/include/locore.h:1.5 src/sys/arch/sparc64/include/locore.h:1.6
--- src/sys/arch/sparc64/include/locore.h:1.5	Sat Jul 10 06:10:36 2010
+++ src/sys/arch/sparc64/include/locore.h	Sat Mar 16 19:04:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.h,v 1.5 2010/07/10 10:10:36 nakayama Exp $	*/
+/*	$NetBSD: locore.h,v 1.6 2013/03/16 23:04:22 christos Exp $	*/
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -32,65 +32,6 @@
 #define	CPCB	(CPUINFO_VA + CI_CPCB)
 #define	FPLWP	(CPUINFO_VA + CI_FPLWP)
 
-/*
- * Here are some defines to try to maintain consistency but still
- * support 32-and 64-bit compilers.
- */
-#ifdef _LP64
-/* reg that points to base of data/text segment */
-#define	BASEREG	%g4
-/* first constants for storage allocation */
-#define LNGSZ		8
-#define LNGSHFT		3
-#define PTRSZ		8
-#define PTRSHFT		3
-#define POINTER		.xword
-#define ULONG		.xword
-/* Now instructions to load/store pointers  long ints */
-#define LDLNG		ldx
-#define LDULNG		ldx
-#define STLNG		stx
-#define STULNG		stx
-#define LDPTR		ldx
-#define LDPTRA		ldxa
-#define STPTR		stx
-#define STPTRA		stxa
-#define	CASPTR		casxa
-/* Now something to calculate the stack bias */
-#define STKB		BIAS
-#define	CCCR		%xcc
-#else
-#define	BASEREG		%g0
-#define LNGSZ		4
-#define LNGSHFT		2
-#define PTRSZ		4
-#define PTRSHFT		2
-#define POINTER		.word
-#define ULONG		.word
-/* Instructions to load/store pointers  long ints */
-#define LDLNG		ldsw
-#define LDULNG		lduw
-#define STLNG		stw
-#define STULNG		stw
-#define LDPTR		lduw
-#define LDPTRA		lduwa
-#define STPTR		stw
-#define STPTRA		stwa
-#define	CASPTR		casa
-#define STKB		0
-#define	CCCR		%icc
-#endif
-
-/* Give this real authority: reset the machine */
-#define NOTREACHED	sir
-
-/* if  32, copy by bytes, memcpy, kcopy, ... */
-#define	BCOPY_SMALL	32
-
-/* use as needed to align things on longword boundaries */
-#define	_ALIGN	.align 8
-#define ICACHE_ALIGN	.align	32
-
 /* A few convenient abbreviations for trapframe fields. */
 #define	TF_G	TF_GLOBAL
 #define	TF_O	TF_OUT



CVS commit: src/doc

2013-03-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Mar 16 23:35:02 UTC 2013

Removed Files:
src/doc: NetBSD-6

Log Message:
NetBSD 6.0 was released several months ago; time to garbage
collect this document.

It's not clear that src/doc is the best place to manage this
information;  a NetBSD-7 file may or may not be forthcoming
shortly.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r0 src/doc/NetBSD-6

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



CVS commit: src/sys/rump

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 23:37:43 UTC 2013

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
uniquefy, really should fix this so there are no dup rules.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.75 src/sys/rump/Makefile.rump:1.76
--- src/sys/rump/Makefile.rump:1.75	Sat Mar 16 17:38:21 2013
+++ src/sys/rump/Makefile.rump	Sat Mar 16 19:37:43 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.75 2013/03/16 21:38:21 christos Exp $
+#	$NetBSD: Makefile.rump,v 1.76 2013/03/16 23:37:43 christos Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -91,19 +91,19 @@ DESTDIR=/
 BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR}
 rumpcomp_user.d: rumpcomp_user.c
 	${_MKTARGET_CREATE}
-	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:M*.c}
+	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:u:M*.c}
 
 rumpcomp_user.o: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:M*.c}
+	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:u:M*.c}
 
 rumpcomp_user.pico: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:M*.c}
+	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:u:M*.c}
 
 rumpcomp_user.po: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:M*.c}
+	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:u:M*.c}
 
 RUMPCOMP_USEROBJ=rumpcomp_user.*o
 SRCS+=rumpcomp_user.c



CVS commit: src/sys/rump

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 16 23:51:39 UTC 2013

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
order too


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.76 src/sys/rump/Makefile.rump:1.77
--- src/sys/rump/Makefile.rump:1.76	Sat Mar 16 19:37:43 2013
+++ src/sys/rump/Makefile.rump	Sat Mar 16 19:51:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.76 2013/03/16 23:37:43 christos Exp $
+#	$NetBSD: Makefile.rump,v 1.77 2013/03/16 23:51:39 christos Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -91,19 +91,19 @@ DESTDIR=/
 BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR}
 rumpcomp_user.d: rumpcomp_user.c
 	${_MKTARGET_CREATE}
-	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:u:M*.c}
+	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:uM*.c}
 
 rumpcomp_user.o: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:u:M*.c}
+	${CC} -o ${.TARGET} ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*.c}
 
 rumpcomp_user.pico: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:u:M*.c}
+	${CC} -o ${.TARGET} -fPIC -DPIC ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*.c}
 
 rumpcomp_user.po: rumpcomp_user.c
 	${_MKTARGET_COMPILE}
-	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:u:M*.c}
+	${CC} -o ${.TARGET} ${PROFFLAGS} -pg ${DBG} ${CWARNFLAGS} ${BUILDRUMP_CPPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${RUMPCOMP_USER_CFLAGS} -c ${.ALLSRC:O:u:M*.c}
 
 RUMPCOMP_USEROBJ=rumpcomp_user.*o
 SRCS+=rumpcomp_user.c



CVS commit: src/common/lib/libc/arch/sparc64/string

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 00:42:32 UTC 2013

Added Files:
src/common/lib/libc/arch/sparc64/string: memcpy.S memset.S strmacros.h

Log Message:
Use a single copy of the source.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/common/lib/libc/arch/sparc64/string/memcpy.S \
src/common/lib/libc/arch/sparc64/string/memset.S \
src/common/lib/libc/arch/sparc64/string/strmacros.h

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

Added files:

Index: src/common/lib/libc/arch/sparc64/string/memcpy.S
diff -u /dev/null src/common/lib/libc/arch/sparc64/string/memcpy.S:1.1
--- /dev/null	Sat Mar 16 20:42:32 2013
+++ src/common/lib/libc/arch/sparc64/string/memcpy.S	Sat Mar 16 20:42:31 2013
@@ -0,0 +1,1624 @@
+/*	$NetBSD: memcpy.S,v 1.1 2013/03/17 00:42:31 christos Exp $	*/
+
+/*
+ * Copyright (c) 1996-2002 Eduardo Horvath
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR  ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR  BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#include strmacros.h
+
+/*
+ * kernel memcpy
+ * Assumes regions do not overlap; has no useful return value.
+ *
+ * Must not use %g7 (see copyin/copyout above).
+ */
+ENTRY(memcpy) /* dest, src, size */
+	/*
+	 * Swap args for bcopy.  Gcc generates calls to memcpy for
+	 * structure assignments.
+	 */
+	mov	%o0, %o3
+	mov	%o1, %o0
+	mov	%o3, %o1
+#if !defined(_KERNEL) || defined(_RUMPKERNEL)
+ENTRY(bcopy) /* src, dest, size */
+#endif
+#ifdef DEBUG
+#if defined(_KERNEL)  !defined(_RUMPKERNEL)
+	set	pmapdebug, %o4
+	ld	[%o4], %o4
+	btst	0x80, %o4	! PDB_COPY
+	bz,pt	%icc, 3f
+	 nop
+#endif
+	save	%sp, -CC64FSZ, %sp
+	mov	%i0, %o1
+	set	2f, %o0
+	mov	%i1, %o2
+	call	printf
+	 mov	%i2, %o3
+!	ta	1; nop
+	restore
+	.data
+2:	.asciz	memcpy(%p-%p,%x)\n
+	_ALIGN
+	.text
+3:
+#endif
+
+	cmp	%o2, BCOPY_SMALL
+
+Lmemcpy_start:
+	bge,pt	CCCR, 2f	! if = this many, go be fancy.
+	 cmp	%o2, 256
+
+	mov	%o1, %o5	! Save memcpy return value
+	/*
+	 * Not much to copy, just do it a byte at a time.
+	 */
+	deccc	%o2		! while (--len = 0)
+	bl	1f
+	 .empty
+0:
+	inc	%o0
+	ldsb	[%o0 - 1], %o4	!	(++dst)[-1] = *src++;
+	stb	%o4, [%o1]
+	deccc	%o2
+	bge	0b
+	 inc	%o1
+1:
+	retl
+	 mov	%o5, %o0
+	NOTREACHED
+
+	/*
+	 * Plenty of data to copy, so try to do it optimally.
+	 */
+2:
+#ifdef USE_BLOCK_STORE_LOAD
+	! If it is big enough, use VIS instructions
+	bge	Lmemcpy_block
+	 nop
+#endif /* USE_BLOCK_STORE_LOAD */
+Lmemcpy_fancy:
+
+	!!
+	!! First align the output to a 8-byte entity
+	!! 
+
+	save	%sp, -CC64FSZ, %sp
+	
+	mov	%i0, %l0
+	mov	%i1, %l1
+	
+	mov	%i2, %l2
+	btst	1, %l1
+	
+	bz,pt	%icc, 4f
+	 btst	2, %l1
+	ldub	[%l0], %l4! Load 1st byte
+	
+	deccc	1, %l2
+	ble,pn	CCCR, Lmemcpy_finish			! 
+	 inc	1, %l0
+	
+	stb	%l4, [%l1]! Store 1st byte
+	inc	1, %l1	! Update address
+	btst	2, %l1
+4:	
+	bz,pt	%icc, 4f
+	
+	 btst	1, %l0
+	bz,a	1f
+	 lduh	[%l0], %l4! Load short
+
+	ldub	[%l0], %l4! Load bytes
+	
+	ldub	[%l0+1], %l3
+	sllx	%l4, 8, %l4
+	or	%l3, %l4, %l4
+	
+1:	
+	deccc	2, %l2
+	ble,pn	CCCR, Lmemcpy_finish			! 
+	 inc	2, %l0
+	sth	%l4, [%l1]! Store 1st short
+	
+	inc	2, %l1
+4:
+	btst	4, %l1
+	bz,pt	CCCR, 4f
+	
+	 btst	3, %l0
+	bz,a,pt	CCCR, 1f
+	 lduw	[%l0], %l4! Load word -1
+
+	btst	1, %l0
+	bz,a,pt	%icc, 2f
+	 lduh	[%l0], %l4
+	
+	ldub	[%l0], %l4
+	
+	lduh	[%l0+1], %l3
+	sllx	%l4, 16, %l4
+	or	%l4, %l3, %l4
+	
+	ldub	[%l0+3], %l3
+	sllx	%l4, 8, %l4
+	ba,pt	%icc, 1f
+	 or	%l4, %l3, %l4
+	
+2:
+	lduh	[%l0+2], %l3
+	sllx	%l4, 16, %l4
+	or	%l4, %l3, %l4
+	
+1:	
+	deccc	4, %l2
+	ble,pn	CCCR, Lmemcpy_finish		! 
+	 inc	4, %l0
+	
+	st	%l4, [%l1]! Store word
+	inc	4, %l1
+4:
+	!!
+	!! We are now 32-bit aligned in the dest.
+	!!
+Lmemcpy_common:	
+
+	and	%l0, 7, %l4! Shift amount
+	andn	%l0, 7, %l0! Source addr
+	
+	brz,pt	%l4, Lmemcpy_noshift8			! No shift version...
+
+	 sllx	%l4, 3, %l4! In bits
+	mov	83, %l3
+	
+	ldx	[%l0], %o0! Load word -1
+	sub	%l3, %l4, %l3		

CVS commit: src/lib/libc/arch/sparc64/string

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 00:43:46 UTC 2013

Removed Files:
src/lib/libc/arch/sparc64/string: memcpy.S memset.S

Log Message:
now live in common/lib/libc/arch/sparc64/string


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r0 src/lib/libc/arch/sparc64/string/memcpy.S
cvs rdiff -u -r1.4 -r0 src/lib/libc/arch/sparc64/string/memset.S

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



CVS commit: src/sys/arch/sparc64/conf

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 00:44:16 UTC 2013

Modified Files:
src/sys/arch/sparc64/conf: files.sparc64

Log Message:
no more duplicate copy of the memcpy code.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/arch/sparc64/conf/files.sparc64

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/sparc64/conf/files.sparc64
diff -u src/sys/arch/sparc64/conf/files.sparc64:1.140 src/sys/arch/sparc64/conf/files.sparc64:1.141
--- src/sys/arch/sparc64/conf/files.sparc64:1.140	Thu Mar 14 07:54:31 2013
+++ src/sys/arch/sparc64/conf/files.sparc64	Sat Mar 16 20:44:16 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sparc64,v 1.140 2013/03/14 11:54:31 nakayama Exp $
+#	$NetBSD: files.sparc64,v 1.141 2013/03/17 00:44:16 christos Exp $
 
 # @(#)files.sparc64	8.1 (Berkeley) 7/19/93
 # sparc64-specific configuration info
@@ -236,7 +236,6 @@ file	arch/sparc64/sparc64/kobj_machdep.c
 # sparc64/sparc64/locore.s is handled specially in the makefile,
 # because it must come first in the ld command line.
 file	arch/sparc64/sparc64/machdep.c
-file	arch/sparc64/sparc64/memcpyset.s
 file	arch/sparc64/sparc64/process_machdep.c
 file	arch/sparc64/sparc64/procfs_machdep.c	procfs
 file	arch/sparc/sparc/openprom.c



CVS commit: src/sys/arch/sparc64/sparc64

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 00:45:03 UTC 2013

Removed Files:
src/sys/arch/sparc64/sparc64: memcpyset.s

Log Message:
now in common/lib/libc/arch/sparc64/string


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/arch/sparc64/sparc64/memcpyset.s

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



CVS commit: src/sys/lib/libkern

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 00:47:14 UTC 2013

Modified Files:
src/sys/lib/libkern: Makefile.libkern

Log Message:
undo sparc64 kludge


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/lib/libkern/Makefile.libkern

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

Modified files:

Index: src/sys/lib/libkern/Makefile.libkern
diff -u src/sys/lib/libkern/Makefile.libkern:1.22 src/sys/lib/libkern/Makefile.libkern:1.23
--- src/sys/lib/libkern/Makefile.libkern:1.22	Thu Mar 14 07:53:33 2013
+++ src/sys/lib/libkern/Makefile.libkern	Sat Mar 16 20:47:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.libkern,v 1.22 2013/03/14 11:53:33 nakayama Exp $
+#	$NetBSD: Makefile.libkern,v 1.23 2013/03/17 00:47:13 christos Exp $
 
 # 
 # Variable definitions for libkern.  
@@ -74,13 +74,11 @@ SRCS+=	memmove.c
 SRCS+=	strchr.c strrchr.c
 SRCS+=	memcmp.c
 
-.if (${MACHINE} != sparc64) || defined(RUMPTOP)
-# provided by memcpyset.s on sparc64, but RUMP does not know about it.
 SRCS+=	memcpy.c
 .if empty(SRCS:Mmemset2.*)
 SRCS+=	memset.c 
 .endif
-.endif
+
 SRCS+=	popcount32.c popcount64.c
 SRCS+=	strtoul.c strtoll.c strtoull.c strtoumax.c
 



CVS commit: src/sys/rump

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 01:13:01 UTC 2013

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.77 src/sys/rump/Makefile.rump:1.78
--- src/sys/rump/Makefile.rump:1.77	Sat Mar 16 19:51:39 2013
+++ src/sys/rump/Makefile.rump	Sat Mar 16 21:13:00 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.77 2013/03/16 23:51:39 christos Exp $
+#	$NetBSD: Makefile.rump,v 1.78 2013/03/17 01:13:00 christos Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -91,7 +91,7 @@ DESTDIR=/
 BUILDRUMP_CPPFLAGS ?= -isysroot ${DESTDIR}
 rumpcomp_user.d: rumpcomp_user.c
 	${_MKTARGET_CREATE}
-	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:uM*.c}
+	${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} ${BUILDRUMP_CPPFLAGS} ${RUMPCOMP_USER_CPPFLAGS} ${.ALLSRC:O:u:M*.c}
 
 rumpcomp_user.o: rumpcomp_user.c
 	${_MKTARGET_COMPILE}



CVS commit: src/tests/fs/tmpfs

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 01:16:45 UTC 2013

Modified Files:
src/tests/fs/tmpfs: h_funcs.subr

Log Message:
Simplify test_mount and log errors.

If mount_tmpfs fails, show what the stderr output of the command was instead
of failing without details.

While doing this, remove the stupidity to deal with the optional arguments
to the test_mount routine.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/tmpfs/h_funcs.subr

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/tmpfs/h_funcs.subr
diff -u src/tests/fs/tmpfs/h_funcs.subr:1.4 src/tests/fs/tmpfs/h_funcs.subr:1.5
--- src/tests/fs/tmpfs/h_funcs.subr:1.4	Mon Feb 21 10:14:29 2011
+++ src/tests/fs/tmpfs/h_funcs.subr	Sun Mar 17 01:16:45 2013
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: h_funcs.subr,v 1.4 2011/02/21 10:14:29 pooka Exp $
+# $NetBSD: h_funcs.subr,v 1.5 2013/03/17 01:16:45 jmmv Exp $
 #
 # Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -40,25 +40,17 @@ test_mount() {
 	require_fs tmpfs
 
 	Mount_Point=$(pwd)/mntpt
-	atf_check -s eq:0 -o empty -e empty mkdir ${Mount_Point}
-	if [ $# -gt 0 ]; then
-		mount -t tmpfs $* tmpfs ${Mount_Point} 2 mounterr
-		if [ $? -ne 0 ]; then
-			if grep 'Operation not supp' mounterr  /dev/null ; then
-atf_skip tmpfs not supported
-			fi 
-			atf_fail mount tmpfs
-		fi
-else
-		mount -t tmpfs tmpfs ${Mount_Point} 2 mounterr
-		if [ $? -ne 0 ]; then
-			if grep 'Operation not supp' mounterr  /dev/null ; then
-atf_skip tmpfs not supported
-			fi 
-			atf_fail mount tmpfs
-		fi
+	atf_check -s eq:0 -o empty -e empty mkdir ${Mount_Point}
+	echo mount -t tmpfs ${*} tmpfs ${Mount_Point}
+	mount -t tmpfs ${@} tmpfs ${Mount_Point} 2mounterr
+	if [ ${?} -ne 0 ]; then
+		cat mounterr 12
+		if grep 'Operation not supported' mounterr  /dev/null; then
+			atf_skip tmpfs not supported
+		fi 
+		atf_fail Failed to mount a tmpfs file system
 	fi
-	cd ${Mount_Point}
+	cd ${Mount_Point}
 }
 
 #



CVS commit: src/common/lib/libc/arch/sparc64/string

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 02:12:41 UTC 2013

Modified Files:
src/common/lib/libc/arch/sparc64/string: memset.S

Log Message:
add RCSID; use clr for pattern


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/sparc64/string/memset.S

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

Modified files:

Index: src/common/lib/libc/arch/sparc64/string/memset.S
diff -u src/common/lib/libc/arch/sparc64/string/memset.S:1.1 src/common/lib/libc/arch/sparc64/string/memset.S:1.2
--- src/common/lib/libc/arch/sparc64/string/memset.S:1.1	Sat Mar 16 20:42:32 2013
+++ src/common/lib/libc/arch/sparc64/string/memset.S	Sat Mar 16 22:12:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: memset.S,v 1.1 2013/03/17 00:42:32 christos Exp $	*/
+/*	$NetBSD: memset.S,v 1.2 2013/03/17 02:12:41 christos Exp $	*/
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -24,6 +24,10 @@
  *
  */
 #include strmacros.h
+#if defined(LIBC_SCCS)  !defined(lint)
+RCSID($NetBSD: memset.S,v 1.2 2013/03/17 02:12:41 christos Exp $)
+#endif  /* LIBC_SCCS and not lint */
+
 
 /*
  * 
@@ -49,7 +53,7 @@
 ENTRY(bzero)
 	! %o0 = addr, %o1 = len
 	mov	%o1, %o2
-	mov	0, %o1
+	clr	%o1			! ser pattern
 #endif	
 ENTRY(memset)
 	! %o0 = addr, %o1 = pattern, %o2 = len



CVS commit: src/common/lib/libc/arch/sparc64/string

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 02:13:10 UTC 2013

Modified Files:
src/common/lib/libc/arch/sparc64/string: memcpy.S

Log Message:
Add RCSID
Fix out of date comment


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/sparc64/string/memcpy.S

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

Modified files:

Index: src/common/lib/libc/arch/sparc64/string/memcpy.S
diff -u src/common/lib/libc/arch/sparc64/string/memcpy.S:1.1 src/common/lib/libc/arch/sparc64/string/memcpy.S:1.2
--- src/common/lib/libc/arch/sparc64/string/memcpy.S:1.1	Sat Mar 16 20:42:31 2013
+++ src/common/lib/libc/arch/sparc64/string/memcpy.S	Sat Mar 16 22:13:10 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: memcpy.S,v 1.1 2013/03/17 00:42:31 christos Exp $	*/
+/*	$NetBSD: memcpy.S,v 1.2 2013/03/17 02:13:10 christos Exp $	*/
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -24,10 +24,13 @@
  *
  */
 #include strmacros.h
+#if defined(LIBC_SCCS)  !defined(lint)
+RCSID($NetBSD: memcpy.S,v 1.2 2013/03/17 02:13:10 christos Exp $)
+#endif  /* LIBC_SCCS and not lint */
 
 /*
- * kernel memcpy
- * Assumes regions do not overlap; has no useful return value.
+ * memcpy
+ * Assumes regions do not overlap;
  *
  * Must not use %g7 (see copyin/copyout above).
  */



CVS commit: src/tests/lib/libc/string

2013-03-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 17 02:23:31 UTC 2013

Modified Files:
src/tests/lib/libc/string: t_memcpy.c t_memset.c

Log Message:
check return values


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/string/t_memcpy.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_memset.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/lib/libc/string/t_memcpy.c
diff -u src/tests/lib/libc/string/t_memcpy.c:1.4 src/tests/lib/libc/string/t_memcpy.c:1.5
--- src/tests/lib/libc/string/t_memcpy.c:1.4	Thu Jul 14 01:46:04 2011
+++ src/tests/lib/libc/string/t_memcpy.c	Sat Mar 16 22:23:31 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_memcpy.c,v 1.4 2011/07/14 05:46:04 jruoho Exp $ */
+/* $NetBSD: t_memcpy.c,v 1.5 2013/03/17 02:23:31 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -125,10 +125,25 @@ ATF_TC_BODY(memccpy_simple, tc)
 	ATF_CHECK(strncmp(buf, xxx, 7) == 0);
 }
 
+ATF_TC(memcpy_return);
+ATF_TC_HEAD(memcpy_return, tc)
+{
+	atf_tc_set_md_var(tc, descr, Test memcpy(3) return value);
+}
+
+ATF_TC_BODY(memcpy_return, tc)
+{
+	char *b = (char *)0x1;
+	char c[2];
+	ATF_REQUIRE_EQ(memcpy(b, b, 0), b);
+	ATF_REQUIRE_EQ(memcpy(c, ab, sizeof(c)), c);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, memcpy_basic);
+	ATF_TP_ADD_TC(tp, memcpy_return);
 	ATF_TP_ADD_TC(tp, memccpy_simple);
 
 	return atf_no_error();

Index: src/tests/lib/libc/string/t_memset.c
diff -u src/tests/lib/libc/string/t_memset.c:1.2 src/tests/lib/libc/string/t_memset.c:1.3
--- src/tests/lib/libc/string/t_memset.c:1.2	Thu Jul 14 03:33:20 2011
+++ src/tests/lib/libc/string/t_memset.c	Sat Mar 16 22:23:31 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_memset.c,v 1.2 2011/07/14 07:33:20 jruoho Exp $ */
+/* $NetBSD: t_memset.c,v 1.3 2013/03/17 02:23:31 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_memset.c,v 1.2 2011/07/14 07:33:20 jruoho Exp $);
+__RCSID($NetBSD: t_memset.c,v 1.3 2013/03/17 02:23:31 christos Exp $);
 
 #include sys/stat.h
 
@@ -63,6 +63,20 @@ ATF_TC_BODY(memset_array, tc)
 		atf_tc_fail(memset(3) did not fill a static buffer);
 }
 
+ATF_TC(memset_return);
+ATF_TC_HEAD(memset_return, tc)
+{
+	atf_tc_set_md_var(tc, descr, Test memset(3) return value);
+}
+
+ATF_TC_BODY(memset_return, tc)
+{
+	char *b = (char *)0x1;
+	char c[2];
+	ATF_REQUIRE_EQ(memset(b, 0, 0), b);
+	ATF_REQUIRE_EQ(memset(c, 2, sizeof(c)), c);
+}
+
 ATF_TC(memset_basic);
 ATF_TC_HEAD(memset_basic, tc)
 {
@@ -187,6 +201,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, memset_basic);
 	ATF_TP_ADD_TC(tp, memset_nonzero);
 	ATF_TP_ADD_TC(tp, memset_struct);
+	ATF_TP_ADD_TC(tp, memset_return);
 
 	return atf_no_error();
 }



CVS commit: src/tests/fs/vfs

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 02:48:31 UTC 2013

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

Log Message:
Fix the t_renamerace:lfs_renamerace_dirs test on fast machines.

This test was failing on my machine when run natively but not causing any
problems when run within qemu, and the failure was mkdir: No space left
on device.

My understanding of the issue is that this test overflowed the temporary
disk image due to its high rate of file churn and the lfs_cleanerd not
being able to keep up.  Note that this test is capped by time, not number
of operations, so this is why the problem does not show up in a slow
emulated system.

To fix this, just bump the test file system image limit a little bit.
(I tried increasing the frequency at which lfs_cleanerd does its thing,
but it wasn't enough.)


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/tests/fs/vfs/t_renamerace.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_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.26 src/tests/fs/vfs/t_renamerace.c:1.27
--- src/tests/fs/vfs/t_renamerace.c:1.26	Wed May  9 00:22:26 2012
+++ src/tests/fs/vfs/t_renamerace.c	Sun Mar 17 02:48:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.26 2012/05/09 00:22:26 riastradh Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.27 2013/03/17 02:48:31 jmmv Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -21,6 +21,18 @@
 #include rump/rump.h
 #include rump/rump_syscalls.h
 
+/* Bump the size of the test file system image to a larger value.
+ *
+ * These tests cause a lot of churn in the file system by creating and
+ * deleting files/directories in quick succession.  A faster CPU will cause
+ * more churn because the tests are capped by a run time period in seconds,
+ * not number of operations.
+ *
+ * This is all fine except for LFS, because the lfs_cleanerd cannot keep up
+ * with the churn and thus causes the test to fail on fast machines.  Hence
+ * the reason for this hack. */
+#define FSTEST_IMGSIZE (5 * 512)
+
 #include ../common/h_fsmacros.h
 #include ../../h_macros.h
 



CVS commit: src/tests/ipf

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 03:00:05 UTC 2013

Modified Files:
src/tests/ipf: t_filter_exec.sh t_filter_parse.sh t_nat_exec.sh

Log Message:
Mark some long-standing failures as known failures.

The offending tests are these:
- t_filter_exec: f26, f27.
- t_filter_parse: i17.
- t_nat_exec: n12.

These tests are confirmed to fail in NetBSD/current under amd64, i386 and
sparc as reported by the continuous testing systems.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/ipf/t_filter_exec.sh
cvs rdiff -u -r1.9 -r1.10 src/tests/ipf/t_filter_parse.sh
cvs rdiff -u -r1.13 -r1.14 src/tests/ipf/t_nat_exec.sh

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

Modified files:

Index: src/tests/ipf/t_filter_exec.sh
diff -u src/tests/ipf/t_filter_exec.sh:1.7 src/tests/ipf/t_filter_exec.sh:1.8
--- src/tests/ipf/t_filter_exec.sh:1.7	Sat Jul  7 23:29:44 2012
+++ src/tests/ipf/t_filter_exec.sh	Sun Mar 17 03:00:05 2013
@@ -1,4 +1,4 @@
-# $NetBSD: t_filter_exec.sh,v 1.7 2012/07/07 23:29:44 pgoyette Exp $
+# $NetBSD: t_filter_exec.sh,v 1.8 2013/03/17 03:00:05 jmmv Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -130,8 +130,8 @@ test_case f19 dotest text text -T state_
 test_case f20 mtest text text
 test_case f24 mtest hex text
 test_case f25 mtest hex text -D
-test_case f26 dotest text text
-test_case f27 dotest hex text
+failing_test_case f26 dotest Known to be broken text text
+failing_test_case f27 dotest Known to be broken hex text
 test_case f30 dotest text text
 test_case ipv6_1 dotest6 hex hex
 test_case ipv6_2 dotest6 hex hex

Index: src/tests/ipf/t_filter_parse.sh
diff -u src/tests/ipf/t_filter_parse.sh:1.9 src/tests/ipf/t_filter_parse.sh:1.10
--- src/tests/ipf/t_filter_parse.sh:1.9	Mon Dec  3 19:43:36 2012
+++ src/tests/ipf/t_filter_parse.sh	Sun Mar 17 03:00:05 2013
@@ -1,4 +1,4 @@
-# $NetBSD: t_filter_parse.sh,v 1.9 2012/12/03 19:43:36 pgoyette Exp $
+# $NetBSD: t_filter_parse.sh,v 1.10 2013/03/17 03:00:05 jmmv Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -99,7 +99,7 @@ test_case i13 itest text ipf
 test_case i14 itest text ipf
 test_case i15 itest text ipf
 test_case i16 itest text ipf
-test_case i17 itest text ipftest
+failing_test_case i17 itest Known to be broken text ipftest
 test_case i18 itest text ipf
 test_case i19 itest_i19 PR kern/47262 Proto-family missing from logs text ipf
 test_case i20 itest text ipf

Index: src/tests/ipf/t_nat_exec.sh
diff -u src/tests/ipf/t_nat_exec.sh:1.13 src/tests/ipf/t_nat_exec.sh:1.14
--- src/tests/ipf/t_nat_exec.sh:1.13	Sun Dec  2 08:52:06 2012
+++ src/tests/ipf/t_nat_exec.sh	Sun Mar 17 03:00:05 2013
@@ -1,4 +1,4 @@
-# $NetBSD: t_nat_exec.sh,v 1.13 2012/12/02 08:52:06 pgoyette Exp $
+# $NetBSD: t_nat_exec.sh,v 1.14 2013/03/17 03:00:05 jmmv Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -71,7 +71,7 @@ test_case n8 nattest hex hex -T update_i
 test_case n9 nattest hex hex -T update_ipid=0
 test_case n10 nattest hex hex -T update_ipid=0
 test_case n11 nattest text text
-test_case n12 nattest hex hex -T update_ipid=0 -v
+failing_test_case n12 nattest Known to be broken hex hex -T update_ipid=0 -v
 test_case n13 nattest text text
 test_case n14 nattest text text
 test_case n15 nattest text text -T update_ipid=0



CVS commit: src/tests/lib/libc/c063

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 04:36:00 UTC 2013

Modified Files:
src/tests/lib/libc/c063: t_fexecve.c

Log Message:
fexecve is not implemented, so mark the test as an expected failure.

While doing this, clean this whole thing: do not define a useless cleanup
routine and wait for the subprocess to finish instead of using sleep.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/c063/t_fexecve.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/lib/libc/c063/t_fexecve.c
diff -u src/tests/lib/libc/c063/t_fexecve.c:1.1 src/tests/lib/libc/c063/t_fexecve.c:1.2
--- src/tests/lib/libc/c063/t_fexecve.c:1.1	Sun Nov 18 17:41:54 2012
+++ src/tests/lib/libc/c063/t_fexecve.c	Sun Mar 17 04:35:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fexecve.c,v 1.1 2012/11/18 17:41:54 manu Exp $ */
+/*	$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,48 +29,61 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_fexecve.c,v 1.1 2012/11/18 17:41:54 manu Exp $);
+__RCSID($NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $);
+
+#include sys/wait.h
 
 #include atf-c.h
+#include err.h
 #include errno.h
 #include fcntl.h
 #include limits.h
 #include paths.h
 #include stdio.h
+#include stdlib.h
 #include string.h
 #include unistd.h
 #include sys/param.h
 
-#define FILE test
-
-ATF_TC_WITH_CLEANUP(fexecve);
+ATF_TC(fexecve);
 ATF_TC_HEAD(fexecve, tc)
 {
 	atf_tc_set_md_var(tc, descr, See that fexecve works);
 }
-
 ATF_TC_BODY(fexecve, tc)
 {
-	int fd;
+	int status;
 	pid_t pid;
-	const char *const argv[] = { touch, FILE, NULL };
+	const char *const argv[] = { touch, test, NULL };
 	const char *const envp[] = { NULL };
 
 	ATF_REQUIRE((pid = fork()) != -1);
-	if (pid != 0) {	/* parent */
-		sleep(1);
-		ATF_REQUIRE(access(FILE, F_OK) == 0);
-	} else {	/* child */
-		ATF_REQUIRE((fd = open(/usr/bin/touch, O_RDONLY, 0)) != -1);
-		ATF_REQUIRE(fexecve(fd, __UNCONST(argv), __UNCONST(envp)) == 0);
+	if (pid == 0) {
+		int fd;
+
+		if ((fd = open(/usr/bin/touch, O_RDONLY, 0)) == -1)
+			err(EXIT_FAILURE, open /usr/bin/touch);
+
+		if (fexecve(fd, __UNCONST(argv), __UNCONST(envp)) == -1) {
+			int error;
+			if (errno == ENOSYS)
+error = 76;
+			else
+error = EXIT_FAILURE;
+			err(error, fexecve);
+		}
 	}
-}
 
-ATF_TC_CLEANUP(fexecve, tc)
-{
-	(void)unlink(FILE);
-}
+	ATF_REQUIRE(waitpid(pid, status, 0) != -1);
+	if (!WIFEXITED(status))
+		atf_tc_fail(child process did not exit cleanly);
+	if (WEXITSTATUS(status) == 76)
+		atf_tc_expect_fail(fexecve not implemented);
+	else
+		ATF_REQUIRE(WEXITSTATUS(status) == EXIT_SUCCESS);
 
+	ATF_REQUIRE(access(test, F_OK) == 0);
+}
 
 ATF_TP_ADD_TCS(tp)
 {



CVS commit: src/sys/lib/libkern/arch/sparc

2013-03-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Mar 17 04:45:47 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/sparc: Makefile.inc

Log Message:
Revert previous.  christos fixed the root cause.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/lib/libkern/arch/sparc/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/sys/lib/libkern/arch/sparc/Makefile.inc
diff -u src/sys/lib/libkern/arch/sparc/Makefile.inc:1.35 src/sys/lib/libkern/arch/sparc/Makefile.inc:1.36
--- src/sys/lib/libkern/arch/sparc/Makefile.inc:1.35	Thu Mar 14 11:53:34 2013
+++ src/sys/lib/libkern/arch/sparc/Makefile.inc	Sun Mar 17 04:45:46 2013
@@ -1,10 +1,7 @@
-#	$NetBSD: Makefile.inc,v 1.35 2013/03/14 11:53:34 nakayama Exp $
+#	$NetBSD: Makefile.inc,v 1.36 2013/03/17 04:45:46 nakayama Exp $
 
 SRCS+=	ffs.S
-.if (${MACHINE} != sparc64) || defined(RUMPTOP)
-# provided by memcpyset.s on sparc64 32-bit kernel
 SRCS+=	memset.S
-.endif
 SRCS+=	strlen.S
 SRCS+=	htonl.S htons.S ntohl.S ntohs.S
 SRCS+=	random.S



CVS commit: src/tests/lib/libc/c063

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 04:46:07 UTC 2013

Modified Files:
src/tests/lib/libc/c063: t_faccessat.c t_fchmodat.c t_fchownat.c
t_fstatat.c t_linkat.c t_mkdirat.c t_mkfifoat.c t_mknodat.c
t_o_search.c t_openat.c t_readlinkat.c t_renameat.c t_symlinkat.c
t_unlinkat.c t_utimensat.c

Log Message:
Remove unnecessary cleanup routines.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/c063/t_faccessat.c \
src/tests/lib/libc/c063/t_fchmodat.c src/tests/lib/libc/c063/t_fstatat.c \
src/tests/lib/libc/c063/t_linkat.c src/tests/lib/libc/c063/t_mkdirat.c \
src/tests/lib/libc/c063/t_mkfifoat.c src/tests/lib/libc/c063/t_openat.c \
src/tests/lib/libc/c063/t_renameat.c \
src/tests/lib/libc/c063/t_symlinkat.c \
src/tests/lib/libc/c063/t_unlinkat.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/c063/t_fchownat.c \
src/tests/lib/libc/c063/t_mknodat.c \
src/tests/lib/libc/c063/t_readlinkat.c
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/c063/t_o_search.c
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/c063/t_utimensat.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/lib/libc/c063/t_faccessat.c
diff -u src/tests/lib/libc/c063/t_faccessat.c:1.1 src/tests/lib/libc/c063/t_faccessat.c:1.2
--- src/tests/lib/libc/c063/t_faccessat.c:1.1	Sun Nov 18 17:41:54 2012
+++ src/tests/lib/libc/c063/t_faccessat.c	Sun Mar 17 04:46:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_faccessat.c,v 1.1 2012/11/18 17:41:54 manu Exp $ */
+/*	$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_faccessat.c,v 1.1 2012/11/18 17:41:54 manu Exp $);
+__RCSID($NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $);
 
 #include atf-c.h
 #include errno.h
@@ -48,12 +48,11 @@ __RCSID($NetBSD: t_faccessat.c,v 1.1 20
 #define BASELINK symlink
 #define FILEERR dir/faccessaterr
 
-ATF_TC_WITH_CLEANUP(faccessat_fd);
+ATF_TC(faccessat_fd);
 ATF_TC_HEAD(faccessat_fd, tc)
 {
 	atf_tc_set_md_var(tc, descr, See that faccessat works with fd);
 }
-
 ATF_TC_BODY(faccessat_fd, tc)
 {
 	int dfd;
@@ -68,20 +67,12 @@ ATF_TC_BODY(faccessat_fd, tc)
 	ATF_REQUIRE(close(dfd) == 0);
 }
 
-ATF_TC_CLEANUP(faccessat_fd, tc)
-{
-	(void)unlink(FILE);
-	(void)unlink(FILEERR);
-	(void)rmdir(DIR);
-}
-
-ATF_TC_WITH_CLEANUP(faccessat_fdcwd);
+ATF_TC(faccessat_fdcwd);
 ATF_TC_HEAD(faccessat_fdcwd, tc)
 {
 	atf_tc_set_md_var(tc, descr, 
 			  See that faccessat works with fd as AT_FDCWD);
 }
-
 ATF_TC_BODY(faccessat_fdcwd, tc)
 {
 	int fd;
@@ -94,39 +85,23 @@ ATF_TC_BODY(faccessat_fdcwd, tc)
 	ATF_REQUIRE(faccessat(AT_FDCWD, BASEFILE, F_OK, 0) == 0);
 }
 
-ATF_TC_CLEANUP(faccessat_fdcwd, tc)
-{
-	(void)unlink(FILE);
-	(void)unlink(FILEERR);
-	(void)rmdir(DIR);
-}
-
-ATF_TC_WITH_CLEANUP(faccessat_fdcwderr);
+ATF_TC(faccessat_fdcwderr);
 ATF_TC_HEAD(faccessat_fdcwderr, tc)
 {
 	atf_tc_set_md_var(tc, descr, 
 		  See that faccessat fails with fd as AT_FDCWD and bad path);
 }
-
 ATF_TC_BODY(faccessat_fdcwderr, tc)
 {
 	ATF_REQUIRE(mkdir(DIR, 0755) == 0);
 	ATF_REQUIRE(faccessat(AT_FDCWD, FILEERR, F_OK, 0) == -1);
 }
 
-ATF_TC_CLEANUP(faccessat_fdcwderr, tc)
-{
-	(void)unlink(FILE);
-	(void)unlink(FILEERR);
-	(void)rmdir(DIR);
-}
-
-ATF_TC_WITH_CLEANUP(faccessat_fderr1);
+ATF_TC(faccessat_fderr1);
 ATF_TC_HEAD(faccessat_fderr1, tc)
 {
 	atf_tc_set_md_var(tc, descr, See that faccessat fail with bad path);
 }
-
 ATF_TC_BODY(faccessat_fderr1, tc)
 {
 	int dfd;
@@ -135,22 +110,13 @@ ATF_TC_BODY(faccessat_fderr1, tc)
 	ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
 	ATF_REQUIRE(faccessat(dfd, FILEERR, F_OK, 0) == -1);
 	ATF_REQUIRE(close(dfd) == 0);
-	
-}
-
-ATF_TC_CLEANUP(faccessat_fderr1, tc)
-{
-	(void)unlink(FILE);
-	(void)unlink(FILEERR);
-	(void)rmdir(DIR);
 }
 
-ATF_TC_WITH_CLEANUP(faccessat_fderr2);
+ATF_TC(faccessat_fderr2);
 ATF_TC_HEAD(faccessat_fderr2, tc)
 {
 	atf_tc_set_md_var(tc, descr, See that faccessat fails with bad fdat);
 }
-
 ATF_TC_BODY(faccessat_fderr2, tc)
 {
 	int dfd;
@@ -166,19 +132,11 @@ ATF_TC_BODY(faccessat_fderr2, tc)
 	ATF_REQUIRE(close(dfd) == 0);
 }
 
-ATF_TC_CLEANUP(faccessat_fderr2, tc)
-{
-	(void)unlink(FILE);
-	(void)unlink(FILEERR);
-	(void)rmdir(DIR);
-}
-
-ATF_TC_WITH_CLEANUP(faccessat_fderr3);
+ATF_TC(faccessat_fderr3);
 ATF_TC_HEAD(faccessat_fderr3, tc)
 {
 	atf_tc_set_md_var(tc, descr, See that faccessat fails with fd as -1);
 }
-
 ATF_TC_BODY(faccessat_fderr3, tc)
 {
 	int fd;
@@ -190,19 +148,11 @@ ATF_TC_BODY(faccessat_fderr3, tc)
 	ATF_REQUIRE(faccessat(-1, FILE, F_OK, 0) == -1);
 }
 
-ATF_TC_CLEANUP(faccessat_fderr3, tc)
-{
-	(void)unlink(FILE);
-	(void)unlink(FILEERR);
-	(void)rmdir(DIR);
-}
-
-ATF_TC_WITH_CLEANUP(faccessat_fdlink);
+ATF_TC(faccessat_fdlink);
 

CVS commit: src/sys/lib/libkern/arch/sparc64

2013-03-16 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sun Mar 17 04:47:17 UTC 2013

Modified Files:
src/sys/lib/libkern/arch/sparc64: Makefile.inc

Log Message:
Remove duplicate source files.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libkern/arch/sparc64/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/sys/lib/libkern/arch/sparc64/Makefile.inc
diff -u src/sys/lib/libkern/arch/sparc64/Makefile.inc:1.10 src/sys/lib/libkern/arch/sparc64/Makefile.inc:1.11
--- src/sys/lib/libkern/arch/sparc64/Makefile.inc:1.10	Fri Aug 14 19:23:55 2009
+++ src/sys/lib/libkern/arch/sparc64/Makefile.inc	Sun Mar 17 04:47:16 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2009/08/14 19:23:55 dsl Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2013/03/17 04:47:16 nakayama Exp $
 
 SRCS+=	ffs.S
 SRCS+=	strlen.S
@@ -7,7 +7,6 @@ SRCS+=	random.S
 
 SRCS+=	bswap16.c bswap32.c
 
-SRCS+=	umul.S mul.S rem.S sdiv.S udiv.S umul.S urem.S
 SRCS+=	mul.S saveregs.S umul.S
 
 # `source' files built from m4 source



CVS commit: src/tests/lib/libc/locale

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 05:02:14 UTC 2013

Modified Files:
src/tests/lib/libc/locale: t_io.c

Log Message:
Mark two routinely-broken tests as expected failures referencing PR lib/47660.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/locale/t_io.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/lib/libc/locale/t_io.c
diff -u src/tests/lib/libc/locale/t_io.c:1.1 src/tests/lib/libc/locale/t_io.c:1.2
--- src/tests/lib/libc/locale/t_io.c:1.1	Thu Feb 28 21:52:02 2013
+++ src/tests/lib/libc/locale/t_io.c	Sun Mar 17 05:02:13 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_io.c,v 1.1 2013/02/28 21:52:02 christos Exp $ */
+/* $NetBSD: t_io.c,v 1.2 2013/03/17 05:02:13 jmmv Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include sys/cdefs.h
 __COPYRIGHT(@(#) Copyright (c) 2011\
  The NetBSD Foundation, inc. All rights reserved.);
-__RCSID($NetBSD: t_io.c,v 1.1 2013/02/28 21:52:02 christos Exp $);
+__RCSID($NetBSD: t_io.c,v 1.2 2013/03/17 05:02:13 jmmv Exp $);
 
 #include sys/param.h
 #include errno.h
@@ -55,6 +55,7 @@ ATF_TC_BODY(bad_big5_wprintf, tc)
 {
 	wchar_t ibuf[] = { 0xcf10, 0 };
 	setlocale(LC_CTYPE, zh_TW.Big5);
+	atf_tc_expect_fail(PR lib/47660);
 	ATF_REQUIRE_EQ(wprintf(L%ls\n, ibuf), -1);
 }
 
@@ -154,6 +155,7 @@ ATF_TC_BODY(bad_eucJP_getwc, tc)
 	setlocale(LC_CTYPE, ja_JP.eucJP);
 	// WTF? Not even returning what it read?
 	ATF_CHECK_EQ(getwc(fp), 0xcf20);
+	atf_tc_expect_fail(PR lib/47660);
 	ATF_REQUIRE_EQ(getwc(fp), WEOF);
 	fclose(fp);
 }



CVS commit: src/tests/lib/libpthread

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 05:13:13 UTC 2013

Modified Files:
src/tests/lib/libpthread: t_cond.c

Log Message:
Try to trigger the cond_timedwait_race race several times.

Sometime this tests passes (after all, it's exercising a race condition) and
when it does it's reported as a failure.  By giving the test a few chances
to expose the problem, we prevent this noisy signal.  When the race is really
addressed, this will start failing consistently as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libpthread/t_cond.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/lib/libpthread/t_cond.c
diff -u src/tests/lib/libpthread/t_cond.c:1.3 src/tests/lib/libpthread/t_cond.c:1.4
--- src/tests/lib/libpthread/t_cond.c:1.3	Sun Mar 27 16:45:15 2011
+++ src/tests/lib/libpthread/t_cond.c	Sun Mar 17 05:13:13 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cond.c,v 1.3 2011/03/27 16:45:15 jruoho Exp $ */
+/* $NetBSD: t_cond.c,v 1.4 2013/03/17 05:13:13 jmmv 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_cond.c,v 1.3 2011/03/27 16:45:15 jruoho Exp $);
+__RCSID($NetBSD: t_cond.c,v 1.4 2013/03/17 05:13:13 jmmv Exp $);
 
 #include sys/time.h
 
@@ -349,19 +349,25 @@ ATF_TC_HEAD(cond_timedwait_race, tc)
 ATF_TC_BODY(cond_timedwait_race, tc)
 {
 	pthread_t tid[64];
-	size_t i;
+	size_t i, j;
 
 	atf_tc_expect_fail(PR lib/44756);
+	/* This outer loop is to ensure that a false positive of this race
+	 * test does not report the test as broken (due to the test not
+	 * triggering the expected failure).  However, we want to make this
+	 * fail consistently when the race is resolved, and this approach
+	 * will have the desired effect. */
+	for (j = 0; j  10; j++ ) {
+		for (i = 0; i  __arraycount(tid); i++) {
+
+			PTHREAD_REQUIRE(pthread_create(tid[i], NULL,
+			pthread_cond_timedwait_func, NULL));
+		}
 
-	for (i = 0; i  __arraycount(tid); i++) {
+		for (i = 0; i  __arraycount(tid); i++) {
 
-		PTHREAD_REQUIRE(pthread_create(tid[i], NULL,
-			pthread_cond_timedwait_func, NULL));
-	}
-
-	for (i = 0; i  __arraycount(tid); i++) {
-
-		PTHREAD_REQUIRE(pthread_join(tid[i], NULL));
+			PTHREAD_REQUIRE(pthread_join(tid[i], NULL));
+		}
 	}
 }
 



CVS commit: src/tests/lib/libc/gen

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 05:47:48 UTC 2013

Modified Files:
src/tests/lib/libc/gen: t_sleep.c

Log Message:
Do not special-case qemu when expecting the failure due to PR kern/43997.

I am sporadically observing this in my real machine as well.  It's harder
to trigger, but it happens.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/t_sleep.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/lib/libc/gen/t_sleep.c
diff -u src/tests/lib/libc/gen/t_sleep.c:1.5 src/tests/lib/libc/gen/t_sleep.c:1.6
--- src/tests/lib/libc/gen/t_sleep.c:1.5	Fri Nov  9 20:13:24 2012
+++ src/tests/lib/libc/gen/t_sleep.c	Sun Mar 17 05:47:48 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: t_sleep.c,v 1.5 2012/11/09 20:13:24 pgoyette Exp $ */
+/* $NetBSD: t_sleep.c,v 1.6 2013/03/17 05:47:48 jmmv Exp $ */
 
 /*-
  * Copyright (c) 2006 Frank Kardel
@@ -301,8 +301,7 @@ sleeptest(int (*test)(struct timespec *,
 		delta3 *= round;
 
 		if (delta3  FUZZ || delta3  -FUZZ) {
-			if (!sim_remain 
-			system(cpuctl identify 0 | grep -q QEMU) == 0) 
+			if (!sim_remain)
 atf_tc_expect_fail(Long reschedule latency 
 due to PR kern/43997);
 



CVS commit: src/external/bsd/kyua-testers/dist

2013-03-16 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sun Mar 17 05:56:47 UTC 2013

Modified Files:
src/external/bsd/kyua-testers/dist: fs_test.c

Log Message:
Apply upstream change 1b82d0fe146031526b73454cc64bca7ee1f5b87a:

Fix fs_test:cleanup__mount_point__busy

The first call to kyua_fs_cleanup in this test was supposed to fail as
it is exercising an error path.  But the check was reversed, expecting
no error.  Fix this obvious mistake.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/kyua-testers/dist/fs_test.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/bsd/kyua-testers/dist/fs_test.c
diff -u src/external/bsd/kyua-testers/dist/fs_test.c:1.1.1.1 src/external/bsd/kyua-testers/dist/fs_test.c:1.2
--- src/external/bsd/kyua-testers/dist/fs_test.c:1.1.1.1	Tue Feb 19 06:01:39 2013
+++ src/external/bsd/kyua-testers/dist/fs_test.c	Sun Mar 17 05:56:46 2013
@@ -392,7 +392,7 @@ ATF_TC_BODY(cleanup__mount_point__busy, 
 while (!atf_utils_file_exists(done)) {}
 fprintf(stderr, Child done; cleaning up\n);
 
-ATF_REQUIRE(!kyua_error_is_set(kyua_fs_cleanup(root)));
+ATF_REQUIRE(kyua_error_is_set(kyua_fs_cleanup(root)));
 ATF_REQUIRE(atf_utils_file_exists(root/dir1/dont-delete-me));
 
 fprintf(stderr, Killing child\n);