CVS commit: src/usr.bin/progress

2021-08-17 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug 17 07:18:43 UTC 2021

Modified Files:
src/usr.bin/progress: progress.c

Log Message:
Add missing check for error returns from read().  Found by inspection
while reviewing the changes suggested by RVP in PR install/56303, but
not believed to be the cause of the failure reported in that PR.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/progress/progress.c

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/progress/progress.c
diff -u src/usr.bin/progress/progress.c:1.24 src/usr.bin/progress/progress.c:1.25
--- src/usr.bin/progress/progress.c:1.24	Mon Aug  9 10:46:39 2021
+++ src/usr.bin/progress/progress.c	Tue Aug 17 07:18:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $ */
+/*	$NetBSD: progress.c,v 1.25 2021/08/17 07:18:43 gson Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $");
+__RCSID("$NetBSD: progress.c,v 1.25 2021/08/17 07:18:43 gson Exp $");
 #endif/* not lint */
 
 #include 
@@ -231,7 +231,11 @@ main(int argc, char *argv[])
 		do {
 			nr = read(fd, fb_buf, buffersize);
 		} while (nr < 0 && errno == EINTR);
-		if (nr <= 0)
+		if (nr < 0) {
+			progressmeter(1);
+			err(1, "reading input");
+		}
+		if (nr == 0)
 			break;
 		for (off = 0; nr; nr -= nw, off += nw, bytes += nw)
 			if ((nw = write(outpipe[1], fb_buf + off,



CVS commit: src/usr.bin/progress

2021-08-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Aug  9 10:46:39 UTC 2021

Modified Files:
src/usr.bin/progress: progress.c

Log Message:
Test errno when the return value from wait() indicates an error, not
when it indicates success.  PR install/56303.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/progress/progress.c

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/progress/progress.c
diff -u src/usr.bin/progress/progress.c:1.23 src/usr.bin/progress/progress.c:1.24
--- src/usr.bin/progress/progress.c:1.23	Thu Jan  7 12:02:52 2021
+++ src/usr.bin/progress/progress.c	Mon Aug  9 10:46:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $ */
+/*	$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $");
+__RCSID("$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $");
 #endif/* not lint */
 
 #include 
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
 		 */
 		ws = WIFSIGNALED(ws) ? WTERMSIG(ws) : WEXITSTATUS(ws);
 
-		if (deadpid != -1 && errno == EINTR)
+		if (deadpid == -1 && errno == EINTR)
 			continue;
 		if (deadpid == pid) {
 			pid = 0;



CVS commit: src/tests/usr.sbin/execsnoop

2021-07-29 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Jul 29 14:58:35 UTC 2021

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh

Log Message:
Skip the test when the dtrace_syscall module is not loaded and can't
be autoloaded, as may be the case on arm because securelevel.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.sbin/execsnoop/t_execsnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.11
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10	Tue Jul 27 15:29:22 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Thu Jul 29 14:58:35 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.10 2021/07/27 15:29:22 gson Exp $
+# $NetBSD: t_execsnoop.sh,v 1.11 2021/07/29 14:58:35 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,6 +38,13 @@ basic_head() {
 }
 
 basic_body() {
+	if
+		! modstat dtrace_syscall | grep dtrace_syscall &&
+		! modstat -A
+	then
+		atf_skip "dtrace_syscall module not loaded and can't be autoloaded"
+	fi
+
 	n=10
 	atf_check -s exit:0 -o ignore -e empty -x "execsnoop >$stdout 2>$stderr &"
 	sleep 5



CVS commit: src/tests/usr.sbin/execsnoop

2021-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jul 27 15:29:22 UTC 2021

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh

Log Message:
Show the stderr from execsnoop so that we can see why it fails on arm.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/usr.sbin/execsnoop/t_execsnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.9 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.10
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.9	Tue Jul 27 11:05:39 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Tue Jul 27 15:29:22 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.9 2021/07/27 11:05:39 skrll Exp $
+# $NetBSD: t_execsnoop.sh,v 1.10 2021/07/27 15:29:22 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,8 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-tmp="execsnoop.out"
+stdout="execsnoop.out"
+stderr="execsnoop.stderr"
 
 atf_test_case basic cleanup
 basic_head() {
@@ -38,7 +39,7 @@ basic_head() {
 
 basic_body() {
 	n=10
-	atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &"
+	atf_check -s exit:0 -o ignore -e empty -x "execsnoop >$stdout 2>$stderr &"
 	sleep 5
 
 	while [ $n -gt 0 ]; do
@@ -48,7 +49,9 @@ basic_body() {
 
 	sleep 5
 
-	if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then
+	cat $stderr >&2
+
+	if [ ! $(cat $stdout | grep "whoami" | wc -l) -eq 10 ]; then
 		atf_fail "execsnoop does not work"
 	fi
 



CVS commit: src/tests/usr.sbin/execsnoop

2021-07-25 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jul 25 15:51:32 UTC 2021

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh

Log Message:
Only expect failure on ARM


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.sbin/execsnoop/t_execsnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.7 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.8
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.7	Sun Jul 25 10:21:44 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Sun Jul 25 15:51:32 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.7 2021/07/25 10:21:44 gson Exp $
+# $NetBSD: t_execsnoop.sh,v 1.8 2021/07/25 15:51:32 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,7 +37,10 @@ basic_head() {
 }
 
 basic_body() {
-	atf_expect_fail "PR kern/53417"
+	case `uname -p` in
+	*arm*)
+		atf_expect_fail "PR kern/53417" ;;
+	esac
 
 	n=10
 	atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &"



CVS commit: src/tests/usr.sbin/execsnoop

2021-07-25 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jul 25 10:21:44 UTC 2021

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh

Log Message:
Remove "pkill -9 execsnoop".  It's wrong on so many levels: first of
all, it does not actually kill anything because the process executing
the execsnoop script is called "sh", not "execsnoop".  And even if it
would somehow kill the shell running the execsnoop script, it still
would not kill the dtrace child process.  On the other hand, if there
happened to be an unrelated process actually called "execsnoop", it
would kill that.

The actual killing of the execsnoop sh and dtrace processes happens in
the ATF cleanup stage (as it always has).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.sbin/execsnoop/t_execsnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.6 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.7
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.6	Sun Jul 25 10:11:32 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Sun Jul 25 10:21:44 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.6 2021/07/25 10:11:32 gson Exp $
+# $NetBSD: t_execsnoop.sh,v 1.7 2021/07/25 10:21:44 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -49,8 +49,6 @@ basic_body() {
 	done
 
 	sleep 5
-	pkill -9 execsnoop
-	sleep 1
 
 	if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then
 		atf_fail "execsnoop does not work"



CVS commit: src/tests/usr.sbin/execsnoop

2021-07-25 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jul 25 10:11:32 UTC 2021

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh

Log Message:
Increase sleep waiting for execsnoop to start; one second is not sufficient
on a Dell Latitude D400 i386 laptop.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.sbin/execsnoop/t_execsnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.6
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5	Sat Jul 24 15:56:05 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Sun Jul 25 10:11:32 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $
+# $NetBSD: t_execsnoop.sh,v 1.6 2021/07/25 10:11:32 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,7 +41,7 @@ basic_body() {
 
 	n=10
 	atf_check -s exit:0 -o ignore -e empty -x "execsnoop > $tmp &"
-	sleep 1
+	sleep 5
 
 	while [ $n -gt 0 ]; do
 		whoami



CVS commit: src/tests/usr.sbin

2021-07-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jul 24 15:56:06 UTC 2021

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Create temporary files in . rather than /tmp so that they get cleaned up
automatically by atf.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/execsnoop/t_execsnoop.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/opensnoop/t_opensnoop.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/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.4 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.4	Sun Jul 18 06:24:58 2021
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Sat Jul 24 15:56:05 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.4 2021/07/18 06:24:58 dholland Exp $
+# $NetBSD: t_execsnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,7 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-tmp="/tmp/execsnoop"
+tmp="execsnoop.out"
 
 atf_test_case basic cleanup
 basic_head() {
@@ -60,10 +60,6 @@ basic_body() {
 }
 
 basic_cleanup() {
-
-	if [ -f $tmp ]; then
-		rm $tmp
-	fi
 }
 
 atf_init_test_cases() {

Index: src/tests/usr.sbin/opensnoop/t_opensnoop.sh
diff -u src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4 src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.5
--- src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4	Sat Jul 11 09:55:26 2020
+++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh	Sat Jul 24 15:56:05 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_opensnoop.sh,v 1.4 2020/07/11 09:55:26 jruoho Exp $
+# $NetBSD: t_opensnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,7 +27,7 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
-tmp="/tmp/opensnoop"
+tmp="opensnoop.out"
 
 atf_test_case basic cleanup
 basic_head() {
@@ -62,10 +62,6 @@ basic_body() {
 }
 
 basic_cleanup() {
-
-	if [ -f $tmp ]; then
-		rm $tmp
-	fi
 }
 
 atf_init_test_cases() {



CVS commit: src/external/bsd/atf/dist/tools

2021-07-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Jul  8 18:10:52 UTC 2021

Modified Files:
src/external/bsd/atf/dist/tools: atf-run.cpp

Log Message:
When running an individual test case under isolation, make the test
case count on the tp-start line of the output match the number of test
cases actually executed (one) so that the atf-run output is valid
input to atf-report.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/dist/tools/atf-run.cpp

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/atf/dist/tools/atf-run.cpp
diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.6 src/external/bsd/atf/dist/tools/atf-run.cpp:1.7
--- src/external/bsd/atf/dist/tools/atf-run.cpp:1.6	Sat Apr 10 10:32:57 2021
+++ src/external/bsd/atf/dist/tools/atf-run.cpp	Thu Jul  8 18:10:52 2021
@@ -388,7 +388,22 @@ atf_run::run_test_program(const tools::f
 tools::fs::temp_dir resdir(
 tools::fs::path(tools::config::get("atf_workdir")) / "atf-run.XX");
 
-w.start_tp(tp.str(), md.test_cases.size());
+size_t nseltcs;
+if (tc.empty()) {
+nseltcs = md.test_cases.size();
+} else {
+nseltcs = 0;
+for (std::map< std::string, vars_map >::const_iterator iter
+ = md.test_cases.begin(); iter != md.test_cases.end(); iter++) {
+const std::string& tcname = (*iter).first;
+if (tcname == tc)
+nseltcs++;
+}
+if (nseltcs == 0)
+throw std::runtime_error("No such test case");
+}
+
+w.start_tp(tp.str(), nseltcs);
 if (md.test_cases.empty()) {
 w.end_tp("Bogus test program: reported 0 test cases");
 errcode = EXIT_FAILURE;



CVS commit: src/tests/fs/tmpfs

2021-06-04 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun  5 06:40:59 UTC 2021

Modified Files:
src/tests/fs/tmpfs: t_vnd.sh

Log Message:
Use the correct pathname when cleaning up the inner mount on test
failure.  Fixes the ATF crash reported in PR bin/56221, but not
the issue causing the test to fail in the first place.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/fs/tmpfs/t_vnd.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/tmpfs/t_vnd.sh
diff -u src/tests/fs/tmpfs/t_vnd.sh:1.10 src/tests/fs/tmpfs/t_vnd.sh:1.11
--- src/tests/fs/tmpfs/t_vnd.sh:1.10	Thu Mar 23 08:18:17 2017
+++ src/tests/fs/tmpfs/t_vnd.sh	Sat Jun  5 06:40:59 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_vnd.sh,v 1.10 2017/03/23 08:18:17 martin Exp $
+# $NetBSD: t_vnd.sh,v 1.11 2021/06/05 06:40:59 gson Exp $
 #
 # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -69,7 +69,7 @@ basic_body() {
 }
 basic_cleanup() {
 	if [ ! -f done ]; then
-		umount mnt 2>/dev/null 1>&2
+		umount mntpt/mnt 2>/dev/null 1>&2
 		vndconfig -u ${vnddev} 2>/dev/null 1>&2
 	fi
 }



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

2021-05-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon May 24 10:44:06 UTC 2021

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.h

Log Message:
On mips, avoid deliberately executing an illegal instruction for now
because it causes GXemul to exit rather than generating a trap.  A bug
report has been sent to the GXemul author.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/tests/lib/libc/sys/t_ptrace_wait.h

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/sys/t_ptrace_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.32 src/tests/lib/libc/sys/t_ptrace_wait.h:1.33
--- src/tests/lib/libc/sys/t_ptrace_wait.h:1.32	Mon Jun 22 12:21:02 2020
+++ src/tests/lib/libc/sys/t_ptrace_wait.h	Mon May 24 10:44:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.h,v 1.32 2020/06/22 12:21:02 rin Exp $	*/
+/*	$NetBSD: t_ptrace_wait.h,v 1.33 2021/05/24 10:44:06 gson Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -648,7 +648,9 @@ trigger_ill(void)
 
 	/* Illegal instruction causes CPU trap, translated to SIGILL */
 #ifdef PTRACE_ILLEGAL_ASM
+#ifndef __mips__ /* To avoid GXemul crash */
 	PTRACE_ILLEGAL_ASM;
+#endif
 #else
 	/* port me */
 #endif



CVS commit: src/external/bsd/atf/dist/tools

2021-04-10 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Apr 10 10:32:57 UTC 2021

Modified Files:
src/external/bsd/atf/dist/tools: atf-run.1 atf-run.cpp

Log Message:
Add support for running individual test cases under isolation.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/atf-run.1
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/atf/dist/tools/atf-run.cpp

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/atf/dist/tools/atf-run.1
diff -u src/external/bsd/atf/dist/tools/atf-run.1:1.4 src/external/bsd/atf/dist/tools/atf-run.1:1.5
--- src/external/bsd/atf/dist/tools/atf-run.1:1.4	Sat Feb  8 19:13:44 2014
+++ src/external/bsd/atf/dist/tools/atf-run.1	Sat Apr 10 10:32:57 2021
@@ -26,23 +26,22 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 1, 2010
+.Dd April 10, 2021
 .Dt ATF-RUN 1
 .Os
 .Sh NAME
 .Nm atf-run
-.Nd executes a collection of test programs
+.Nd executes a collection of tests
 .Sh SYNOPSIS
 .Nm
 .Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN
-.Op Ar test_program1 Op Ar .. test_programN
+.Op Ar test1 Op Ar .. testN
 .Nm
 .Fl h
 .Sh DESCRIPTION
 .Nm
-executes a collection of test programs or, in other words, a complete
-test suite.
-The results of each test program are collected by the tool, and are then
+executes a collection of test cases, test programs, or a complete test suite.
+The results of each test are collected by the tool, and are then
 multiplexed into a single machine-parseable report; see
 .Xr atf-formats 5
 for more details.
@@ -70,8 +69,14 @@ In the first synopsis form,
 parses the
 .Pa Atffile
 in the current directory and runs all the test programs specified in it.
-If any test program names are given as part of the command line, those are
-the ones executed instead of the complete list.
+If any
+.Ar test
+arguments are given as part of the command line, those tests are
+executed instead of the complete list.  Each
+.Ar test
+argument can be either the name of a test program, or a string of the form
+.Ar test_program:test_case
+to execute a single test case.
 .Pp
 In the second synopsis form,
 .Nm

Index: src/external/bsd/atf/dist/tools/atf-run.cpp
diff -u src/external/bsd/atf/dist/tools/atf-run.cpp:1.5 src/external/bsd/atf/dist/tools/atf-run.cpp:1.6
--- src/external/bsd/atf/dist/tools/atf-run.cpp:1.5	Tue Feb 11 18:13:45 2014
+++ src/external/bsd/atf/dist/tools/atf-run.cpp	Sat Apr 10 10:32:57 2021
@@ -81,11 +81,13 @@ class atf_run : public tools::applicatio
 
 size_t count_tps(std::vector< std::string >) const;
 
-int run_test(const tools::fs::path&, tools::test_program::atf_tps_writer&,
+int run_test(const tools::fs::path&, const std::string &,
+ tools::test_program::atf_tps_writer&,
  const vars_map&);
 int run_test_directory(const tools::fs::path&,
tools::test_program::atf_tps_writer&);
 int run_test_program(const tools::fs::path&,
+ const std::string tc,
  tools::test_program::atf_tps_writer&,
  const vars_map&);
 
@@ -179,7 +181,7 @@ std::string
 atf_run::specific_args(void)
 const
 {
-return "[test-program1 .. test-programN]";
+return "[test1 .. testN]";
 }
 
 atf_run::options_set
@@ -214,6 +216,7 @@ atf_run::parse_vflag(const std::string& 
 
 int
 atf_run::run_test(const tools::fs::path& tp,
+  const std::string &tc,
   tools::test_program::atf_tps_writer& w,
   const vars_map& config)
 {
@@ -226,7 +229,7 @@ atf_run::run_test(const tools::fs::path&
 const vars_map effective_config =
 tools::config_file::merge_configs(config, m_cmdline_vars);
 
-errcode = run_test_program(tp, w, effective_config);
+errcode = run_test_program(tp, tc, w, effective_config);
 }
 return errcode;
 }
@@ -247,7 +250,7 @@ atf_run::run_test_directory(const tools:
 bool ok = true;
 for (std::vector< std::string >::const_iterator iter = af.tps().begin();
  iter != af.tps().end(); iter++) {
-const bool result = run_test(tp / *iter, w,
+const bool result = run_test(tp / *iter, "", w,
 tools::config_file::merge_configs(af.conf(), test_suite_vars));
 ok &= (result == EXIT_SUCCESS);
 }
@@ -362,6 +365,7 @@ atf_run::get_test_case_result(const std:
 
 int
 atf_run::run_test_program(const tools::fs::path& tp,
+  const std::string tc,
   tools::test_program::atf_tps_writer& w,
   const vars_map& config)
 {
@@ -394,6 +398,9 @@ atf_run::run_test_program(const tools::f
 const std::string& tcname = (*iter).first;
 const vars_map& tcmd = (*iter).second;
 
+   

CVS commit: src/tests/lib/libossaudio

2020-12-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Dec 26 15:28:52 UTC 2020

Modified Files:
src/tests/lib/libossaudio: t_ossaudio.c

Log Message:
Disable the lib/libossaudio/t_ossaudio:oss_dsp_trigger_read test case
on sparc until PR port-sparc/55876 gets fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libossaudio/t_ossaudio.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/libossaudio/t_ossaudio.c
diff -u src/tests/lib/libossaudio/t_ossaudio.c:1.2 src/tests/lib/libossaudio/t_ossaudio.c:1.3
--- src/tests/lib/libossaudio/t_ossaudio.c:1.2	Mon Dec 14 10:58:08 2020
+++ src/tests/lib/libossaudio/t_ossaudio.c	Sat Dec 26 15:28:52 2020
@@ -292,6 +292,10 @@ ATF_TC_BODY(oss_dsp_trigger_read, tc)
 	struct audio_info info;
 	int fd, bits;
 
+#if defined(__sparc__)
+	atf_tc_skip("PR port-sparc/55876");
+#endif
+
 	if ((fd = open("/dev/audio", O_RDONLY)) == -1)
 		atf_tc_skip("Audio device unavailable for recording");
 



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

2020-11-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri Nov 27 15:37:06 UTC 2020

Modified Files:
src/tests/lib/libc/string: t_memmem.c

Log Message:
delete trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/string/t_memmem.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_memmem.c
diff -u src/tests/lib/libc/string/t_memmem.c:1.4 src/tests/lib/libc/string/t_memmem.c:1.5
--- src/tests/lib/libc/string/t_memmem.c:1.4	Mon Oct 15 17:55:28 2018
+++ src/tests/lib/libc/string/t_memmem.c	Fri Nov 27 15:37:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_memmem.c,v 1.4 2018/10/15 17:55:28 christos Exp $ */
+/*	$NetBSD: t_memmem.c,v 1.5 2020/11/27 15:37:06 gson Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@ ATF_TC_BODY(memmem_oob, tc)
 	size_t pg = getpagesize();
 	char *src = mmap(NULL, pg, PROT_READ|PROT_WRITE,
 	MAP_ANON|MAP_PRIVATE, -1, (off_t)0);
-	ATF_CHECK(src != MAP_FAILED); 
+	ATF_CHECK(src != MAP_FAILED);
 	char *guard = mmap(src + pg, pg,
 	PROT_NONE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, (off_t)0);
 	for (size_t i = 2; i < 5; i++) {



CVS commit: src/tests/usr.bin

2020-11-17 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Nov 17 08:25:57 UTC 2020

Modified Files:
src/tests/usr.bin/c++: t_tsan_data_race.sh
t_tsan_heap_use_after_free.sh t_tsan_lock_order_inversion.sh
t_tsan_locked_mutex_destroy.sh t_tsan_signal_errno.sh
t_tsan_thread_leak.sh t_tsan_vptr_race.sh
src/tests/usr.bin/cc: t_tsan_data_race.sh t_tsan_heap_use_after_free.sh
t_tsan_lock_order_inversion.sh t_tsan_locked_mutex_destroy.sh
t_tsan_signal_errno.sh t_tsan_thread_leak.sh

Log Message:
Mark t_tsan_*:*profile test cases as expected failures as discussed in
PR toolchain/55760.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/c++/t_tsan_data_race.sh \
src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/c++/t_tsan_signal_errno.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/c++/t_tsan_thread_leak.sh \
src/tests/usr.bin/c++/t_tsan_vptr_race.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/cc/t_tsan_data_race.sh \
src/tests/usr.bin/cc/t_tsan_heap_use_after_free.sh \
src/tests/usr.bin/cc/t_tsan_lock_order_inversion.sh \
src/tests/usr.bin/cc/t_tsan_locked_mutex_destroy.sh \
src/tests/usr.bin/cc/t_tsan_signal_errno.sh \
src/tests/usr.bin/cc/t_tsan_thread_leak.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/usr.bin/c++/t_tsan_data_race.sh
diff -u src/tests/usr.bin/c++/t_tsan_data_race.sh:1.4 src/tests/usr.bin/c++/t_tsan_data_race.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_data_race.sh:1.4	Tue Sep 15 09:33:12 2020
+++ src/tests/usr.bin/c++/t_tsan_data_race.sh	Tue Nov 17 08:25:57 2020
@@ -79,6 +79,7 @@ EOF
 }
 
 data_race_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 int GlobalData; pthread_barrier_t barrier;
Index: src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh
diff -u src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.4 src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh:1.4	Tue Sep 15 09:33:12 2020
+++ src/tests/usr.bin/c++/t_tsan_heap_use_after_free.sh	Tue Nov 17 08:25:57 2020
@@ -105,6 +105,7 @@ EOF
 }
 
 heap_use_after_free_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 #include 
Index: src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh
diff -u src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.4 src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh:1.4	Tue Sep 15 09:33:12 2020
+++ src/tests/usr.bin/c++/t_tsan_lock_order_inversion.sh	Tue Nov 17 08:25:57 2020
@@ -85,6 +85,7 @@ EOF
 }
 
 lock_order_inversion_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 
Index: src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh
diff -u src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.4 src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh:1.4	Tue Sep 15 09:33:12 2020
+++ src/tests/usr.bin/c++/t_tsan_locked_mutex_destroy.sh	Tue Nov 17 08:25:57 2020
@@ -89,6 +89,7 @@ EOF
 }
 
 locked_mutex_destroy_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 #include 
Index: src/tests/usr.bin/c++/t_tsan_signal_errno.sh
diff -u src/tests/usr.bin/c++/t_tsan_signal_errno.sh:1.4 src/tests/usr.bin/c++/t_tsan_signal_errno.sh:1.5
--- src/tests/usr.bin/c++/t_tsan_signal_errno.sh:1.4	Tue Sep 15 09:33:12 2020
+++ src/tests/usr.bin/c++/t_tsan_signal_errno.sh	Tue Nov 17 08:25:57 2020
@@ -85,6 +85,7 @@ EOF
 }
 
 signal_errno_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 #include 

Index: src/tests/usr.bin/c++/t_tsan_thread_leak.sh
diff -u src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.3 src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.4
--- src/tests/usr.bin/c++/t_tsan_thread_leak.sh:1.3	Mon Sep 14 15:17:53 2020
+++ src/tests/usr.bin/c++/t_tsan_thread_leak.sh	Tue Nov 17 08:25:57 2020
@@ -93,6 +93,7 @@ EOF
 }
 
 thread_leak_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 #include 
Index: src/tests/usr.bin/c++/t_tsan_vptr_race.sh
diff -u src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.3 src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.4
--- src/tests/usr.bin/c++/t_tsan_vptr_race.sh:1.3	Mon Sep 14 15:17:53 2020
+++ src/tests/usr.bin/c++/t_tsan_vptr_race.sh	Tue Nov 17 08:25:57 2020
@@ -99,6 +99,7 @@ EOF
 }
 
 vptr_race_profile_body(){
+	atf_expect_fail "PR toolchain/55760"
 	cat > test.cc << EOF
 #include 
 pthread_barrier_t barrier;

Index: src/tests/usr.bin/cc/t_tsan_data_race.sh
diff -u src/tests/usr.bin/cc/t_tsan_data_race.sh:1.4 src/tests/usr.bin/cc/

CVS commit: src/external

2020-11-10 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Nov 10 11:00:02 UTC 2020

Modified Files:
src/external: README

Log Message:
Delete trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/README

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

Modified files:

Index: src/external/README
diff -u src/external/README:1.17 src/external/README:1.18
--- src/external/README:1.17	Sun Apr  8 16:57:07 2018
+++ src/external/README	Tue Nov 10 11:00:02 2020
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.17 2018/04/08 16:57:07 jmcneill Exp $
+$NetBSD: README,v 1.18 2020/11/10 11:00:02 gson Exp $
 
 Organization of Sources:
 
@@ -26,7 +26,7 @@ and is organized as follows:
 
 		Makefile
 			Build the package.
-			
+
 		dist/
 			The third-party source for a given package.
 
@@ -63,7 +63,7 @@ The licenses currently used are:
 
 	historical	Lucent's old license:
 			http://www.opensource.org/licenses/historical.php
-			
+
 	ibm-public	IBM's public license:
 			http://www.opensource.org/licenses/ibmpl.php
 



CVS commit: src/usr.sbin/sysinst

2020-11-10 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Nov 10 09:14:01 UTC 2020

Modified Files:
src/usr.sbin/sysinst: util.c

Log Message:
Fix typos in comment


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/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/usr.sbin/sysinst/util.c
diff -u src/usr.sbin/sysinst/util.c:1.55 src/usr.sbin/sysinst/util.c:1.56
--- src/usr.sbin/sysinst/util.c:1.55	Wed Nov  4 16:26:35 2020
+++ src/usr.sbin/sysinst/util.c	Tue Nov 10 09:14:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.55 2020/11/04 16:26:35 martin Exp $	*/
+/*	$NetBSD: util.c,v 1.56 2020/11/10 09:14:01 gson Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1181,12 +1181,12 @@ entropy_add_manual(void)
 }
 
 /*
- * Get a file by some means and return a (potentioally only
+ * Get a file by some means and return a (potentially only
  * temporary valid) path to the local copy.
- * If mountpt is non empty, the caller should unmount that
+ * If mountpt is nonempty, the caller should unmount that
  * directory after processing the file.
  * Return success if the file is available, or failure if
- * the user canelled the request or network transfer failed.
+ * the user cancelled the request or network transfer failed.
  */
 static bool
 entropy_get_file(bool use_netbsd_seed, char *path)



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

2020-11-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Nov  1 18:19:54 UTC 2020

Modified Files:
src/tests/lib/libc/stdlib: t_mktemp.c

Log Message:
Make the mkstemps_basic and mkostemps_basic test cases not randomly
fail when the replacement string happens to contain the letter "y".


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_mktemp.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/stdlib/t_mktemp.c
diff -u src/tests/lib/libc/stdlib/t_mktemp.c:1.2 src/tests/lib/libc/stdlib/t_mktemp.c:1.3
--- src/tests/lib/libc/stdlib/t_mktemp.c:1.2	Wed Jul  1 05:37:25 2020
+++ src/tests/lib/libc/stdlib/t_mktemp.c	Sun Nov  1 18:19:54 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mktemp.c,v 1.2 2020/07/01 05:37:25 jruoho Exp $ */
+/* $NetBSD: t_mktemp.c,v 1.3 2020/11/01 18:19:54 gson Exp $ */
 
 /*-
  * Copyright (c) 2013, 2020 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_mktemp.c,v 1.2 2020/07/01 05:37:25 jruoho Exp $");
+__RCSID("$NetBSD: t_mktemp.c,v 1.3 2020/11/01 18:19:54 gson Exp $");
 
 #include 
 
@@ -136,6 +136,7 @@ ATF_TC_HEAD(mkstemps_basic, tc)
 ATF_TC_BODY(mkstemps_basic, tc)
 {
 	char template[] = "/tmp/mktemp.XXXyyy";
+	char *suffix = strchr(template, 'y');
 	struct stat sa;
 	int fd;
 
@@ -145,10 +146,7 @@ ATF_TC_BODY(mkstemps_basic, tc)
 
 	ATF_REQUIRE(fd != -1);
 	ATF_REQUIRE(strncmp(template, "/tmp/mktemp.", 12) == 0);
-
-	char *str = strchr(template, 'y');
-
-	ATF_REQUIRE(strcmp(str, "yyy") == 0);
+	ATF_REQUIRE(strcmp(suffix, "yyy") == 0);
 	ATF_REQUIRE(write(fd, "X", 1) == 1);
 	ATF_REQUIRE(fstat(fd, &sa) == 0);
 	ATF_REQUIRE(check_mode(sa, 0600, 0) == 0);
@@ -227,6 +225,7 @@ ATF_TC_BODY(mkostemps_basic, tc)
 	};
 
 	char template[] = "/tmp/mktemp.XXXyyy";
+	char *suffix = strchr(template, 'y');
 	struct stat sa;
 	size_t i;
 	int fd;
@@ -239,10 +238,7 @@ ATF_TC_BODY(mkostemps_basic, tc)
 
 		ATF_REQUIRE(fd != -1);
 		ATF_REQUIRE(strncmp(template, "/tmp/mktemp.", 12) == 0);
-
-		char *str = strchr(template, 'y');
-
-		ATF_REQUIRE(strcmp(str, "yyy") == 0);
+		ATF_REQUIRE(strcmp(suffix, "yyy") == 0);
 		ATF_REQUIRE(write(fd, "X", 1) == 1);
 		ATF_REQUIRE(fstat(fd, &sa) == 0);
 		ATF_REQUIRE(check_mode(sa, 0600 | flags[i], 0) == 0);



CVS commit: src/sys/net

2020-10-18 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Oct 18 13:07:31 UTC 2020

Modified Files:
src/sys/net: radix.c

Log Message:
Suppress the "rn_init: radix functions require max_keylen be set"
message when _KERNEL is defined, to avoid spurious messages from
kernels that have no routable network domains.  Fixes PR kern/55691.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/net/radix.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/net/radix.c
diff -u src/sys/net/radix.c:1.48 src/sys/net/radix.c:1.49
--- src/sys/net/radix.c:1.48	Mon Sep  3 16:29:35 2018
+++ src/sys/net/radix.c	Sun Oct 18 13:07:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: radix.c,v 1.48 2018/09/03 16:29:35 riastradh Exp $	*/
+/*	$NetBSD: radix.c,v 1.49 2020/10/18 13:07:31 gson Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1993
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: radix.c,v 1.48 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radix.c,v 1.49 2020/10/18 13:07:31 gson Exp $");
 
 #ifndef _NET_RADIX_H_
 #include 
@@ -1119,8 +1119,10 @@ rn_init(void)
 	}
 #endif
 	if (max_keylen == 0) {
+#ifndef _KERNEL
 		log(LOG_ERR,
 		"rn_init: radix functions require max_keylen be set\n");
+#endif
 		return;
 	}
 



CVS commit: src/usr.sbin/syslogd

2020-09-29 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Sep 29 14:08:43 UTC 2020

Modified Files:
src/usr.sbin/syslogd: syslogd.c

Log Message:
When reporting an error before daemonizing, prefix the error message
with the program name.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/usr.sbin/syslogd/syslogd.c

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

Modified files:

Index: src/usr.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.132 src/usr.sbin/syslogd/syslogd.c:1.133
--- src/usr.sbin/syslogd/syslogd.c:1.132	Thu Dec 26 04:53:12 2019
+++ src/usr.sbin/syslogd/syslogd.c	Tue Sep 29 14:08:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.132 2019/12/26 04:53:12 msaitoh Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.133 2020/09/29 14:08:43 gson Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)syslogd.c	8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.132 2019/12/26 04:53:12 msaitoh Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.133 2020/09/29 14:08:43 gson Exp $");
 #endif
 #endif /* not lint */
 
@@ -2881,7 +2881,7 @@ logerror(const char *fmt, ...)
 	if (!daemonized && Debug)
 		DPRINTF(D_MISC, "%s\n", outbuf);
 	if (!daemonized && !Debug)
-		printf("%s\n", outbuf);
+		printf("%s: %s\n", getprogname(), outbuf);
 
 	logerror_running = 0;
 }



CVS commit: src/sys/kern

2020-09-29 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Sep 29 07:51:01 UTC 2020

Modified Files:
src/sys/kern: kern_entropy.c

Log Message:
Log a message when a process blocks due to a lack of entropy.
Discussed on tech-kern.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/kern/kern_entropy.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/kern/kern_entropy.c
diff -u src/sys/kern/kern_entropy.c:1.23 src/sys/kern/kern_entropy.c:1.24
--- src/sys/kern/kern_entropy.c:1.23	Fri Aug 14 00:53:16 2020
+++ src/sys/kern/kern_entropy.c	Tue Sep 29 07:51:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_entropy.c,v 1.23 2020/08/14 00:53:16 riastradh Exp $	*/
+/*	$NetBSD: kern_entropy.c,v 1.24 2020/09/29 07:51:01 gson Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.23 2020/08/14 00:53:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.24 2020/09/29 07:51:01 gson Exp $");
 
 #include 
 #include 
@@ -1297,6 +1297,9 @@ entropy_extract(void *buf, size_t len, i
 
 		/* Wait for some entropy to come in and try again.  */
 		KASSERT(E->stage >= ENTROPY_WARM);
+		printf("entropy: pid %d (%s) blocking due to lack of entropy\n",
+		   curproc->p_pid, curproc->p_comm);
+
 		if (ISSET(flags, ENTROPY_SIG)) {
 			error = cv_wait_sig(&E->cv, &E->lock);
 			if (error)



CVS commit: src/sys/dev/usb

2020-09-20 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Sep 20 09:08:01 UTC 2020

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

Log Message:
Talk Like a Pirate Day was yesterday.


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/sys/dev/usb/ehci.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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.281 src/sys/dev/usb/ehci.c:1.282
--- src/sys/dev/usb/ehci.c:1.281	Sun May 17 08:38:37 2020
+++ src/sys/dev/usb/ehci.c	Sun Sep 20 09:08:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.281 2020/05/17 08:38:37 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.282 2020/09/20 09:08:01 gson Exp $ */
 
 /*
  * Copyright (c) 2004-2012,2016,2020 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.281 2020/05/17 08:38:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.282 2020/09/20 09:08:01 gson Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -3218,7 +3218,7 @@ ehci_close_pipe(struct usbd_pipe *pipe, 
 }
 
 /*
- * Arrrange for the hardware to tells us that it is not still
+ * Arrange for the hardware to tells us that it is not still
  * processing the TDs by setting the QH halted bit and wait for the ehci
  * door bell
  */



CVS commit: src/tests/rump/rumpnet

2020-09-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Sep  9 09:17:14 UTC 2020

Modified Files:
src/tests/rump/rumpnet: t_shmif.sh

Log Message:
Disable reverse DNS lookups in ping to avoid spurious test failures
due to unresponsive DNS servers.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/rump/rumpnet/t_shmif.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/rump/rumpnet/t_shmif.sh
diff -u src/tests/rump/rumpnet/t_shmif.sh:1.4 src/tests/rump/rumpnet/t_shmif.sh:1.5
--- src/tests/rump/rumpnet/t_shmif.sh:1.4	Mon May 13 17:55:09 2019
+++ src/tests/rump/rumpnet/t_shmif.sh	Wed Sep  9 09:17:14 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: t_shmif.sh,v 1.4 2019/05/13 17:55:09 bad Exp $
+#	$NetBSD: t_shmif.sh,v 1.5 2020/09/09 09:17:14 gson Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -61,7 +61,7 @@ crossping_body()
 		do
 			[ ${y} -eq ${x} ] && continue
 			atf_check -s exit:0 -o ignore -e ignore \
-			rump.ping -c 1 1.1.1.${y}
+			rump.ping -n -c 1 1.1.1.${y}
 		done
 	done
 }



CVS commit: src/tests/rump/rumpkern

2020-09-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Sep  1 18:40:09 UTC 2020

Modified Files:
src/tests/rump/rumpkern: t_sp.sh

Log Message:
Format PR references consistently so that they can be automatically
turned into links in HTML reports.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/rump/rumpkern/t_sp.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/rump/rumpkern/t_sp.sh
diff -u src/tests/rump/rumpkern/t_sp.sh:1.16 src/tests/rump/rumpkern/t_sp.sh:1.17
--- src/tests/rump/rumpkern/t_sp.sh:1.16	Fri Aug 28 19:35:07 2020
+++ src/tests/rump/rumpkern/t_sp.sh	Tue Sep  1 18:40:09 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: t_sp.sh,v 1.16 2020/08/28 19:35:07 martin Exp $
+#	$NetBSD: t_sp.sh,v 1.17 2020/09/01 18:40:09 gson Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -53,18 +53,18 @@ test_case_skip()
 
 test_case basic basic
 # test_case stress_short stress 1
-test_case_skip stress_short 50350 "fails after insane long time"
+test_case_skip stress_short kern/50350 "fails after insane long time"
 # test_case stress_long stress 2
-test_case_skip stress_long 50350 "leftover rump_server"
+test_case_skip stress_long kern/50350 "leftover rump_server"
 # test_case stress_killer stress 5 kill
-test_case_skip stress_killer 55356 "leftover rump_server"
+test_case_skip stress_killer kern/55356 "leftover rump_server"
 test_case fork_simple fork simple
 test_case fork_pipecomm fork pipecomm
 test_case fork_fakeauth fork fakeauth
 test_case sigsafe sigsafe sigsafe
 test_case signal signal
 # test_case reconnect reconnect
-test_case_skip reconnect 55304 "leftover rump_server"
+test_case_skip reconnect kern/55304 "leftover rump_server"
 
 basic()
 {



CVS commit: src/usr.sbin/nfsd

2020-08-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Aug 26 13:35:12 UTC 2020

Modified Files:
src/usr.sbin/nfsd: nfsd.c

Log Message:
Fix indentation


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/usr.sbin/nfsd/nfsd.c

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

Modified files:

Index: src/usr.sbin/nfsd/nfsd.c
diff -u src/usr.sbin/nfsd/nfsd.c:1.71 src/usr.sbin/nfsd/nfsd.c:1.72
--- src/usr.sbin/nfsd/nfsd.c:1.71	Wed Aug 26 13:33:42 2020
+++ src/usr.sbin/nfsd/nfsd.c	Wed Aug 26 13:35:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $	*/
+/*	$NetBSD: nfsd.c,v 1.72 2020/08/26 13:35:12 gson Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)nfsd.c	8.9 (Berkeley) 3/29/95";
 #else
-__RCSID("$NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $");
+__RCSID("$NetBSD: nfsd.c,v 1.72 2020/08/26 13:35:12 gson Exp $");
 #endif
 #endif /* not lint */
 
@@ -329,7 +329,7 @@ daemon2_fork(void)
 		/* child */
 		(void)close(detach_msg_pipe[0]);
 		(void)write(detach_msg_pipe[1], "", 1);
-		 return detach_msg_pipe[1];
+		return detach_msg_pipe[1];
 	 default:
 		break;
 	}



CVS commit: src/usr.sbin/nfsd

2020-08-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Aug 26 13:33:42 UTC 2020

Modified Files:
src/usr.sbin/nfsd: nfsd.c

Log Message:
Remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.sbin/nfsd/nfsd.c

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

Modified files:

Index: src/usr.sbin/nfsd/nfsd.c
diff -u src/usr.sbin/nfsd/nfsd.c:1.70 src/usr.sbin/nfsd/nfsd.c:1.71
--- src/usr.sbin/nfsd/nfsd.c:1.70	Wed Aug 26 13:32:56 2020
+++ src/usr.sbin/nfsd/nfsd.c	Wed Aug 26 13:33:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $	*/
+/*	$NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)nfsd.c	8.9 (Berkeley) 3/29/95";
 #else
-__RCSID("$NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $");
+__RCSID("$NetBSD: nfsd.c,v 1.71 2020/08/26 13:33:42 gson Exp $");
 #endif
 #endif /* not lint */
 
@@ -284,7 +284,7 @@ out:
  * is called to complete the daemonization and signal the parent
  * process to exit.
  *
- * These functions could potentially be moved to a library and 
+ * These functions could potentially be moved to a library and
  * shared by other daemons.
  *
  * The return value from daemon2_fork() is a file descriptor to



CVS commit: src/usr.sbin/nfsd

2020-08-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Aug 26 13:32:57 UTC 2020

Modified Files:
src/usr.sbin/nfsd: nfsd.c

Log Message:
Remove superfluous empty line


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/usr.sbin/nfsd/nfsd.c

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

Modified files:

Index: src/usr.sbin/nfsd/nfsd.c
diff -u src/usr.sbin/nfsd/nfsd.c:1.69 src/usr.sbin/nfsd/nfsd.c:1.70
--- src/usr.sbin/nfsd/nfsd.c:1.69	Wed Jun 17 00:16:22 2020
+++ src/usr.sbin/nfsd/nfsd.c	Wed Aug 26 13:32:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfsd.c,v 1.69 2020/06/17 00:16:22 kamil Exp $	*/
+/*	$NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)nfsd.c	8.9 (Berkeley) 3/29/95";
 #else
-__RCSID("$NetBSD: nfsd.c,v 1.69 2020/06/17 00:16:22 kamil Exp $");
+__RCSID("$NetBSD: nfsd.c,v 1.70 2020/08/26 13:32:56 gson Exp $");
 #endif
 #endif /* not lint */
 
@@ -548,7 +548,6 @@ main(int argc, char *argv[])
 		setupsock(&cfg[i], &set[i], i);
 		if (set[i].fd != -1)
 			connect_type_cnt++;
-
 	}
 
 	pthread_setname_np(pthread_self(), "master", NULL);



CVS commit: src/tests/lib/libm

2020-08-25 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug 25 13:39:16 UTC 2020

Modified Files:
src/tests/lib/libm: t_fmod.c

Log Message:
Only expect the fmod test case to fail when using qemu's TCG CPU emulation,
and not under hardware virtualization such as qemu -accel nvmm.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_fmod.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/libm/t_fmod.c
diff -u src/tests/lib/libm/t_fmod.c:1.3 src/tests/lib/libm/t_fmod.c:1.4
--- src/tests/lib/libm/t_fmod.c:1.3	Sat Jan  3 14:23:53 2015
+++ src/tests/lib/libm/t_fmod.c	Tue Aug 25 13:39:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fmod.c,v 1.3 2015/01/03 14:23:53 gson Exp $ */
+/* $NetBSD: t_fmod.c,v 1.4 2020/08/25 13:39:16 gson Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@ ATF_TC_HEAD(fmod, tc)
 
 ATF_TC_BODY(fmod, tc)
 {
-	if (isQEMU())
+	if (isQEMU_TCG())
 		atf_tc_expect_fail("PR misc/44767");
 
 	ATF_CHECK(fmodf(2.0, 1.0) == 0);



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

2020-08-23 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Aug 24 06:55:16 UTC 2020

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

Log Message:
Expect a failure to trap unaligned acesses only when running under
qemu's TCG CPU emulation, not when running under hardware virtualization
such as qemu -accel nvmm.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/tests/lib/libc/gen/t_siginfo.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_siginfo.c
diff -u src/tests/lib/libc/gen/t_siginfo.c:1.40 src/tests/lib/libc/gen/t_siginfo.c:1.41
--- src/tests/lib/libc/gen/t_siginfo.c:1.40	Sat Jun 20 07:30:09 2020
+++ src/tests/lib/libc/gen/t_siginfo.c	Mon Aug 24 06:55:16 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.40 2020/06/20 07:30:09 rin Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.41 2020/08/24 06:55:16 gson Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -495,7 +495,7 @@ ATF_TC_BODY(sigbus_adraln, tc)
 	addr = calloc(2, sizeof(int));
 	ATF_REQUIRE(addr != NULL);
 
-	if (isQEMU())
+	if (isQEMU_TCG())
 		atf_tc_expect_fail("QEMU fails to trap unaligned accesses");
 
 	/* Force an unaligned access */



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

2020-08-23 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Aug 23 11:04:58 UTC 2020

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

Log Message:
Expect failure only when running under qemu's TCG CPU emulation, not
when running under hardware virtualization such as qemu -accel nvmm.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/tests/lib/libc/gen/t_fpsetmask.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_fpsetmask.c
diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.20 src/tests/lib/libc/gen/t_fpsetmask.c:1.21
--- src/tests/lib/libc/gen/t_fpsetmask.c:1.20	Thu Apr 25 20:48:54 2019
+++ src/tests/lib/libc/gen/t_fpsetmask.c	Sun Aug 23 11:04:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_fpsetmask.c,v 1.20 2019/04/25 20:48:54 kamil Exp $ */
+/*	$NetBSD: t_fpsetmask.c,v 1.21 2020/08/23 11:04:58 gson Exp $ */
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -311,7 +311,7 @@ sigfpe(int s, siginfo_t *si, void *c)
 	\
 		FPU_PREREQ();		\
 	\
-		if (isQEMU())		\
+		if (isQEMU_TCG())	\
 			atf_tc_expect_fail("PR misc/44767");		\
 	\
 		m(t##_ops);		\



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

2020-08-23 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Aug 23 11:00:18 UTC 2020

Modified Files:
src/tests/lib/libc/gen: isqemu.h

Log Message:
Provide separate functions to check for running under qemu in general
and for running under qemu's built-in TCG CPU emulation (as opposed to
hardware virtualization via NVMM or KVM).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/isqemu.h

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/isqemu.h
diff -u src/tests/lib/libc/gen/isqemu.h:1.4 src/tests/lib/libc/gen/isqemu.h:1.5
--- src/tests/lib/libc/gen/isqemu.h:1.4	Sat Jan  3 14:21:05 2015
+++ src/tests/lib/libc/gen/isqemu.h	Sun Aug 23 11:00:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: isqemu.h,v 1.4 2015/01/03 14:21:05 gson Exp $	*/
+/*	$NetBSD: isqemu.h,v 1.5 2020/08/23 11:00:18 gson Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -33,14 +33,36 @@
  */
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 static __inline bool
 isQEMU(void) {
+   struct devlistargs dla = {
+	   .l_devname = "qemufwcfg0",
+	   .l_childname = NULL,
+	   .l_children = 0,
+   };
+   int fd = open(DRVCTLDEV, O_RDONLY, 0);
+   if (fd == -1)
+	   return false;
+   if (ioctl(fd, DRVLISTDEV, &dla) == -1) {
+	   close(fd);
+	   return false;
+   }
+   close(fd);
+   return true;
+}
+
+static __inline bool
+isQEMU_TCG(void) {
 #if defined(__i386__) || defined(__x86_64__)
 	char name[1024];
 	size_t len = sizeof(name);



CVS commit: src/tests/fs/nfs

2020-08-20 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Aug 20 07:32:40 UTC 2020

Modified Files:
src/tests/fs/nfs: t_rquotad.sh

Log Message:
Add cleanup of possible leftover rump processes, replacing the
non-working cleanup code just removed from ffs_common.sh.  Fixes
PR bin/48892 with respect to the t_rquotad test.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/nfs/t_rquotad.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/nfs/t_rquotad.sh
diff -u src/tests/fs/nfs/t_rquotad.sh:1.7 src/tests/fs/nfs/t_rquotad.sh:1.8
--- src/tests/fs/nfs/t_rquotad.sh:1.7	Mon May 13 17:55:07 2019
+++ src/tests/fs/nfs/t_rquotad.sh	Thu Aug 20 07:32:40 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_rquotad.sh,v 1.7 2019/05/13 17:55:07 bad Exp $ 
+# $NetBSD: t_rquotad.sh,v 1.8 2020/08/20 07:32:40 gson Exp $ 
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -24,10 +24,42 @@
 #  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 #  POSSIBILITY OF SUCH DAMAGE.
 #
+
+# Like test_case_root() in ../ffs/ffs_common.sh, plus cleanup of both
+# rump servers.
+
+test_case_rquotad()
+{
+	local name="${1}"; shift
+	local check_function="${1}"; shift
+	local descr="${1}"; shift
+	
+	atf_test_case "${name}" cleanup
+
+	eval "${name}_head() { \
+		atf_set "descr" "${descr}"
+		atf_set "require.user" "root"
+		atf_set "timeout" "360"
+	}"
+	eval "${name}_body() { \
+		RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \
+		export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
+		${check_function} " "${@}" "; \
+	}"
+	# Can't use RUMP_SOCKETS_LIST here because it is not set in
+# the cleanup shell.
+	eval "${name}_cleanup() { \
+		for s in \${RUMP_SOCKET} clientsock; do \
+			RUMP_SERVER=unix://\${s} rump.halt 2>/dev/null || true; \
+		done; \
+	}"
+	tests="${tests} ${name}"
+}
+
 for e in le be; do
   for v in 1; do
 for q in "user" "group" "both"; do
-	test_case_root get_nfs_${e}_${v}_${q} get_nfs_quota \
+	test_case_rquotad get_nfs_${e}_${v}_${q} get_nfs_quota \
 		"get NFS quota with ${q} enabled" ${e} ${v} ${q}
 done
   done



CVS commit: src/tests/fs/ffs

2020-08-20 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Aug 20 07:23:20 UTC 2020

Modified Files:
src/tests/fs/ffs: ffs_common.sh

Log Message:
Remove non-functional cleanup code from test_case() and test_case_root().
It had no effect because RUMP_SOCKETS_LIST is not set in the shell
running the cleanup phase.  Even if RUMP_SOCKETS_LIST had been set,
the code would still not have worked correctly because it ran
rump.halt via "atf_check -s exit:1", which would cause the first
successful halting of a rump processes to be treated as a failure
and abort the cleanup without halting any other rump processes still
running.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/ffs/ffs_common.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/ffs/ffs_common.sh
diff -u src/tests/fs/ffs/ffs_common.sh:1.4 src/tests/fs/ffs/ffs_common.sh:1.5
--- src/tests/fs/ffs/ffs_common.sh:1.4	Mon Aug 17 06:18:39 2020
+++ src/tests/fs/ffs/ffs_common.sh	Thu Aug 20 07:23:20 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ffs_common.sh,v 1.4 2020/08/17 06:18:39 gson Exp $ 
+# $NetBSD: ffs_common.sh,v 1.5 2020/08/20 07:23:20 gson Exp $ 
 
 create_ffs()
 {
@@ -30,7 +30,7 @@ test_case()
 	local check_function="${1}"; shift
 	local descr="${1}"; shift
 	
-	atf_test_case "${name}" cleanup
+	atf_test_case "${name}"
 
 	eval "${name}_head() { \
 		atf_set "descr" "${descr}"
@@ -41,12 +41,6 @@ test_case()
 		export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
 		${check_function} " "${@}" "; \
 	}"
-	eval "${name}_cleanup() { \
-		for s in \${RUMP_SOCKETS_LIST}; do \
-			export RUMP_SERVER=unix://\${s}; \
-			atf_check -s exit:1 -o ignore -e ignore rump.halt; \
-		done; \
-	}"
 	tests="${tests} ${name}"
 }
 
@@ -56,7 +50,7 @@ test_case_root()
 	local check_function="${1}"; shift
 	local descr="${1}"; shift
 	
-	atf_test_case "${name}" cleanup
+	atf_test_case "${name}"
 
 	eval "${name}_head() { \
 		atf_set "descr" "${descr}"
@@ -68,12 +62,6 @@ test_case_root()
 		export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
 		${check_function} " "${@}" "; \
 	}"
-	eval "${name}_cleanup() { \
-		for s in \${RUMP_SOCKETS_LIST}; do \
-			export RUMP_SERVER=unix://\${s}; \
-			atf_check -s exit:1 -o ignore -e ignore rump.halt; \
-		done; \
-	}"
 	tests="${tests} ${name}"
 }
 



CVS commit: src/tests/fs/ffs

2020-08-16 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Aug 17 06:18:39 UTC 2020

Modified Files:
src/tests/fs/ffs: ffs_common.sh

Log Message:
Remove unused function rump_shutdown()


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/ffs/ffs_common.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/ffs/ffs_common.sh
diff -u src/tests/fs/ffs/ffs_common.sh:1.3 src/tests/fs/ffs/ffs_common.sh:1.4
--- src/tests/fs/ffs/ffs_common.sh:1.3	Sat Oct  8 13:23:53 2016
+++ src/tests/fs/ffs/ffs_common.sh	Mon Aug 17 06:18:39 2020
@@ -1,4 +1,4 @@
-# $NetBSD: ffs_common.sh,v 1.3 2016/10/08 13:23:53 gson Exp $ 
+# $NetBSD: ffs_common.sh,v 1.4 2020/08/17 06:18:39 gson Exp $ 
 
 create_ffs()
 {
@@ -23,17 +23,6 @@ create_ffs_server()
 		${sarg} ${IMG} ${RUMP_SERVER}
 }
 
-rump_shutdown()
-{
-	for s in ${RUMP_SOCKETS_LIST}; do
-		atf_check -s exit:0 env RUMP_SERVER=unix://${s} rump.halt;
-	done
-# check that the quota inode creation didn't corrupt the filesystem
-	atf_check -s exit:0 -o "match:already clean" \
-		-o "match:Phase 6 - Check Quotas" \
-		fsck_ffs -nf -F ${IMG}
-}
-
 # from tests/ipf/h_common.sh via tests/sbin/resize_ffs
 test_case()
 {



CVS commit: src/tests/sbin/ifconfig

2020-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jul 27 16:57:45 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Skip the repeated_link_addr test by default as it causes the
evbarm-aarch64 testbed to hang (PR port-evbarm/55521), and will not be
safe to run by default even after that bug is fixed, for similar
reasons as t_repeated_updown.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/sbin/ifconfig/t_repeated_link_addr.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/sbin/ifconfig/t_repeated_link_addr.sh
diff -u src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.3 src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.4
--- src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.3	Mon Jul  6 10:35:00 2020
+++ src/tests/sbin/ifconfig/t_repeated_link_addr.sh	Mon Jul 27 16:57:44 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_link_addr.sh,v 1.3 2020/07/06 10:35:00 jruoho Exp $
+# $NetBSD: t_repeated_link_addr.sh,v 1.4 2020/07/27 16:57:44 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,6 +37,11 @@ repeated_link_addr_head() {
 
 repeated_link_addr_body() {
 
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]
+	then
+		atf_skip "can disrupt networking; also PR port-evbarm/55521"
+	fi
+
 	fail=0
 	addrs="00:11:00:00:00:00 \
 	   00:11:11:00:00:00 \



CVS commit: src/tests/sbin/ifconfig

2020-07-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jul 27 06:52:48 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_updown.sh

Log Message:
Instead of just skipping interfaces that are "up", skip the whole
repeated_updown test case unless explicitly enabled with "atf-run -v
run_unsafe=yes".  Gratuitously configuring interfaces "up" is no more
safe than gratuitously configuring them "down"; for example, it could
lead to accidentally connecting to an insecure network or diverting
traffic from the desired route.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/ifconfig/t_repeated_updown.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/sbin/ifconfig/t_repeated_updown.sh
diff -u src/tests/sbin/ifconfig/t_repeated_updown.sh:1.4 src/tests/sbin/ifconfig/t_repeated_updown.sh:1.5
--- src/tests/sbin/ifconfig/t_repeated_updown.sh:1.4	Wed Jul 22 05:47:24 2020
+++ src/tests/sbin/ifconfig/t_repeated_updown.sh	Mon Jul 27 06:52:48 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_updown.sh,v 1.4 2020/07/22 05:47:24 martin Exp $
+# $NetBSD: t_repeated_updown.sh,v 1.5 2020/07/27 06:52:48 gson Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,18 +36,25 @@ repeated_updown_head() {
 
 repeated_updown_body() {
 
+	if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]
+	then
+		atf_skip "can disrupt networking; also PR port-evbarm/55504"
+	fi
+
 	# Try to avoid stalling any automated test runs.
 	#
 	n=35
 
 	for i in $(ifconfig -l); do
 
-		# skip all interfaces that are already marked UP
-		ifconfig $i | fgrep -q UP >/dev/null && continue
+		state="up"
+		ifconfig -s $i
 
-		state="down"
-		ifconfig $i up
-		echo "Initialized $i up"
+		if [ $? -eq 1 ]; then
+			state="down"
+			ifconfig $i up
+			echo "Initialized $i up"
+		fi
 
 		while [ $n -gt 0 ]; do
 			ifconfig $i down



CVS commit: src/sys/dev/usb

2020-06-06 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun  6 13:53:43 UTC 2020

Modified Files:
src/sys/dev/usb: if_run.c if_runvar.h

Log Message:
Conditionally enable the formerly #if'ed-out code to use the
WRITE_REGION_1 command for writing blocks of data to the device.
This is to address a performance issue where "ifconfig run0 up" would
take as long as 20-30 seconds when using a UHCI or OHCI host
controller due to the large number of control transfers performed by
the driver in combination with the inability of those host controllers
to perform multiple control transfers per USB frame.  Limit the
transfers to 64 bytes as in the corresponding #if'ed-out code in
FreeBSD.  Currently only enabled for mac_ver 0x5390 as it is the only
version tested so far.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/usb/if_run.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/if_runvar.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/dev/usb/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.39 src/sys/dev/usb/if_run.c:1.40
--- src/sys/dev/usb/if_run.c:1.39	Sun Mar 15 23:04:51 2020
+++ src/sys/dev/usb/if_run.c	Sat Jun  6 13:53:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.39 2020/03/15 23:04:51 thorpej Exp $	*/
+/*	$NetBSD: if_run.c,v 1.40 2020/06/06 13:53:43 gson Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.39 2020/03/15 23:04:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.40 2020/06/06 13:53:43 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -649,6 +649,19 @@ run_attach(device_t parent, device_t sel
 	sc->mac_ver = ver >> 16;
 	sc->mac_rev = ver & 0x;
 
+   /*
+	* Per the comment in run_write_region_1(), "the WRITE_REGION_1
+	* command is not stable on RT2860", but WRITE_REGION_1 calls
+	* of up to 64 bytes have been tested and found to work with
+	* mac_ver 0x5390, and they reduce the run time of "ifconfig
+	* run0 up" from 30 seconds to a couple of seconds on OHCI.
+	* Enable WRITE_REGION_1 for the tested version only.  As other
+	* versions are tested and found to work, they can be added
+	* here.
+	*/
+	if (sc->mac_ver == 0x5390)
+		sc->sc_flags |= RUN_USE_BLOCK_WRITE;
+
 	/* retrieve RF rev. no and various other things from EEPROM */
 	run_read_eeprom(sc);
 
@@ -1046,37 +1059,49 @@ run_write_2(struct run_softc *sc, uint16
 static int
 run_write(struct run_softc *sc, uint16_t reg, uint32_t val)
 {
-	int error;
-
-	if ((error = run_write_2(sc, reg, val & 0x)) == 0)
-		error = run_write_2(sc, reg + 2, val >> 16);
-	return error;
+	uint32_t tmp = htole32(val);
+	return run_write_region_1(sc, reg, (uint8_t *)&tmp, sizeof(tmp));
 }
 
 static int
 run_write_region_1(struct run_softc *sc, uint16_t reg, const uint8_t *buf,
 int len)
 {
-#if 1
-	int i, error = 0;
-	/*
-	 * NB: the WRITE_REGION_1 command is not stable on RT2860.
-	 * We thus issue multiple WRITE_2 commands instead.
-	 */
-	KASSERT((len & 1) == 0);
-	for (i = 0; i < len && error == 0; i += 2)
-		error = run_write_2(sc, reg + i, buf[i] | buf[i + 1] << 8);
+	int error = 0;
+	if (sc->sc_flags & RUN_USE_BLOCK_WRITE) {
+		usb_device_request_t req;
+		/*
+		 * NOTE: It appears the WRITE_REGION_1 command cannot be
+		 * passed a huge amount of data, which will crash the
+		 * firmware. Limit amount of data passed to 64 bytes at a
+		 * time.
+		 */
+		while (len > 0) {
+			int delta = MIN(len, 64);
+			req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
+			req.bRequest = RT2870_WRITE_REGION_1;
+			USETW(req.wValue, 0);
+			USETW(req.wIndex, reg);
+			USETW(req.wLength, delta);
+			error = usbd_do_request(sc->sc_udev, &req,
+			__UNCONST(buf));
+			if (error != 0)
+break;
+			reg += delta;
+			buf += delta;
+			len -= delta;
+		}
+	} else {
+		/*
+		 * NB: the WRITE_REGION_1 command is not stable on RT2860.
+		 * We thus issue multiple WRITE_2 commands instead.
+		 */
+		int i;
+		KASSERT((len & 1) == 0);
+		for (i = 0; i < len && error == 0; i += 2)
+			error = run_write_2(sc, reg + i, buf[i] | buf[i + 1] << 8);
+	}
 	return error;
-#else
-	usb_device_request_t req;
-
-	req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
-	req.bRequest = RT2870_WRITE_REGION_1;
-	USETW(req.wValue, 0);
-	USETW(req.wIndex, reg);
-	USETW(req.wLength, len);
-	return usbd_do_request(sc->sc_udev, &req, __UNCONST(buf));
-#endif
 }
 
 static int
@@ -1084,8 +1109,25 @@ run_set_region_4(struct run_softc *sc, u
 {
 	int error = 0;
 
-	for (; count > 0 && error == 0; count--, reg += 4)
-		error = run_write(sc, reg, val);
+	if (sc->sc_flags & RUN_USE_BLOCK_WRITE) {
+		while (count > 0) {
+			int i, delta;
+			uint32_t tmp[16];
+
+			delta = MIN(count, __arraycount(tmp));
+			for (i = 0; i < delta; i++)
+tmp[i] = htole32(val);
+			error = run_write_region_1(sc, reg, (uint8_t *)tmp,
+			delta * sizeof(uint32_t));

CVS commit: src/sbin/mount_qemufwcfg

2020-04-29 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Apr 29 09:54:43 UTC 2020

Modified Files:
src/sbin/mount_qemufwcfg: mount_qemufwcfg.8

Log Message:
Remove references to "special", as mount_qemufwcfg(8) does not
actually take such an argument.  Discussed with jmcneill.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sbin/mount_qemufwcfg/mount_qemufwcfg.8

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

Modified files:

Index: src/sbin/mount_qemufwcfg/mount_qemufwcfg.8
diff -u src/sbin/mount_qemufwcfg/mount_qemufwcfg.8:1.2 src/sbin/mount_qemufwcfg/mount_qemufwcfg.8:1.3
--- src/sbin/mount_qemufwcfg/mount_qemufwcfg.8:1.2	Tue Nov 28 11:55:30 2017
+++ src/sbin/mount_qemufwcfg/mount_qemufwcfg.8	Wed Apr 29 09:54:43 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_qemufwcfg.8,v 1.2 2017/11/28 11:55:30 wiz Exp $
+.\"	$NetBSD: mount_qemufwcfg.8,v 1.3 2020/04/29 09:54:43 gson Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 28, 2017
+.Dd April 29, 2020
 .Dt MOUNT_QEMUFWCFG 8
 .Os
 .Sh NAME
@@ -38,18 +38,16 @@
 .Op Fl m Ar file-mode
 .Op Fl u Ar uid
 .Op Ar fuse-options
-.Ar special node
+.Ar node
 .Sh DESCRIPTION
 The
 .Nm
 command provides the QEMU fw_cfg configuration files in a file system
 tree at point
 .Ar node .
-Both
-.Ar special
-and
+The directory specified by
 .Ar node
-are converted to absolute paths before use.
+is converted to an absolute path before use.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds



CVS commit: src/tests/crypto/libcrypto

2020-04-11 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Apr 11 16:55:33 UTC 2020

Modified Files:
src/tests/crypto/libcrypto: t_libcrypto.sh

Log Message:
Double the timeout for the bn test case; 360 seconds is no longer
sufficient under qemu since the latest openssl update.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/crypto/libcrypto/t_libcrypto.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/crypto/libcrypto/t_libcrypto.sh
diff -u src/tests/crypto/libcrypto/t_libcrypto.sh:1.6 src/tests/crypto/libcrypto/t_libcrypto.sh:1.7
--- src/tests/crypto/libcrypto/t_libcrypto.sh:1.6	Mon Sep 24 16:25:24 2018
+++ src/tests/crypto/libcrypto/t_libcrypto.sh	Sat Apr 11 16:55:33 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_libcrypto.sh,v 1.6 2018/09/24 16:25:24 christos Exp $
+# $NetBSD: t_libcrypto.sh,v 1.7 2020/04/11 16:55:33 gson Exp $
 #
 # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,7 +39,7 @@ atf_test_case bn
 bn_head()
 {
 	atf_set "descr" "Checks BIGNUM library"
-	atf_set "timeout" "360"
+	atf_set "timeout" "720"
 }
 bn_body()
 {



CVS commit: src/share/man/man4

2020-04-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Apr  1 15:42:15 UTC 2020

Modified Files:
src/share/man/man4: qemufwcfg.4

Log Message:
Fix incorrect device path.  OK jmcneill.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/qemufwcfg.4

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

Modified files:

Index: src/share/man/man4/qemufwcfg.4
diff -u src/share/man/man4/qemufwcfg.4:1.5 src/share/man/man4/qemufwcfg.4:1.6
--- src/share/man/man4/qemufwcfg.4:1.5	Wed Jul 11 13:49:06 2018
+++ src/share/man/man4/qemufwcfg.4	Wed Apr  1 15:42:15 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: qemufwcfg.4,v 1.5 2018/07/11 13:49:06 jmcneill Exp $
+.\"	$NetBSD: qemufwcfg.4,v 1.6 2020/04/01 15:42:15 gson Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 11, 2018
+.Dd April 1, 2020
 .Dt QEMUFWCFG 4
 .Os
 .Sh NAME
@@ -46,7 +46,7 @@ option in the
 man page.
 .Sh FILES
 .Bl -tag -width 20n
-.It Pa /dev/qemufwctl
+.It Pa /dev/qemufwcfg
 device path
 .El
 .Sh SEE ALSO



CVS commit: src/share/man/man8

2020-04-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Apr  1 15:33:50 UTC 2020

Modified Files:
src/share/man/man8: MAKEDEV.8

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/share/man/man8/MAKEDEV.8

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

Modified files:

Index: src/share/man/man8/MAKEDEV.8
diff -u src/share/man/man8/MAKEDEV.8:1.56 src/share/man/man8/MAKEDEV.8:1.57
--- src/share/man/man8/MAKEDEV.8:1.56	Wed Jan 29 18:39:05 2020
+++ src/share/man/man8/MAKEDEV.8	Wed Apr  1 15:33:50 2020
@@ -6,7 +6,7 @@
 .\" *** DO NOT EDIT - any changes will be lost!!!
 .\" *** --
 .\"
-.\" $NetBSD: MAKEDEV.8,v 1.56 2020/01/29 18:39:05 maya Exp $
+.\" $NetBSD: MAKEDEV.8,v 1.57 2020/04/01 15:33:50 gson Exp $
 .\"
 .\" Copyright (c) 2001, 2003, 2007, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -35,7 +35,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 29, 2020
+.Dd April  1, 2020
 .Dt MAKEDEV 8
 .Os
 .Sh NAME
@@ -803,6 +803,9 @@ Pass-to-Userspace Transporter
 . It Ar px#
 PixelStamp Xserver access, see
 .Xr \&px 4
+. It Ar qemufwcfg#
+QEMU Firmware Configuration, see
+.Xr \&qemufwcfg 4
 . It Ar radio#
 Radio devices, see
 .Xr \&radio 4



CVS commit: src/etc

2020-04-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Apr  1 15:32:21 UTC 2020

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Create the qemufwcfg device as part of "all".  Discussed with jmcneill.
Also, include it in the list of special purpose devices.


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.216 src/etc/MAKEDEV.tmpl:1.217
--- src/etc/MAKEDEV.tmpl:1.216	Mon Mar  2 15:49:30 2020
+++ src/etc/MAKEDEV.tmpl	Wed Apr  1 15:32:21 2020
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.216 2020/03/02 15:49:30 riastradh Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.217 2020/04/01 15:32:21 gson Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -265,6 +265,7 @@
 #	pf	PF packet filter
 #	putter	Pass-to-Userspace Transporter
 #	px*	PixelStamp Xserver access
+#	qemufwcfg* QEMU Firmware Configuration
 #	radio*	radio devices
 #	random	Random number generator
 #	rtc*	RealTimeClock
@@ -845,6 +846,7 @@ all)
 	makedev autofs
 	makedev fw0 fw1 fw2 fw3
 	makedev ipmi0
+	makedev qemufwcfg
 	makedev local # do this last
 	;;
 



CVS commit: src/sys/dev/usb

2019-12-19 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Dec 19 15:17:30 UTC 2019

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

Log Message:
Code that's #if'ed out still ought to compile.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/if_run.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/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.33 src/sys/dev/usb/if_run.c:1.34
--- src/sys/dev/usb/if_run.c:1.33	Tue Oct  8 07:30:58 2019
+++ src/sys/dev/usb/if_run.c	Thu Dec 19 15:17:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.33 2019/10/08 07:30:58 mlelstv Exp $	*/
+/*	$NetBSD: if_run.c,v 1.34 2019/12/19 15:17:30 gson Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.33 2019/10/08 07:30:58 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.34 2019/12/19 15:17:30 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1070,7 +1070,7 @@ run_write_region_1(struct run_softc *sc,
 	USETW(req.wValue, 0);
 	USETW(req.wIndex, reg);
 	USETW(req.wLength, len);
-	return usbd_do_request(sc->sc_udev, &req, buf);
+	return usbd_do_request(sc->sc_udev, &req, __UNCONST(buf));
 #endif
 }
 



CVS commit: src/tests/crypto/libcrypto

2019-03-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Mar 27 21:14:54 UTC 2019

Modified Files:
src/tests/crypto/libcrypto: t_ciphers.sh

Log Message:
Timeout for evp test case is still not enough for qemu/sparc


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/crypto/libcrypto/t_ciphers.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/crypto/libcrypto/t_ciphers.sh
diff -u src/tests/crypto/libcrypto/t_ciphers.sh:1.7 src/tests/crypto/libcrypto/t_ciphers.sh:1.8
--- src/tests/crypto/libcrypto/t_ciphers.sh:1.7	Sat Sep 29 10:50:33 2018
+++ src/tests/crypto/libcrypto/t_ciphers.sh	Wed Mar 27 21:14:54 2019
@@ -1,4 +1,4 @@
-# $NetBSD: t_ciphers.sh,v 1.7 2018/09/29 10:50:33 gson Exp $
+# $NetBSD: t_ciphers.sh,v 1.8 2019/03/27 21:14:54 gson Exp $
 #
 # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -60,7 +60,7 @@ atf_test_case evp
 evp_head()
 {
 	atf_set "descr" "Checks EVP cipher"
-	atf_set "timeout" "600"
+	atf_set "timeout" "1200"
 }
 evp_body()
 {



CVS commit: src/share/man/man4

2019-03-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Mar 24 13:31:31 UTC 2019

Modified Files:
src/share/man/man4: zyd.4

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/zyd.4

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

Modified files:

Index: src/share/man/man4/zyd.4
diff -u src/share/man/man4/zyd.4:1.6 src/share/man/man4/zyd.4:1.7
--- src/share/man/man4/zyd.4:1.6	Sun Mar 24 11:22:06 2019
+++ src/share/man/man4/zyd.4	Sun Mar 24 13:31:31 2019
@@ -1,5 +1,5 @@
 .\" $OpenBSD: zyd.4,v 1.22 2007/05/24 02:49:57 cnst Exp $
-.\" $NetBSD: zyd.4,v 1.6 2019/03/24 11:22:06 gson Exp $
+.\" $NetBSD: zyd.4,v 1.7 2019/03/24 13:31:31 gson Exp $
 .\"
 .\" Copyright (c) 1997, 1998, 1999
 .\" Bill Paul . All rights reserved.
@@ -31,7 +31,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 28, 2007
+.Dd March 24, 2019
 .Dt ZYD 4
 .Os
 .Sh NAME



CVS commit: src/share/man/man4

2019-03-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Mar 24 11:22:06 UTC 2019

Modified Files:
src/share/man/man4: zyd.4

Log Message:
Delete the sentence "Wired Equivalent Privacy (WEP) is the de facto
encryption standard for wireless networks", because it no longer is.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/zyd.4

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

Modified files:

Index: src/share/man/man4/zyd.4
diff -u src/share/man/man4/zyd.4:1.5 src/share/man/man4/zyd.4:1.6
--- src/share/man/man4/zyd.4:1.5	Mon Jul  3 21:30:58 2017
+++ src/share/man/man4/zyd.4	Sun Mar 24 11:22:06 2019
@@ -1,5 +1,5 @@
 .\" $OpenBSD: zyd.4,v 1.22 2007/05/24 02:49:57 cnst Exp $
-.\" $NetBSD: zyd.4,v 1.5 2017/07/03 21:30:58 wiz Exp $
+.\" $NetBSD: zyd.4,v 1.6 2019/03/24 11:22:06 gson Exp $
 .\"
 .\" Copyright (c) 1997, 1998, 1999
 .\" Bill Paul . All rights reserved.
@@ -65,8 +65,6 @@ or to scan for access points.
 .Pp
 .Nm
 supports software WEP.
-Wired Equivalent Privacy (WEP) is the de facto encryption standard
-for wireless networks.
 It can be typically configured in one of three modes:
 no encryption; 40-bit encryption; or 104-bit encryption.
 Unfortunately, due to serious weaknesses in WEP protocol



CVS commit: src/share/man/man4

2019-03-23 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Mar 23 18:56:50 UTC 2019

Modified Files:
src/share/man/man4: cdce.4

Log Message:
The USB port of the Huawei E5573s-320s portable 4G router successfully
attaches as cdce(4) and works.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/cdce.4

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

Modified files:

Index: src/share/man/man4/cdce.4
diff -u src/share/man/man4/cdce.4:1.13 src/share/man/man4/cdce.4:1.14
--- src/share/man/man4/cdce.4:1.13	Mon Dec 19 15:03:59 2016
+++ src/share/man/man4/cdce.4	Sat Mar 23 18:56:50 2019
@@ -25,7 +25,7 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $NetBSD: cdce.4,v 1.13 2016/12/19 15:03:59 ryoon Exp $
+.\" $NetBSD: cdce.4,v 1.14 2019/03/23 18:56:50 gson Exp $
 .\"
 .Dd December 19, 2016
 .Dt CDCE 4
@@ -53,6 +53,8 @@ DIEWU USB-DW8152
 .It
 G.Mate YP3X00
 .It
+Huawei E5573s-320s
+.It
 Motorola USBNET
 .It
 NetChip EthernetGadget



CVS commit: src/sys/arch/x86/x86

2019-03-12 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Mar 12 08:29:52 UTC 2019

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Add missing space in "wiring for pmap .. did not change" message


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/sys/arch/x86/x86/pmap.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/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.330 src/sys/arch/x86/x86/pmap.c:1.331
--- src/sys/arch/x86/x86/pmap.c:1.330	Sun Mar 10 16:30:01 2019
+++ src/sys/arch/x86/x86/pmap.c	Tue Mar 12 08:29:52 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.330 2019/03/10 16:30:01 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.331 2019/03/12 08:29:52 gson Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.330 2019/03/10 16:30:01 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.331 2019/03/12 08:29:52 gson Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -4117,7 +4117,7 @@ pmap_unwire(struct pmap *pmap, vaddr_t v
 		pmap_stats_update_bypte(pmap, npte, opte);
 	} else {
 		printf("%s: wiring for pmap %p va %#" PRIxVADDR
-		"did not change!\n", __func__, pmap, va);
+		" did not change!\n", __func__, pmap, va);
 	}
 
 	/* Release pmap. */



CVS commit: src/usr.bin/tip

2019-02-28 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Feb 28 17:41:27 UTC 2019

Modified Files:
src/usr.bin/tip: tip.c

Log Message:
Make xgetchar() return an int like getchar() does, and remove needless cast.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/usr.bin/tip/tip.c

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/tip/tip.c
diff -u src/usr.bin/tip/tip.c:1.61 src/usr.bin/tip/tip.c:1.62
--- src/usr.bin/tip/tip.c:1.61	Fri Feb 22 22:25:22 2019
+++ src/usr.bin/tip/tip.c	Thu Feb 28 17:41:27 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tip.c,v 1.61 2019/02/22 22:25:22 uwe Exp $	*/
+/*	$NetBSD: tip.c,v 1.62 2019/02/28 17:41:27 gson Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)tip.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: tip.c,v 1.61 2019/02/22 22:25:22 uwe Exp $");
+__RCSID("$NetBSD: tip.c,v 1.62 2019/02/28 17:41:27 gson Exp $");
 #endif /* not lint */
 
 /*
@@ -332,7 +332,7 @@ intprompt(int dummy __unused)
 /*
  * getchar() wrapper that checks for EOF on the local end.
  */
-static char
+static int
 xgetchar(void)
 {
 	int c = getchar();
@@ -341,7 +341,7 @@ xgetchar(void)
 		/* NOTREACHED */
 	}
 
-	return (char)c & STRIP_PAR;
+	return c & STRIP_PAR;
 }
 
 



CVS commit: src

2019-02-12 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Feb 13 07:55:33 UTC 2019

Modified Files:
src/distrib/pmax/ramdisk: Makefile
src/sys/arch/pmax/conf: RAMDISK

Log Message:
Bump pmax install ramdisk size by another 100k, as 3500k is no longer
enough with GCC 7.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/distrib/pmax/ramdisk/Makefile
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/pmax/conf/RAMDISK

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

Modified files:

Index: src/distrib/pmax/ramdisk/Makefile
diff -u src/distrib/pmax/ramdisk/Makefile:1.48 src/distrib/pmax/ramdisk/Makefile:1.49
--- src/distrib/pmax/ramdisk/Makefile:1.48	Sun Jul 16 14:24:29 2017
+++ src/distrib/pmax/ramdisk/Makefile	Wed Feb 13 07:55:33 2019
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.48 2017/07/16 14:24:29 christos Exp $
+#	$NetBSD: Makefile,v 1.49 2019/02/13 07:55:33 gson Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
 IMAGETAR=	diskimage.tgz
-IMAGESIZE=	3500k
+IMAGESIZE=	3600k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1

Index: src/sys/arch/pmax/conf/RAMDISK
diff -u src/sys/arch/pmax/conf/RAMDISK:1.14 src/sys/arch/pmax/conf/RAMDISK:1.15
--- src/sys/arch/pmax/conf/RAMDISK:1.14	Fri Jul 14 12:27:55 2017
+++ src/sys/arch/pmax/conf/RAMDISK	Wed Feb 13 07:55:33 2019
@@ -1,4 +1,4 @@
-# 	$NetBSD: RAMDISK,v 1.14 2017/07/14 12:27:55 christos Exp $
+# 	$NetBSD: RAMDISK,v 1.15 2019/02/13 07:55:33 gson Exp $
 #
 # Install kernel with ramdisk added.
 # The ramdisk is be too big to netboot directly via ECOFF on some machines,
@@ -13,7 +13,7 @@ include	"arch/pmax/conf/INSTALL"
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# force root on memory disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=7000	# size of memory disk, in blocks (3500kB)
+options 	MEMORY_DISK_ROOT_SIZE=7200	# size of memory disk, in blocks (3500kB)
 #options 	MEMORY_DISK_ROOT_SIZE=2880	# 1.44M, same as a floppy
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 



CVS commit: src/tests/fs/common

2019-01-20 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jan 20 14:50:58 UTC 2019

Modified Files:
src/tests/fs/common: fstest_lfs.c

Log Message:
Call rump_pub_lwproc_newlwp() in the lfs cleaner thread to make its
rump system calls all use the same lwp.  Hopefully this will fix
PR kern/53884.  Also call rump_pub_lwproc_releaselwp() at the end.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/fs/common/fstest_lfs.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/common/fstest_lfs.c
diff -u src/tests/fs/common/fstest_lfs.c:1.5 src/tests/fs/common/fstest_lfs.c:1.6
--- src/tests/fs/common/fstest_lfs.c:1.5	Sun Aug 30 18:27:26 2015
+++ src/tests/fs/common/fstest_lfs.c	Sun Jan 20 14:50:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_lfs.c,v 1.5 2015/08/30 18:27:26 dholland Exp $	*/
+/*	$NetBSD: fstest_lfs.c,v 1.6 2019/01/20 14:50:58 gson Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -128,6 +128,8 @@ cleaner(void *arg)
 	const char *the_argv[7];
 	char buf[64];
 
+	rump_pub_lwproc_newlwp(rump_sys_getpid());
+
 	/* this inspired by the cleaner code.  fixme */
 	sprintf(thepath, "/dev/r%s", args->ta_devpath+5);
 	rump_pub_etfs_register(thepath, args->ta_hostpath, RUMP_ETFS_CHR);
@@ -146,6 +148,8 @@ cleaner(void *arg)
 
 	lfs_cleaner_main(5, __UNCONST(the_argv));
 
+	rump_pub_lwproc_releaselwp();
+
 	return NULL;
 }
 



CVS commit: src/tests/fs/vfs

2019-01-13 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jan 13 14:35:00 UTC 2019

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

Log Message:
Mark the fs/vfs/t_renamerace:udf_renamerace_dirs test case as an
expected failure referencing PR kern/53865, and force failure to avoid
reports of unexpected success as it does not realiably fail under
qemu.  This makes the treatment of udf_renamerace_dirs the same as
that of udf_renamerace, only with a different PR.  Also, make
whitespace consistent between the two.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 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.34 src/tests/fs/vfs/t_renamerace.c:1.35
--- src/tests/fs/vfs/t_renamerace.c:1.34	Fri Jan 13 21:30:40 2017
+++ src/tests/fs/vfs/t_renamerace.c	Sun Jan 13 14:35:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.34 2017/01/13 21:30:40 christos Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.35 2019/01/13 14:35:00 gson Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -147,9 +147,10 @@ renamerace_dirs(const atf_tc_t *tc, cons
 
 	if (FSTYPE_SYSVBFS(tc))
 		atf_tc_skip("directories not supported by file system");
-
 	if (FSTYPE_RUMPFS(tc))
 		atf_tc_skip("rename not supported by file system");
+	if (FSTYPE_UDF(tc))
+		atf_tc_expect_fail("PR kern/53865");
 
 	/* XXX: msdosfs also sometimes hangs */
 	if (FSTYPE_MSDOS(tc))
@@ -169,6 +170,9 @@ renamerace_dirs(const atf_tc_t *tc, cons
 	pthread_join(pt2, NULL);
 	RL(rump_sys_chdir("/"));
 
+	if (FSTYPE_UDF(tc))
+		atf_tc_fail("race did not trigger this time");
+
 	/*
 	 * Doesn't always trigger when run on a slow backend
 	 * (i.e. not on tmpfs/mfs).  So do the usual kludge.



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

2019-01-13 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jan 13 11:03:20 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Don't mark the traceme_vfork_crash_bus test case as an expected failure
when it is executing as part of the lib/libc/sys/t_ptrace_waitid test,
because that particular combination is not failing, at least not on amd64.
It is failing as part of other tests, so PR lib/53343 still applies.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/tests/lib/libc/sys/t_ptrace_wait.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/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.67 src/tests/lib/libc/sys/t_ptrace_wait.c:1.68
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.67	Mon Aug 13 22:59:52 2018
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Sun Jan 13 11:03:20 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.67 2018/08/13 22:59:52 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.68 2019/01/13 11:03:20 gson Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.67 2018/08/13 22:59:52 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.68 2019/01/13 11:03:20 gson Exp $");
 
 #include 
 #include 
@@ -870,7 +870,9 @@ traceme_vfork_crash(int sig)
 #endif
 
 	if (sig == SIGBUS) {
+#ifndef TWAIT_WAITID
 		atf_tc_expect_fail("lib/53343");
+#endif
 	}
 
 	DPRINTF("Before forking process PID=%d\n", getpid());



CVS commit: src/sys/arch/x86/x86

2018-12-17 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Dec 17 15:12:52 UTC 2018

Modified Files:
src/sys/arch/x86/x86: ipmi.c

Log Message:
Don't call aprint_error_dev() with a NULL dev.  Fixes PR port-amd64/53789.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x86/x86/ipmi.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/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.68 src/sys/arch/x86/x86/ipmi.c:1.69
--- src/sys/arch/x86/x86/ipmi.c:1.68	Sat Dec  1 01:56:30 2018
+++ src/sys/arch/x86/x86/ipmi.c	Mon Dec 17 15:12:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.68 2018/12/01 01:56:30 msaitoh Exp $ */
+/*	$NetBSD: ipmi.c,v 1.69 2018/12/17 15:12:52 gson Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.68 2018/12/01 01:56:30 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.69 2018/12/17 15:12:52 gson Exp $");
 
 #include 
 #include 
@@ -1937,8 +1937,7 @@ ipmi_map_regs(struct ipmi_softc *sc, str
 	if (bus_space_map(sc->sc_iot, ia->iaa_if_iobase,
 	sc->sc_if->nregs * sc->sc_if_iospacing,
 	0, &sc->sc_ioh)) {
-		aprint_error_dev(sc->sc_dev,
-		"%s: bus_space_map(..., %x, %x, 0, %p) failed\n",
+		printf("%s: bus_space_map(..., %x, %x, 0, %p) failed\n",
 		__func__, ia->iaa_if_iobase,
 		sc->sc_if->nregs * sc->sc_if_iospacing, &sc->sc_ioh);
 		return -1;



CVS commit: src/distrib/amd64/liveimage/emuimage

2018-12-16 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Dec 16 08:58:21 UTC 2018

Modified Files:
src/distrib/amd64/liveimage/emuimage: Makefile

Log Message:
Fix previous: set EMUIMAGEMB, not USBIMAGEMB.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/amd64/liveimage/emuimage/Makefile

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

Modified files:

Index: src/distrib/amd64/liveimage/emuimage/Makefile
diff -u src/distrib/amd64/liveimage/emuimage/Makefile:1.4 src/distrib/amd64/liveimage/emuimage/Makefile:1.5
--- src/distrib/amd64/liveimage/emuimage/Makefile:1.4	Sat Dec 15 18:03:17 2018
+++ src/distrib/amd64/liveimage/emuimage/Makefile	Sun Dec 16 08:58:21 2018
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.4 2018/12/15 18:03:17 gson Exp $
+#	$NetBSD: Makefile,v 1.5 2018/12/16 08:58:21 gson Exp $
 
 LIVEIMGBASE=	NetBSD-${DISTRIBVER}-amd64-live	# gives ${IMGBASE}.img
 
-USBIMAGEMB?=	1536	# 2GB USB flash memories aren't 2GiB
+EMUIMAGEMB?=	1536	# 2GB USB flash memories aren't 2GiB
 LIVEIMAGEMB=	${EMUIMAGEMB}
 
 .include "${.CURDIR}/../Makefile.liveimage"



CVS commit: src/distrib

2018-12-15 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Dec 15 18:03:18 UTC 2018

Modified Files:
src/distrib/amd64/installimage: Makefile
src/distrib/amd64/liveimage: Makefile Makefile.liveimage
src/distrib/amd64/liveimage/emuimage: Makefile
src/distrib/amd64/uefi-installimage: Makefile Makefile.bootimage
src/distrib/common/bootimage: Makefile.bootimage fstab.in
fstab.install.in
src/distrib/i386/installimage: Makefile
src/distrib/i386/liveimage: Makefile Makefile.liveimage
src/distrib/i386/liveimage/emuimage: Makefile
src/distrib/pmax/liveimage/emuimage: Makefile
src/distrib/sparc/liveimage/emuimage: Makefile
src/distrib/sparc64/liveimage/emuimage: Makefile
src/distrib/sun2/liveimage/emuimage: Makefile
src/distrib/sun3/liveimage/emuimage: Makefile
src/distrib/vax/liveimage/emuimage: Makefile
Removed Files:
src/distrib/amd64/liveimage/usbimage: Makefile
src/distrib/i386/liveimage/usbimage: Makefile

Log Message:
Use the special device name "ROOT." in /etc/fstab not just on the arm
images, but also on the bootable disk images of other ports, so that
they can be booted from differently named devices.  Merge the i386 and
amd64 -live-sd0root and -live-wd0root images into a single live image
per port, bootable both from usb media and in qemu.  Drop the -xx0root
suffixes from image names as they are no longer meaningful.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/distrib/amd64/installimage/Makefile
cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/liveimage/Makefile \
src/distrib/amd64/liveimage/Makefile.liveimage
cvs rdiff -u -r1.3 -r1.4 src/distrib/amd64/liveimage/emuimage/Makefile
cvs rdiff -u -r1.3 -r0 src/distrib/amd64/liveimage/usbimage/Makefile
cvs rdiff -u -r1.5 -r1.6 src/distrib/amd64/uefi-installimage/Makefile
cvs rdiff -u -r1.8 -r1.9 \
src/distrib/amd64/uefi-installimage/Makefile.bootimage
cvs rdiff -u -r1.19 -r1.20 src/distrib/common/bootimage/Makefile.bootimage
cvs rdiff -u -r1.2 -r1.3 src/distrib/common/bootimage/fstab.in \
src/distrib/common/bootimage/fstab.install.in
cvs rdiff -u -r1.12 -r1.13 src/distrib/i386/installimage/Makefile
cvs rdiff -u -r1.1 -r1.2 src/distrib/i386/liveimage/Makefile \
src/distrib/i386/liveimage/Makefile.liveimage
cvs rdiff -u -r1.3 -r1.4 src/distrib/i386/liveimage/emuimage/Makefile
cvs rdiff -u -r1.3 -r0 src/distrib/i386/liveimage/usbimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/pmax/liveimage/emuimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/sparc/liveimage/emuimage/Makefile
cvs rdiff -u -r1.4 -r1.5 src/distrib/sparc64/liveimage/emuimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/sun2/liveimage/emuimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/sun3/liveimage/emuimage/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/vax/liveimage/emuimage/Makefile

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

Modified files:

Index: src/distrib/amd64/installimage/Makefile
diff -u src/distrib/amd64/installimage/Makefile:1.9 src/distrib/amd64/installimage/Makefile:1.10
--- src/distrib/amd64/installimage/Makefile:1.9	Mon Sep 18 14:42:16 2017
+++ src/distrib/amd64/installimage/Makefile	Sat Dec 15 18:03:16 2018
@@ -1,10 +1,9 @@
-#	$NetBSD: Makefile,v 1.9 2017/09/18 14:42:16 joerg Exp $
+#	$NetBSD: Makefile,v 1.10 2018/12/15 18:03:16 gson Exp $
 
 .include 
 
 INSTIMGBASE=	NetBSD-${DISTRIBVER}-amd64-install	# gives ${IMGBASE}.img
 
-BOOTDISK=	sd0			# for USB flash etc.
 INSTIMAGEMB?=	1450			# for all installation binaries
 
 PRIMARY_BOOT=		bootxx_ffsv1

Index: src/distrib/amd64/liveimage/Makefile
diff -u src/distrib/amd64/liveimage/Makefile:1.1 src/distrib/amd64/liveimage/Makefile:1.2
--- src/distrib/amd64/liveimage/Makefile:1.1	Sun Jan 22 03:53:29 2012
+++ src/distrib/amd64/liveimage/Makefile	Sat Dec 15 18:03:17 2018
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2012/01/22 03:53:29 tsutsui Exp $
+# $NetBSD: Makefile,v 1.2 2018/12/15 18:03:17 gson Exp $
 
 SUBDIR=
 SUBDIR+=	emuimage
-SUBDIR+=	usbimage
 
 TARGETS+=	release live_image
 
Index: src/distrib/amd64/liveimage/Makefile.liveimage
diff -u src/distrib/amd64/liveimage/Makefile.liveimage:1.1 src/distrib/amd64/liveimage/Makefile.liveimage:1.2
--- src/distrib/amd64/liveimage/Makefile.liveimage:1.1	Sun Jan 22 03:53:29 2012
+++ src/distrib/amd64/liveimage/Makefile.liveimage	Sat Dec 15 18:03:17 2018
@@ -1,9 +1,8 @@
-#	$NetBSD: Makefile.liveimage,v 1.1 2012/01/22 03:53:29 tsutsui Exp $
+#	$NetBSD: Makefile.liveimage,v 1.2 2018/12/15 18:03:17 gson Exp $
 
 .include 
 
 KERN_SET=		kern-GENERIC
-BOOTDISK?=		wd0		# for emulators
 PRIMARY_BOOT=		bootxx_ffsv1
 SECONDARY_BOOT=		boot
 SECONDARY_BOOT_ARG=	# unnecessary

Index: src/distrib/amd64/liveimage/emuimage/Makefile
diff -u src/distrib/amd64/liveimage/emuimage/Makefile:1.3 src/distrib/amd64/liveimage/emuimage/Makefile:1.4
--- src/distrib/amd64/l

CVS commit: src/tests/crypto/libcrypto

2018-09-29 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Sep 29 10:54:35 UTC 2018

Modified Files:
src/tests/crypto/libcrypto: t_pubkey.sh

Log Message:
A timeout of 480 seconds is not enough for the t_pubkey:ec test case
on qemu/sparc.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/crypto/libcrypto/t_pubkey.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/crypto/libcrypto/t_pubkey.sh
diff -u src/tests/crypto/libcrypto/t_pubkey.sh:1.4 src/tests/crypto/libcrypto/t_pubkey.sh:1.5
--- src/tests/crypto/libcrypto/t_pubkey.sh:1.4	Thu Oct 13 09:25:37 2016
+++ src/tests/crypto/libcrypto/t_pubkey.sh	Sat Sep 29 10:54:35 2018
@@ -1,4 +1,4 @@
-# $NetBSD: t_pubkey.sh,v 1.4 2016/10/13 09:25:37 martin Exp $
+# $NetBSD: t_pubkey.sh,v 1.5 2018/09/29 10:54:35 gson Exp $
 #
 # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -60,7 +60,7 @@ atf_test_case ec
 ec_head()
 {
 	atf_set "descr" "Checks EC cipher"
-	atf_set "timeout" "480"
+	atf_set "timeout" "960"
 }
 ec_body()
 {



CVS commit: src/tests/crypto/libcrypto

2018-09-29 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Sep 29 10:50:33 UTC 2018

Modified Files:
src/tests/crypto/libcrypto: t_ciphers.sh

Log Message:
The default timeout of 300 seconds is not enough for the t_ciphers:evp
test case on qemu/sparc since the import of openssl 1.1.0i on 2018-08-18.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/crypto/libcrypto/t_ciphers.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/crypto/libcrypto/t_ciphers.sh
diff -u src/tests/crypto/libcrypto/t_ciphers.sh:1.6 src/tests/crypto/libcrypto/t_ciphers.sh:1.7
--- src/tests/crypto/libcrypto/t_ciphers.sh:1.6	Sun Sep 23 13:34:57 2018
+++ src/tests/crypto/libcrypto/t_ciphers.sh	Sat Sep 29 10:50:33 2018
@@ -1,4 +1,4 @@
-# $NetBSD: t_ciphers.sh,v 1.6 2018/09/23 13:34:57 christos Exp $
+# $NetBSD: t_ciphers.sh,v 1.7 2018/09/29 10:50:33 gson Exp $
 #
 # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -60,6 +60,7 @@ atf_test_case evp
 evp_head()
 {
 	atf_set "descr" "Checks EVP cipher"
+	atf_set "timeout" "600"
 }
 evp_body()
 {



CVS commit: src/external/bsd/mdocml/dist

2018-08-14 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug 14 13:21:52 UTC 2018

Modified Files:
src/external/bsd/mdocml/dist: configure

Log Message:
remove stray "fi" to unbreak build


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/mdocml/dist/configure

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/mdocml/dist/configure
diff -u src/external/bsd/mdocml/dist/configure:1.11 src/external/bsd/mdocml/dist/configure:1.12
--- src/external/bsd/mdocml/dist/configure:1.11	Tue Aug 14 08:53:06 2018
+++ src/external/bsd/mdocml/dist/configure	Tue Aug 14 13:21:52 2018
@@ -510,7 +510,6 @@ fi
 
 [ ${HAVE_STRSEP} -eq 0 ] && \
 	echo "extern	char	 *strsep(char **, const char *);"
-fi
 
 [ ${HAVE_STRTONUM} -eq 0 ] && \
 	echo "extern	long long strtonum(const char *, long long, long long, const char **);"



CVS commit: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm

2018-08-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Aug  9 06:29:08 UTC 2018

Modified Files:
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_core.c

Log Message:
One newline is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.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/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.12 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.13
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.12	Sun Feb  5 16:05:20 2017
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c	Thu Aug  9 06:29:08 2018
@@ -3123,7 +3123,7 @@ vchiq_pause_internal(VCHIQ_STATE_T *stat
 		break;
 	default:
 		vchiq_log_error(vchiq_core_log_level,
-			"vchiq_pause_internal in state %s\n",
+			"vchiq_pause_internal in state %s",
 			conn_state_names[state->conn_state]);
 		status = VCHIQ_ERROR;
 		VCHIQ_STATS_INC(state, error_count);



CVS commit: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm

2018-08-07 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug  7 09:01:52 UTC 2018

Modified Files:
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_arm.c
vchiq_kern_lib.c

Log Message:
One newline is enough.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.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/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.19 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.20
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c:1.19	Thu Nov 30 20:25:55 2017
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c	Tue Aug  7 09:01:52 2018
@@ -1489,7 +1489,7 @@ dump_phys_mem(void *virt_addr, uint32_t 
 	pages = kmalloc(sizeof(struct page *) * num_pages, GFP_KERNEL);
 	if (pages == NULL) {
 		vchiq_log_error(vchiq_arm_log_level,
-			"Unable to allocation memory for %d pages\n",
+			"Unable to allocation memory for %d pages",
 			num_pages);
 		return;
 	}

Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c:1.6 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c:1.7
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c:1.6	Wed Jan 28 09:41:04 2015
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c	Tue Aug  7 09:01:52 2018
@@ -84,17 +84,17 @@ VCHIQ_STATUS_T vchiq_initialise(VCHIQ_IN
 	}
 	if (i==VCHIQ_INIT_RETRIES) {
 		vchiq_log_error(vchiq_core_log_level,
-			"%s: videocore not initialized\n", __func__);
+			"%s: videocore not initialized", __func__);
 		goto failed;
 	} else if (i>0) {
 		vchiq_log_warning(vchiq_core_log_level,
-			"%s: videocore initialized after %d retries\n", __func__, i);
+			"%s: videocore initialized after %d retries", __func__, i);
 	}
 
 	instance = kzalloc(sizeof(*instance), GFP_KERNEL);
 	if (!instance) {
 		vchiq_log_error(vchiq_core_log_level,
-			"%s: error allocating vchiq instance\n", __func__);
+			"%s: error allocating vchiq instance", __func__);
 		goto failed;
 	}
 



CVS commit: src/share/man/man4

2018-07-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri Jul 27 16:12:40 UTC 2018

Modified Files:
src/share/man/man4: Makefile

Log Message:
Add missing backslash to unbreak the build


To generate a diff of this commit:
cvs rdiff -u -r1.659 -r1.660 src/share/man/man4/Makefile

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

Modified files:

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.659 src/share/man/man4/Makefile:1.660
--- src/share/man/man4/Makefile:1.659	Fri Jul 27 12:02:26 2018
+++ src/share/man/man4/Makefile	Fri Jul 27 16:12:40 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.659 2018/07/27 12:02:26 rkujawa Exp $
+#	$NetBSD: Makefile,v 1.660 2018/07/27 16:12:40 gson Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -61,7 +61,7 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 \
 	st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \
 	svwsata.4 swsensor.4 swwdog.4 sysmon.4 \
-	tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4
+	tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4 \
 	thinkpad.4 ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \
 	trm.4 tsllux.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \
 	uark.4 ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \



CVS commit: src/sys/sys

2018-06-23 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun 23 07:23:06 UTC 2018

Modified Files:
src/sys/sys: ipc.h

Log Message:
No semicolon after macro do ... while (0) wrapper.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/sys/ipc.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/sys/ipc.h
diff -u src/sys/sys/ipc.h:1.36 src/sys/sys/ipc.h:1.37
--- src/sys/sys/ipc.h:1.36	Tue May 19 12:17:53 2015
+++ src/sys/sys/ipc.h	Sat Jun 23 07:23:06 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipc.h,v 1.36 2015/05/19 12:17:53 joerg Exp $	*/
+/*	$NetBSD: ipc.h,v 1.37 2018/06/23 07:23:06 gson Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -131,7 +131,7 @@ __END_DECLS
 	(dst).cgid = (src).cgid; \
 	(dst).mode = (src).mode; \
 	(dst)._seq = (src)._seq; \
-} while (/*CONSTCOND*/ 0);
+} while (/*CONSTCOND*/ 0)
 
 /*
  * Set-up the sysctl routine for COMPAT_50



CVS commit: src/libexec/ftpd

2018-06-23 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun 23 07:21:00 UTC 2018

Modified Files:
src/libexec/ftpd: extern.h

Log Message:
No semicolon after macro do ... while (0) wrapper.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/libexec/ftpd/extern.h

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

Modified files:

Index: src/libexec/ftpd/extern.h
diff -u src/libexec/ftpd/extern.h:1.63 src/libexec/ftpd/extern.h:1.64
--- src/libexec/ftpd/extern.h:1.63	Thu Mar 21 05:53:01 2013
+++ src/libexec/ftpd/extern.h	Sat Jun 23 07:21:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.63 2013/03/21 05:53:01 lukem Exp $	*/
+/*	$NetBSD: extern.h,v 1.64 2018/06/23 07:21:00 gson Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -358,7 +358,7 @@ extern	struct tab	cmdtab[];
 
 #define	CPUTC(c, f)	do { \
 putc(c, f); total_bytes++; total_bytes_out++; \
-			} while (0);
+			} while (0)
 
 #define CURCLASSTYPE	curclass.type == CLASS_GUEST  ? "GUEST"  : \
 			curclass.type == CLASS_CHROOT ? "CHROOT" : \



CVS commit: src/tests

2018-06-19 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jun 19 09:20:47 UTC 2018

Modified Files:
src/tests/fs/common: h_fsmacros.h
src/tests/lib/libc/gen: t_dir.c
src/tests/lib/libc/sys: t_posix_fadvise.c

Log Message:
No semicolon after macro do ... while (0) wrapper.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/tests/fs/common/h_fsmacros.h
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/gen/t_dir.c
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_posix_fadvise.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/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.41 src/tests/fs/common/h_fsmacros.h:1.42
--- src/tests/fs/common/h_fsmacros.h:1.41	Fri Jan 13 21:30:39 2017
+++ src/tests/fs/common/h_fsmacros.h	Tue Jun 19 09:20:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.41 2017/01/13 21:30:39 christos Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.42 2018/06/19 09:20:46 gson Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@ do {	\
 		atf_tc_fail_errno("newfs failed");			\
 	if (_fs_##_fstest_mount(_tc_, _args_, FSTEST_MNTNAME, 0) != 0)	\
 		atf_tc_fail_errno("mount failed");			\
-} while (/*CONSTCOND*/0);
+} while (/*CONSTCOND*/0)
 
 #define FSTEST_CONSTRUCTOR_FSPRIV(_tc_, _fs_, _args_, _privargs_)	\
 do {	\
@@ -91,7 +91,7 @@ do {	\
 		atf_tc_fail_errno("newfs failed");			\
 	if (_fs_##_fstest_mount(_tc_, _args_, FSTEST_MNTNAME, 0) != 0)	\
 		atf_tc_fail_errno("mount failed");			\
-} while (/*CONSTCOND*/0);
+} while (/*CONSTCOND*/0)
 
 #define FSTEST_DESTRUCTOR(_tc_, _fs_, _args_)\
 do {	\
@@ -101,7 +101,7 @@ do {	\
 	}\
 	if (_fs_##_fstest_delfs(_tc_, _args_) != 0)			\
 		atf_tc_fail_errno("delfs failed");			\
-} while (/*CONSTCOND*/0);
+} while (/*CONSTCOND*/0)
 
 #define ATF_TC_FSADD(fs,type,func,desc)	\
 	ATF_TC(fs##_##func);		\

Index: src/tests/lib/libc/gen/t_dir.c
diff -u src/tests/lib/libc/gen/t_dir.c:1.10 src/tests/lib/libc/gen/t_dir.c:1.11
--- src/tests/lib/libc/gen/t_dir.c:1.10	Wed Jan 11 18:15:02 2017
+++ src/tests/lib/libc/gen/t_dir.c	Tue Jun 19 09:20:46 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dir.c,v 1.10 2017/01/11 18:15:02 christos Exp $ */
+/* $NetBSD: t_dir.c,v 1.11 2018/06/19 09:20:46 gson Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@ ATF_TC_BODY(seekdir_basic, tc)
 		"creat(%s, %x) failed: %s", (x), (m),		\
 		strerror(errno));	\
 		(void)close(_creat_fd);	\
-	} while(0);
+	} while (0)
 
 	ATF_REQUIRE_MSG(mkdir("t", 0755) == 0,
 	"mkdir failed: %s", strerror(errno));

Index: src/tests/lib/libc/sys/t_posix_fadvise.c
diff -u src/tests/lib/libc/sys/t_posix_fadvise.c:1.2 src/tests/lib/libc/sys/t_posix_fadvise.c:1.3
--- src/tests/lib/libc/sys/t_posix_fadvise.c:1.2	Fri Jan 13 21:30:41 2017
+++ src/tests/lib/libc/sys/t_posix_fadvise.c	Tue Jun 19 09:20:46 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: t_posix_fadvise.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */
+/* $NetBSD: t_posix_fadvise.c,v 1.3 2018/06/19 09:20:46 gson Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2008\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_posix_fadvise.c,v 1.2 2017/01/13 21:30:41 christos Exp $");
+__RCSID("$NetBSD: t_posix_fadvise.c,v 1.3 2018/06/19 09:20:46 gson Exp $");
 
 #include 
 
@@ -112,7 +112,7 @@ ATF_TC_BODY(posix_fadvise, tc)
 		ATF_CHECK_EQ_MSG(ret = (x), exp, "got: %d", ret); \
 		ATF_CHECK_EQ_MSG(errno, 999, "got: %s", strerror(errno)); \
 		errno = save; \
-	} while (0);
+	} while (0)
 
 	CE(posix_fadvise(fd, 0, 0, -1), EINVAL);
 	CE(posix_fadvise(pipe_fds[0], 0, 0, POSIX_FADV_NORMAL), ESPIPE);



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

2018-06-16 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun 16 15:18:33 UTC 2018

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

Log Message:
Use space between words


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.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_ioctl.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.11 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.12
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.11	Mon May 28 21:05:07 2018
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c	Sat Jun 16 15:18:33 2018
@@ -7133,7 +7133,7 @@ zfs_modcmd(modcmd_t cmd, void *arg)
 		printf("WARNING: ZFS on NetBSD is under development\n");
 		availrmem = (uint64_t)physmem * PAGE_SIZE / 1048576;
 		if (availrmem < ZFS_MIN_MEGS * 80 / 100) {
-			printf("ERROR: at least %dMB of memory required to"
+			printf("ERROR: at least %dMB of memory required to "
 			"use ZFS\n", ZFS_MIN_MEGS);
 			return ENOMEM;
 		}



CVS commit: src/share/man/man9

2018-06-03 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jun  3 12:54:51 UTC 2018

Modified Files:
src/share/man/man9: Makefile

Log Message:
Remove stray space to unbreak build


To generate a diff of this commit:
cvs rdiff -u -r1.426 -r1.427 src/share/man/man9/Makefile

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

Modified files:

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.426 src/share/man/man9/Makefile:1.427
--- src/share/man/man9/Makefile:1.426	Sun Jun  3 10:34:59 2018
+++ src/share/man/man9/Makefile	Sun Jun  3 12:54:51 2018
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.426 2018/06/03 10:34:59 pgoyette Exp $
+#   $NetBSD: Makefile,v 1.427 2018/06/03 12:54:51 gson Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -887,7 +887,7 @@ MLINKS+=specificdata.9 specificdata_doma
 	specificdata.9 specificdata_getspecific.9 \
 	specificdata.9 specificdata_getspecific_unlocked.9 \
 	specificdata.9 specificdata_setspecific.9 \
-	specificdata.9 specificdata_setspecific_nowait .9
+	specificdata.9 specificdata_setspecific_nowait.9
 MLINKS+=spl.9 spl0.9 spl.9 splbio.9 spl.9 splclock.9 spl.9 splhigh.9 \
 	spl.9 splimp.9 \
 	spl.9 spllowersoftclock.9 spl.9 splnet.9 \



CVS commit: src/tests/net/net

2017-12-30 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Dec 30 22:02:34 UTC 2017

Modified Files:
src/tests/net/net: t_pktinfo_send.c

Log Message:
Use the default ATF timeout instead of a reduced one of 5 seconds,
which isn't enough for pmax under gxemul on babylon5.netbsd.org.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/net/net/t_pktinfo_send.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/net/net/t_pktinfo_send.c
diff -u src/tests/net/net/t_pktinfo_send.c:1.2 src/tests/net/net/t_pktinfo_send.c:1.3
--- src/tests/net/net/t_pktinfo_send.c:1.2	Mon Dec 11 05:47:18 2017
+++ src/tests/net/net/t_pktinfo_send.c	Sat Dec 30 22:02:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_pktinfo_send.c,v 1.2 2017/12/11 05:47:18 ryo Exp $	*/
+/*	$NetBSD: t_pktinfo_send.c,v 1.3 2017/12/30 22:02:34 gson Exp $	*/
 
 /*-
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_pktinfo_send.c,v 1.2 2017/12/11 05:47:18 ryo Exp $");
+__RCSID("$NetBSD: t_pktinfo_send.c,v 1.3 2017/12/30 22:02:34 gson Exp $");
 
 #include 
 #include 
@@ -223,7 +223,6 @@ ATF_TC(pktinfo_send_unbound);
 ATF_TC_HEAD(pktinfo_send_unbound, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "sendmsg with IP_PKTINFO");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_unbound, tc)
 {
@@ -247,7 +246,6 @@ ATF_TC_HEAD(pktinfo_send_bindany, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO on bind(INADDR_ANY) socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_bindany, tc)
 {
@@ -272,7 +270,6 @@ ATF_TC_HEAD(pktinfo_send_bindaddr, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO on bind(addr:0) socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_bindaddr, tc)
 {
@@ -297,7 +294,6 @@ ATF_TC_HEAD(pktinfo_send_bindport, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO on bind(INADDR_ANY:12345) socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_bindport, tc)
 {
@@ -322,7 +318,6 @@ ATF_TC_HEAD(pktinfo_send_bindaddrport, t
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO on bind(addr:12345) socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_bindaddrport, tc)
 {
@@ -347,7 +342,6 @@ ATF_TC_HEAD(pktinfo_send_bindother, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO from address bound by other socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_bindother, tc)
 {
@@ -374,7 +368,6 @@ ATF_TC_HEAD(pktinfo_send_connected, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO on connected socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_connected, tc)
 {
@@ -412,7 +405,6 @@ ATF_TC_HEAD(pktinfo_send_notown, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO from no-own address");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_notown, tc)
 {
@@ -445,7 +437,6 @@ ATF_TC_HEAD(pktinfo_send_notown_bind, tc
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO from no-own address on bind socket");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_notown_bind, tc)
 {
@@ -493,7 +484,6 @@ ATF_TC_HEAD(pktinfo_send_rawip, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg raw-ip with IP_PKTINFO");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_rawip, tc)
 {
@@ -526,7 +516,6 @@ ATF_TC_HEAD(pktinfo_send_rawip_notown, t
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg raw-ip with IP_PKTINFO from no-own address");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_rawip_notown, tc)
 {
@@ -564,7 +553,6 @@ ATF_TC_HEAD(pktinfo_send_invalidarg, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg IP_PKTINFO with invalid argument");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_invalidarg, tc)
 {
@@ -603,7 +591,6 @@ ATF_TC_HEAD(pktinfo_send_ifindex, tc)
 {
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO to specified interface");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_ifindex, tc)
 {
@@ -700,7 +687,6 @@ ATF_TC_HEAD(pktinfo_send_multicast, tc)
 	atf_tc_set_md_var(tc, "descr",
 	"sendmsg with IP_PKTINFO to multicast address"
 	" and specified interface");
-	atf_tc_set_md_var(tc, "timeout", "5");
 }
 ATF_TC_BODY(pktinfo_send_multicast, tc)
 {



CVS commit: src/sys/arch/i386/i386

2017-09-12 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Sep 12 14:10:49 UTC 2017

Modified Files:
src/sys/arch/i386/i386: trap.c

Log Message:
Don't use a const variable as an array size, because it is not a
constant expression and will cause the array to needlessly become a
variable-size one.  Fixes "error: stack protector not protecting local
variables: variable length buffer [-Werror=stack-protector]" when
building i386 with MKDEBUG=YES -V COPTS="-g".


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/sys/arch/i386/i386/trap.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/arch/i386/i386/trap.c
diff -u src/sys/arch/i386/i386/trap.c:1.289 src/sys/arch/i386/i386/trap.c:1.290
--- src/sys/arch/i386/i386/trap.c:1.289	Sat Aug 12 07:07:53 2017
+++ src/sys/arch/i386/i386/trap.c	Tue Sep 12 14:10:49 2017
@@ -1,5 +1,5 @@
 
-/*	$NetBSD: trap.c,v 1.289 2017/08/12 07:07:53 maxv Exp $	*/
+/*	$NetBSD: trap.c,v 1.290 2017/09/12 14:10:49 gson Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.289 2017/08/12 07:07:53 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.290 2017/09/12 14:10:49 gson Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -421,7 +421,7 @@ kernelfault:
 	{
 		static const char lcall[7] = { 0x9a, 0, 0, 0, 0, 7, 0 };
 		const size_t sz = sizeof(lcall);
-		char tmp[sz];
+		char tmp[sizeof(lcall)];
 
 		/* Check for the osyscall lcall instruction. */
 		if (frame->tf_eip < VM_MAXUSER_ADDRESS - sz &&



CVS commit: src/usr.sbin/sysinst/arch/i386

2017-09-11 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Sep 11 15:24:28 UTC 2017

Modified Files:
src/usr.sbin/sysinst/arch/i386: md.c

Log Message:
Clear the screen after running installboot.  If we don't, there will
be a leftover line saying "Status: Finished" at the top of the next
screen, along with some random punctuation in the left and right
margins.  Inspired by ../landisk/md.c 1.3.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/i386/md.c

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

Modified files:

Index: src/usr.sbin/sysinst/arch/i386/md.c
diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.6 src/usr.sbin/sysinst/arch/i386/md.c:1.7
--- src/usr.sbin/sysinst/arch/i386/md.c:1.6	Sun May 10 10:14:02 2015
+++ src/usr.sbin/sysinst/arch/i386/md.c	Mon Sep 11 15:24:28 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.6 2015/05/10 10:14:02 martin Exp $ */
+/*	$NetBSD: md.c,v 1.7 2017/09/11 15:24:28 gson Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -347,11 +347,11 @@ md_post_newfs(void)
 		"console=%s,speed=%u", consoles[boottype.bp_consdev],
 		boottype.bp_conspeed);
 		if (pm->isspecial) {
-	ret = run_program(RUN_DISPLAY | RUN_NO_CLEAR, 
+	ret = run_program(RUN_DISPLAY,
 	"/usr/sbin/installboot -o %s /dev/r%s %s",
 			boot_options, pm->diskdev, bootxx_filename); 
 		} else {
-	ret = run_program(RUN_DISPLAY | RUN_NO_CLEAR, 
+	ret = run_program(RUN_DISPLAY,
 	"/usr/sbin/installboot -o %s /dev/r%s%c %s",
 			boot_options, pm->diskdev, 'a' + pm->rootpart,
 			bootxx_filename); 



CVS commit: src/usr.sbin/sysinst/arch/landisk

2017-07-18 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jul 18 17:15:45 UTC 2017

Modified Files:
src/usr.sbin/sysinst/arch/landisk: md.c

Log Message:
Clear the screen after running installboot.  If we don't, there will
be a leftover line saying "Status: Finished" at the top of subsequent
screens, and the message "Hit enter to continue" will be redrawn after
the set selection is complete, which confuses literal-minded robotic
users such as anita.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/landisk/md.c

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

Modified files:

Index: src/usr.sbin/sysinst/arch/landisk/md.c
diff -u src/usr.sbin/sysinst/arch/landisk/md.c:1.2 src/usr.sbin/sysinst/arch/landisk/md.c:1.3
--- src/usr.sbin/sysinst/arch/landisk/md.c:1.2	Sun Aug  3 16:09:40 2014
+++ src/usr.sbin/sysinst/arch/landisk/md.c	Tue Jul 18 17:15:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.2 2014/08/03 16:09:40 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.3 2017/07/18 17:15:45 gson Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -128,7 +128,7 @@ md_post_newfs(void)
 	cp_to_target("/usr/mdec/boot", "/boot");
 	bootxx = bootxx_name();
 	if (bootxx != NULL) {
-		error = run_program(RUN_DISPLAY | RUN_NO_CLEAR,
+		error = run_program(RUN_DISPLAY,
 		"/usr/sbin/installboot -v /dev/r%sa %s", pm->diskdev, bootxx);
 		free(bootxx);
 	} else



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

2017-07-11 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Jul 11 14:00:16 UTC 2017

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/x86/include/specialreg.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.99 src/sys/arch/x86/include/specialreg.h:1.100
--- src/sys/arch/x86/include/specialreg.h:1.99	Wed Jun 14 08:45:42 2017
+++ src/sys/arch/x86/include/specialreg.h	Tue Jul 11 14:00:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.99 2017/06/14 08:45:42 maxv Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.100 2017/07/11 14:00:15 gson Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -130,7 +130,7 @@
 #define CPUID_DE	0x0004	/* has debugging extension */
 #define CPUID_PSE	0x0008	/* has 4MB page size extension */
 #define CPUID_TSC	0x0010	/* has time stamp counter */
-#define CPUID_MSR	0x0020	/* has mode specific registers */
+#define CPUID_MSR	0x0020	/* has model specific registers */
 #define CPUID_PAE	0x0040	/* has phys address extension */
 #define CPUID_MCE	0x0080	/* has machine check exception */
 #define CPUID_CX8	0x0100	/* has CMPXCHG8B instruction */



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

2017-06-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Jun 24 10:25:23 UTC 2017

Modified Files:
src/tests/lib/libc/db: h_lfsr.c

Log Message:
Reduce the number of iterations in the bsize_torture test from 65535
to 1000 to make the ATF test suite as a whole take less time.  Before
the change, this single test case could take more than two hours to
run on a qemu emulated ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/db/h_lfsr.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/db/h_lfsr.c
diff -u src/tests/lib/libc/db/h_lfsr.c:1.1 src/tests/lib/libc/db/h_lfsr.c:1.2
--- src/tests/lib/libc/db/h_lfsr.c:1.1	Wed Nov 18 18:35:35 2015
+++ src/tests/lib/libc/db/h_lfsr.c	Sat Jun 24 10:25:23 2017
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: h_lfsr.c,v 1.1 2015/11/18 18:35:35 christos Exp $");
+__RCSID("$NetBSD: h_lfsr.c,v 1.2 2017/06/24 10:25:23 gson Exp $");
 
 #include 
 #include 
@@ -37,7 +37,7 @@ __RCSID("$NetBSD: h_lfsr.c,v 1.1 2015/11
 #include 
 #include 
 
-#define MAXKEY 0x
+#define MAXKEY 1000
 #ifdef DEBUG
 #define DPRINTF(...)	printf(__VA_ARGS__)
 #else



CVS commit: src/bin/sh

2017-05-13 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat May 13 15:03:34 UTC 2017

Modified Files:
src/bin/sh: miscbltin.c

Log Message:
Fix inconsistent whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/bin/sh/miscbltin.c

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

Modified files:

Index: src/bin/sh/miscbltin.c
diff -u src/bin/sh/miscbltin.c:1.43 src/bin/sh/miscbltin.c:1.44
--- src/bin/sh/miscbltin.c:1.43	Sat May  9 13:28:55 2015
+++ src/bin/sh/miscbltin.c	Sat May 13 15:03:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: miscbltin.c,v 1.43 2015/05/09 13:28:55 christos Exp $	*/
+/*	$NetBSD: miscbltin.c,v 1.44 2017/05/13 15:03:34 gson Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)miscbltin.c	8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: miscbltin.c,v 1.43 2015/05/09 13:28:55 christos Exp $");
+__RCSID("$NetBSD: miscbltin.c,v 1.44 2017/05/13 15:03:34 gson Exp $");
 #endif
 #endif /* not lint */
 
@@ -321,7 +321,7 @@ static const struct limits limits[] = {
 #ifdef RLIMIT_STACK
 	{ "stack",	"kbytes",	RLIMIT_STACK,	1024, 's' },
 #endif
-#ifdef  RLIMIT_CORE
+#ifdef RLIMIT_CORE
 	{ "coredump",	"blocks",	RLIMIT_CORE,	 512, 'c' },
 #endif
 #ifdef RLIMIT_RSS



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64

2017-01-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan  9 17:41:03 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64:
x86_64-gf2m.S

Log Message:
regen (actually, hand-edited, but the changes should be identical)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-gf2m.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-gf2m.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-gf2m.S:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-gf2m.S:1.6
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-gf2m.S:1.5	Sun Jan  8 21:36:24 2017
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/x86_64-gf2m.S	Mon Jan  9 17:41:03 2017
@@ -202,9 +202,8 @@ _mul_1x1:
 .type	bn_GF2m_mul_2x2,@function
 .align	16
 bn_GF2m_mul_2x2:
-	movl	OPENSSL_ia32cap_P+4(%rip),%eax
-	btl	$1,%eax
-
+	movq	OPENSSL_ia32cap_P(%rip),%rax
+	btq	$33,%rax
 	jnc	.Lvanilla_mul_2x2
 
 .byte	102,72,15,110,198



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2017-01-09 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan  9 17:36:24 UTC 2017

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: x86_64-gf2m.pl

Log Message:
Revert last two revisions; local changes should no longer be needed
now that the root cause of PR lib/51569 is fixed by revision 1.11 of
src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/Makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.6 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.7
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl:1.6	Sun Jan  8 21:36:04 2017
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl	Mon Jan  9 17:36:24 2017
@@ -167,9 +167,8 @@ $code.=<<___;
 .type	bn_GF2m_mul_2x2,\@abi-omnipotent
 .align	16
 bn_GF2m_mul_2x2:
-	mov	OPENSSL_ia32cap_P+4(%rip),%eax
-	bt	\$1,%eax	 # check PCLMULQDQ bit
-
+	mov	OPENSSL_ia32cap_P(%rip),%rax
+	bt	\$33,%rax
 	jnc	.Lvanilla_mul_2x2
 
 	movq		$a1,%xmm0



CVS commit: src/share/man/man4

2016-10-18 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Oct 18 18:44:20 UTC 2016

Modified Files:
src/share/man/man4: ciss.4

Log Message:
HP Smart Array P410i works for me


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/ciss.4

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

Modified files:

Index: src/share/man/man4/ciss.4
diff -u src/share/man/man4/ciss.4:1.8 src/share/man/man4/ciss.4:1.9
--- src/share/man/man4/ciss.4:1.8	Tue Mar 18 18:20:39 2014
+++ src/share/man/man4/ciss.4	Tue Oct 18 18:44:20 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ciss.4,v 1.8 2014/03/18 18:20:39 riastradh Exp $
+.\"	$NetBSD: ciss.4,v 1.9 2016/10/18 18:44:20 gson Exp $
 .\"	Jonathan Stone, 2006.
 .\"
 .\"	derived from:
@@ -62,6 +62,8 @@ HP Smart Array P400
 .It
 HP Smart Array P400i
 .It
+HP Smart Array P410i
+.It
 HP Smart Array P600
 .It
 HP Smart Array P800



CVS commit: src/tests/fs/ffs

2016-10-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sat Oct  8 13:23:53 UTC 2016

Modified Files:
src/tests/fs/ffs: ffs_common.sh

Log Message:
Incrase timeout for the benefit of the walk_list_user test case which
sometimes times out under qemu under Linux, where the timing is more
accurate than under qemu under NetBSD where the the 60 second timeout
typically takes more than 60 seconds to trigger.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/ffs/ffs_common.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/ffs/ffs_common.sh
diff -u src/tests/fs/ffs/ffs_common.sh:1.2 src/tests/fs/ffs/ffs_common.sh:1.3
--- src/tests/fs/ffs/ffs_common.sh:1.2	Mon Jul 29 13:15:24 2013
+++ src/tests/fs/ffs/ffs_common.sh	Sat Oct  8 13:23:53 2016
@@ -1,4 +1,4 @@
-# $NetBSD: ffs_common.sh,v 1.2 2013/07/29 13:15:24 skrll Exp $ 
+# $NetBSD: ffs_common.sh,v 1.3 2016/10/08 13:23:53 gson Exp $ 
 
 create_ffs()
 {
@@ -45,7 +45,7 @@ test_case()
 
 	eval "${name}_head() { \
 		atf_set "descr" "${descr}"
-		atf_set "timeout" "60"
+		atf_set "timeout" "120"
 	}"
 	eval "${name}_body() { \
 		RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \



CVS commit: src/tests/lib/libutil

2016-05-04 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed May  4 18:36:46 UTC 2016

Modified Files:
src/tests/lib/libutil: t_parsedate.c

Log Message:
Reduce the step size, exposing another bug.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/tests/lib/libutil/t_parsedate.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/libutil/t_parsedate.c
diff -u src/tests/lib/libutil/t_parsedate.c:1.22 src/tests/lib/libutil/t_parsedate.c:1.23
--- src/tests/lib/libutil/t_parsedate.c:1.22	Tue May  3 18:18:15 2016
+++ src/tests/lib/libutil/t_parsedate.c	Wed May  4 18:36:46 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.22 2016/05/03 18:18:15 kre Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.23 2016/05/04 18:36:46 gson Exp $ */
 /*-
  * Copyright (c) 2010, 2015 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_parsedate.c,v 1.22 2016/05/03 18:18:15 kre Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.23 2016/05/04 18:36:46 gson Exp $");
 
 #include 
 #include 
@@ -269,10 +269,8 @@ ATF_TC_BODY(relative, tc)
 	 * edges of the time_t range to avert under- or overflow
 	 * of the relative date, and use a prime step for maximum
 	 * coverage of different times of day/week/month/year.
-	 * The step is currently large to limit the size of the
-	 * error log, but can be reduced as bugs are fixed.
 	 */
-	for (now = 0x00FF; now < 0xFF00; now += 7424537) {
+	for (now = 0x00FF; now < 0xFF00; now += 379) {
 		ATF_CHECK(localtime_r(&now, &tm) != NULL);
 		tm.tm_mday--;
 		/* "yesterday" leaves time untouched */



CVS commit: src/tests/lib/libutil

2016-05-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun May  1 16:39:47 UTC 2016

Modified Files:
src/tests/lib/libutil: t_parsedate.c

Log Message:
In the "relative" test case, run the tests multiple times relative to
various dates over a span of a few decades, instead of just once
relative to the current date.  This makes the test fail consistently
instead of sometimes failing and sometimes not depending on when
it is run.  Makes PR lib/50574 consistently reproducible.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/lib/libutil/t_parsedate.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/libutil/t_parsedate.c
diff -u src/tests/lib/libutil/t_parsedate.c:1.19 src/tests/lib/libutil/t_parsedate.c:1.20
--- src/tests/lib/libutil/t_parsedate.c:1.19	Thu Dec 31 10:56:13 2015
+++ src/tests/lib/libutil/t_parsedate.c	Sun May  1 16:39:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.19 2015/12/31 10:56:13 dholland Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.20 2016/05/01 16:39:47 gson Exp $ */
 /*-
  * Copyright (c) 2010, 2015 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_parsedate.c,v 1.19 2015/12/31 10:56:13 dholland Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.20 2016/05/01 16:39:47 gson Exp $");
 
 #include 
 #include 
@@ -260,134 +260,142 @@ ATF_TC_BODY(relative, tc)
 	ATF_CHECK(parsedate("next sunday", NULL, NULL) != -1);
 	ATF_CHECK(parsedate("+2 years", NULL, NULL) != -1);
 
-	(void)time(&now);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mday--;
-	/* "yesterday" leaves time untouched */
-	tm.tm_isdst = -1;
-	REL_CHECK("yesterday", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mday++;
-	/* as does "tomorrow" */
-	tm.tm_isdst = -1;
-	REL_CHECK("tomorrow", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	if (tm.tm_wday > 4)
-		tm.tm_mday += 7;
-	tm.tm_mday += 4 - tm.tm_wday;
-	/* if a day name is mentioned, it means midnight (by default) */
-	tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
-	tm.tm_isdst = -1;
-	REL_CHECK("this thursday", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mday += 14 - (tm.tm_wday ? tm.tm_wday : 7);
-	tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
-	tm.tm_isdst = -1;
-	REL_CHECK("next sunday", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	if (tm.tm_wday <= 5)
-		tm.tm_mday -= 7;
-	tm.tm_mday += 5 - tm.tm_wday;
-	tm.tm_sec = tm.tm_min = 0;
-	tm.tm_hour = 16;
-	tm.tm_isdst = -1;
-	REL_CHECK("last friday 4 p.m.", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mday += 14;
-	if (tm.tm_wday > 3)
-		tm.tm_mday += 7;
-	tm.tm_mday += 3 - tm.tm_wday;
-	tm.tm_sec = tm.tm_min = 0;
-	tm.tm_hour = 3;
-	tm.tm_isdst = -1;
-	REL_CHECK("we fortnight 3 a.m.", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_min -= 5;
-	tm.tm_isdst = -1;
-	REL_CHECK("5 minutes ago", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_hour++;
-	tm.tm_min += 37;
-	tm.tm_isdst = -1;
-	REL_CHECK("97 minutes", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mon++;
-	tm.tm_isdst = -1;
-	REL_CHECK("month", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mon += 2;		/* "next" means add 2 ... */
-	tm.tm_isdst = -1;
-	REL_CHECK("next month", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mon--;
-	tm.tm_isdst = -1;
-	REL_CHECK("last month", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mon += 6;
-	tm.tm_mday += 2;
-	tm.tm_isdst = -1;
-	REL_CHECK("+6 months 2 days", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_mon -= 9;
-	tm.tm_isdst = -1;
-	REL_CHECK("9 months ago", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	if (tm.tm_wday <= 2)
-		tm.tm_mday -= 7;
-	tm.tm_mday += 2 - tm.tm_wday;
-	tm.tm_isdst = -1;
-	tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
-	REL_CHECK("1 week ago Tu", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_isdst = -1;
-	tm.tm_mday++;
-	tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
-	REL_CHECK("midnight tomorrow", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_isdst = -1;
-	tm.tm_mday++;
-	tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
-	REL_CHECK("tomorrow midnight", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	tm.tm_isdst = -1;
-	tm.tm_mday++;
-	tm.tm_hour = 12;
-	tm.tm_min = tm.tm_sec = 0;
-	REL_CHECK("noon tomorrow", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	if (tm.tm_wday > 2)
-		tm.tm_mday += 7;
-	tm.tm_mday += 2 - tm.tm_wday;
-	tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
-	tm.tm_isdst = -1;
-	REL_CHECK("midnight Tuesday", now, tm);
-
-	ATF_CHECK(localtime_r(&now, &tm) != NULL);
-	if (tm.tm_wday > 2 + 1)
-		tm.tm_mday += 7;
-	tm.tm_mday += 2 - tm.tm_wday;
-	tm.tm_mday++;	/* xxx midnight --> the next day */
-	tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
-	tm.tm_is

CVS commit: src

2016-04-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri Apr  8 10:09:16 UTC 2016

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/gdb: Makefile t_regress.sh

Log Message:
Add regression tests for some past gdb bugs.


To generate a diff of this commit:
cvs rdiff -u -r1.670 -r1.671 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.125 -r1.126 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.20 -r1.21 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/gdb/Makefile \
src/tests/usr.bin/gdb/t_regress.sh

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.670 src/distrib/sets/lists/tests/mi:1.671
--- src/distrib/sets/lists/tests/mi:1.670	Wed Apr  6 00:47:15 2016
+++ src/distrib/sets/lists/tests/mi	Fri Apr  8 10:09:16 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.670 2016/04/06 00:47:15 christos Exp $
+# $NetBSD: mi,v 1.671 2016/04/08 10:09:16 gson Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3523,6 +3523,10 @@
 ./usr/tests/usr.bin/find/Atffile		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/find/Kyuafile		tests-usr.bin-tests	compattestfile,atf,kyua
 ./usr/tests/usr.bin/find/t_find			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/gdbtests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/gdb/Atffile			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/gdb/Kyuafile		tests-usr.bin-tests	compattestfile,atf,kyua
+./usr/tests/usr.bin/gdb/t_regress		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/grep			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/grep/Atffile		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/grep/Kyuafile		tests-usr.bin-tests	compattestfile,atf,kyua

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.125 src/etc/mtree/NetBSD.dist.tests:1.126
--- src/etc/mtree/NetBSD.dist.tests:1.125	Fri Mar  4 02:44:45 2016
+++ src/etc/mtree/NetBSD.dist.tests	Fri Apr  8 10:09:16 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.125 2016/03/04 02:44:45 ozaki-r Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.126 2016/04/08 10:09:16 gson Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -375,6 +375,7 @@
 ./usr/tests/usr.bin/diff
 ./usr/tests/usr.bin/dirname
 ./usr/tests/usr.bin/find
+./usr/tests/usr.bin/gdb
 ./usr/tests/usr.bin/grep
 ./usr/tests/usr.bin/gzip
 ./usr/tests/usr.bin/id

Index: src/tests/usr.bin/Makefile
diff -u src/tests/usr.bin/Makefile:1.20 src/tests/usr.bin/Makefile:1.21
--- src/tests/usr.bin/Makefile:1.20	Fri Nov 14 09:03:39 2014
+++ src/tests/usr.bin/Makefile	Fri Apr  8 10:09:16 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2014/11/14 09:03:39 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.21 2016/04/08 10:09:16 gson Exp $
 #
 
 .include 
@@ -6,7 +6,8 @@
 TESTSDIR=   ${TESTSBASE}/usr.bin
 
 TESTS_SUBDIRS=	awk basename bzip2 cc cmp config cut \
-		diff dirname find grep gzip id infocmp jot ld m4 make mkdep \
+		diff dirname find gdb grep gzip id \
+		infocmp jot ld m4 make mkdep \
 		nbperf netpgpverify pr rump_server shmif_dumpbus sdiff \
 		sed sort tmux tr unifdef vmstat xlint
 

Added files:

Index: src/tests/usr.bin/gdb/Makefile
diff -u /dev/null src/tests/usr.bin/gdb/Makefile:1.1
--- /dev/null	Fri Apr  8 10:09:16 2016
+++ src/tests/usr.bin/gdb/Makefile	Fri Apr  8 10:09:16 2016
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2016/04/08 10:09:16 gson Exp $
+
+.include 
+
+TESTSDIR=	${TESTSBASE}/usr.bin/gdb
+
+TESTS_SH=	t_regress
+
+.include 
Index: src/tests/usr.bin/gdb/t_regress.sh
diff -u /dev/null src/tests/usr.bin/gdb/t_regress.sh:1.1
--- /dev/null	Fri Apr  8 10:09:16 2016
+++ src/tests/usr.bin/gdb/t_regress.sh	Fri Apr  8 10:09:16 2016
@@ -0,0 +1,77 @@
+# $NetBSD: t_regress.sh,v 1.1 2016/04/08 10:09:16 gson Exp $
+#
+# Copyright (c) 2016 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT

CVS commit: src/usr.bin/make

2016-04-06 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Apr  6 09:57:00 UTC 2016

Modified Files:
src/usr.bin/make: arch.c parse.c str.c

Log Message:
Fully avoid the nonstandard types u_char, u_int, and u_long, which
were only used inconsistently in a few places anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/usr.bin/make/arch.c
cvs rdiff -u -r1.213 -r1.214 src/usr.bin/make/parse.c
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/make/str.c

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/arch.c
diff -u src/usr.bin/make/arch.c:1.68 src/usr.bin/make/arch.c:1.69
--- src/usr.bin/make/arch.c:1.68	Thu Feb 18 18:29:14 2016
+++ src/usr.bin/make/arch.c	Wed Apr  6 09:57:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $	*/
+/*	$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $");
+__RCSID("$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -785,7 +785,7 @@ ArchSVR4Entry(Arch *ar, char *name, size
 	}
 	if (DEBUG(ARCH)) {
 	fprintf(debug_file, "Found svr4 archive name table with %lu entries\n",
-	(u_long)entry);
+	(unsigned long)entry);
 	}
 	return 0;
 }
@@ -803,7 +803,7 @@ ArchSVR4Entry(Arch *ar, char *name, size
 if (entry >= ar->fnamesize) {
 	if (DEBUG(ARCH)) {
 	fprintf(debug_file, "SVR4 entry offset %s is greater than %lu\n",
-		   name, (u_long)ar->fnamesize);
+		   name, (unsigned long)ar->fnamesize);
 	}
 	return 2;
 }

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.213 src/usr.bin/make/parse.c:1.214
--- src/usr.bin/make/parse.c:1.213	Fri Mar 11 13:54:47 2016
+++ src/usr.bin/make/parse.c	Wed Apr  6 09:57:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $	*/
+/*	$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)parse.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $");
+__RCSID("$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -795,11 +795,11 @@ ParseMessage(char *line)
 	return FALSE;
 }
 
-while (isalpha((u_char)*line))
+while (isalpha((unsigned char)*line))
 	line++;
-if (!isspace((u_char)*line))
+if (!isspace((unsigned char)*line))
 	return FALSE;			/* not for us */
-while (isspace((u_char)*line))
+while (isspace((unsigned char)*line))
 	line++;
 
 line = Var_Subst(NULL, line, VAR_CMD, VARF_WANTRES);

Index: src/usr.bin/make/str.c
diff -u src/usr.bin/make/str.c:1.35 src/usr.bin/make/str.c:1.36
--- src/usr.bin/make/str.c:1.35	Wed Feb 12 01:35:56 2014
+++ src/usr.bin/make/str.c	Wed Apr  6 09:57:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $	*/
+/*	$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $	*/
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $";
+static char rcsid[] = "$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)str.c	5.8 (Berkeley) 6/1/90";
 #else
-__RCSID("$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $");
+__RCSID("$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $");
 #endif
 #endif/* not lint */
 #endif
@@ -102,7 +102,7 @@ str_concat(const char *s1, const char *s
 	len2 = strlen(s2);
 
 	/* allocate length plus separator plus EOS */
-	result = bmake_malloc((u_int)(len1 + len2 + 2));
+	result = bmake_malloc((unsigned int)(len1 + len2 + 2));
 
 	/* copy first string into place */
 	memcpy(result, s1, len1);



CVS commit: src/tests/usr.bin/cc

2016-04-03 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Apr  3 14:41:30 UTC 2016

Modified Files:
src/tests/usr.bin/cc: t_hello.sh

Log Message:
Fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/cc/t_hello.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/usr.bin/cc/t_hello.sh
diff -u src/tests/usr.bin/cc/t_hello.sh:1.2 src/tests/usr.bin/cc/t_hello.sh:1.3
--- src/tests/usr.bin/cc/t_hello.sh:1.2	Sat Jul 21 12:30:55 2012
+++ src/tests/usr.bin/cc/t_hello.sh	Sun Apr  3 14:41:30 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: t_hello.sh,v 1.2 2012/07/21 12:30:55 martin Exp $
+#	$NetBSD: t_hello.sh,v 1.3 2016/04/03 14:41:30 gson Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,7 +39,7 @@ hello_pic_head() {
 
 atf_test_case hello_pie
 hello_pie_head() {
-	atf_set "descr" "compile and run position independend (PIE) \"hello world\""
+	atf_set "descr" "compile and run position independent (PIE) \"hello world\""
 	atf_set "require.progs" "cc"
 }
 



CVS commit: src/lib/libm/src

2016-01-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jan 24 20:34:30 UTC 2016

Modified Files:
src/lib/libm/src: e_hypotf.c

Log Message:
Fix incorrect magic numbers in scaling.  From FreeBSD commit 23397, by
way of Rin Okuyama.  Fixes PR lib/50698.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/e_hypotf.c

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

Modified files:

Index: src/lib/libm/src/e_hypotf.c
diff -u src/lib/libm/src/e_hypotf.c:1.9 src/lib/libm/src/e_hypotf.c:1.10
--- src/lib/libm/src/e_hypotf.c:1.9	Fri Apr 25 22:21:53 2008
+++ src/lib/libm/src/e_hypotf.c	Sun Jan 24 20:34:30 2016
@@ -15,7 +15,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_hypotf.c,v 1.9 2008/04/25 22:21:53 christos Exp $");
+__RCSID("$NetBSD: e_hypotf.c,v 1.10 2016/01/24 20:34:30 gson Exp $");
 #endif
 
 #include "math.h"
@@ -43,22 +43,22 @@ __ieee754_hypotf(float x, float y)
 	   if(hb == 0x7f80) w = b;
 	   return w;
 	   }
-	   /* scale a and b by 2**-60 */
-	   ha -= 0x5d80; hb -= 0x5d80;	k += 60;
+	   /* scale a and b by 2**-68 */
+	   ha -= 0x2200; hb -= 0x2200;	k += 68;
 	   SET_FLOAT_WORD(a,ha);
 	   SET_FLOAT_WORD(b,hb);
 	}
 	if(hb < 0x2680) {	/* b < 2**-50 */
 	if(hb <= 0x007f) {	/* subnormal b or 0 */
 	if(hb==0) return a;
-		SET_FLOAT_WORD(t1,0x3f00);	/* t1=2^126 */
+		SET_FLOAT_WORD(t1,0x7e80);	/* t1=2^126 */
 		b *= t1;
 		a *= t1;
 		k -= 126;
-	} else {		/* scale a and b by 2^60 */
-	ha += 0x5d80; 	/* a *= 2^60 */
-		hb += 0x5d80;	/* b *= 2^60 */
-		k -= 60;
+	} else {		/* scale a and b by 2^68 */
+	ha += 0x2200; 	/* a *= 2^68 */
+		hb += 0x2200;	/* b *= 2^68 */
+		k -= 68;
 		SET_FLOAT_WORD(a,ha);
 		SET_FLOAT_WORD(b,hb);
 	}



CVS commit: src/tests/lib/libm

2016-01-24 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jan 24 20:26:47 UTC 2016

Modified Files:
src/tests/lib/libm: Makefile
Added Files:
src/tests/lib/libm: t_hypot.c

Log Message:
Add some tests of hypot() and hypotf()


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tests/lib/libm/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_hypot.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/libm/Makefile
diff -u src/tests/lib/libm/Makefile:1.36 src/tests/lib/libm/Makefile:1.37
--- src/tests/lib/libm/Makefile:1.36	Tue Dec 22 14:27:51 2015
+++ src/tests/lib/libm/Makefile	Sun Jan 24 20:26:47 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2015/12/22 14:27:51 christos Exp $
+# $NetBSD: Makefile,v 1.37 2016/01/24 20:26:47 gson Exp $
 
 .include 
 
@@ -22,6 +22,7 @@ TESTS_C+=	t_erf
 TESTS_C+=	t_exp
 TESTS_C+=	t_fenv
 TESTS_C+=	t_fmod
+TESTS_C+=	t_hypot
 TESTS_C+=	t_infinity
 TESTS_C+=	t_ldexp
 TESTS_C+=	t_log

Added files:

Index: src/tests/lib/libm/t_hypot.c
diff -u /dev/null src/tests/lib/libm/t_hypot.c:1.1
--- /dev/null	Sun Jan 24 20:26:47 2016
+++ src/tests/lib/libm/t_hypot.c	Sun Jan 24 20:26:47 2016
@@ -0,0 +1,81 @@
+/* $NetBSD: t_hypot.c,v 1.1 2016/01/24 20:26:47 gson Exp $ */
+
+/*-
+ * Copyright (c) 2016 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+#include 
+
+ATF_TC(hypot_integer);
+ATF_TC_HEAD(hypot_integer, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test hypot with integer args");
+}
+
+ATF_TC_BODY(hypot_integer, tc)
+{
+	/* volatile so hypotf() won't be evaluated at compile time */
+	volatile double a = 5;
+	volatile double b = 12;
+	ATF_CHECK(hypot(a, b) == 13.0);
+}
+
+ATF_TC(hypotf_integer);
+ATF_TC_HEAD(hypotf_integer, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test hypotf with integer args");
+}
+
+ATF_TC_BODY(hypotf_integer, tc)
+{
+	volatile float a = 5;
+	volatile float b = 12;
+	ATF_CHECK(hypotf(a, b) == 13.0f);
+}
+
+ATF_TC(pr50698);
+ATF_TC_HEAD(pr50698, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Check for the bug of PR 50698");
+}
+
+ATF_TC_BODY(pr50698, tc)
+{
+	volatile float a = 1e-18f;
+	float val = hypotf(a, a);
+	ATF_CHECK(!isinf(val));
+	ATF_CHECK(!isnan(val));
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+	ATF_TP_ADD_TC(tp, hypot_integer);
+	ATF_TP_ADD_TC(tp, hypotf_integer);
+	ATF_TP_ADD_TC(tp, pr50698);
+
+	return atf_no_error();
+}



CVS commit: src/tests/fs/vfs

2016-01-14 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Jan 14 08:58:02 UTC 2016

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

Log Message:
Don't use a filename with an embedded newline in the create_many test
case.  Instead, add a separate test case "create_nonalphanum" for
filenames containing non-alphanumeric characters.  The bug of
PR kern/50608 now causes a failure in create_nonalphanum rather than
create_many.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 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/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.53 src/tests/fs/vfs/t_vnops.c:1.54
--- src/tests/fs/vfs/t_vnops.c:1.53	Wed Jan 13 12:05:49 2016
+++ src/tests/fs/vfs/t_vnops.c	Thu Jan 14 08:58:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.53 2016/01/13 12:05:49 pooka Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.54 2016/01/14 08:58:02 gson Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,6 +31,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -446,9 +447,6 @@ create_many(const atf_tc_t *tc, const ch
 	int nfiles = 2324; /* #Nancy */
 	int i;
 
-	if (FSTYPE_UDF(tc))
-		atf_tc_expect_fail("PR kern/50608");
-
 	/* takes forever with many files */
 	if (FSTYPE_MSDOS(tc))
 		nfiles /= 4;
@@ -469,14 +467,14 @@ create_many(const atf_tc_t *tc, const ch
 	for (i = 0; i < nfiles; i++) {
 		int fd;
 
-		sprintf(buf, TESTFN "%d\n", i);
+		sprintf(buf, TESTFN "%d", i);
 		RL(fd = rump_sys_open(buf, O_RDWR|O_CREAT|O_EXCL, 0666));
 		RL(rump_sys_close(fd));
 	}
 
 	/* wipe them out */
 	for (i = 0; i < nfiles; i++) {
-		sprintf(buf, TESTFN "%d\n", i);
+		sprintf(buf, TESTFN "%d", i);
 		RL(rump_sys_unlink(buf));
 	}
 #undef TESTFN
@@ -484,6 +482,38 @@ create_many(const atf_tc_t *tc, const ch
 	rump_sys_chdir("/");
 }
 
+/*
+ * Test creating files with one-character names using all possible
+ * character values.  Failures to create the file are ignored as the
+ * characters allowed in file names vary by file system, but at least
+ * we can check that the fs does not crash, and if the file is
+ * successfully created, unlinking it should also succeed.
+ */
+static void
+create_nonalphanum(const atf_tc_t *tc, const char *mp)
+{
+	char buf[64];
+	int i;
+
+	if (FSTYPE_UDF(tc))
+		atf_tc_expect_fail("PR kern/50608");
+
+	RL(rump_sys_chdir(mp));
+
+	for (i = 0; i < 256; i++) {
+		int fd;
+		sprintf(buf, "%c", i);
+		fd = rump_sys_open(buf, O_RDWR|O_CREAT|O_EXCL, 0666);
+		if (fd == -1)
+			continue;
+		RL(rump_sys_close(fd));
+		RL(rump_sys_unlink(buf));
+	}
+	printf("\n");
+
+	rump_sys_chdir("/");
+}
+
 static void
 create_nametoolong(const atf_tc_t *tc, const char *mp)
 {
@@ -1007,6 +1037,7 @@ ATF_TC_FSAPPLY(lstat_symlink, "lstat(2) 
 #undef FSTEST_IMGSIZE
 #define FSTEST_IMGSIZE (1024*1024*64)
 ATF_TC_FSAPPLY(create_many, "create many directory entries");
+ATF_TC_FSAPPLY(create_nonalphanum, "non-alphanumeric filenames");
 
 ATF_TP_ADD_TCS(tp)
 {
@@ -1020,6 +1051,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_FSAPPLY(rename_dotdot);
 	ATF_TP_FSAPPLY(rename_reg_nodir);
 	ATF_TP_FSAPPLY(create_many);
+	ATF_TP_FSAPPLY(create_nonalphanum);
 	ATF_TP_FSAPPLY(create_nametoolong);
 	ATF_TP_FSAPPLY(create_exist);
 	ATF_TP_FSAPPLY(rename_nametoolong);



CVS commit: src/sys/kern

2015-12-27 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Dec 27 20:52:25 UTC 2015

Modified Files:
src/sys/kern: kern_ksyms.c

Log Message:
KSYMS_MAX_ID is too small for i386 kernels built with MKDEBUG=yes,
causing a number of ATF tests to fail.  Increase it by 50%, from 65536
to 98304.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/kern/kern_ksyms.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/kern/kern_ksyms.c
diff -u src/sys/kern/kern_ksyms.c:1.82 src/sys/kern/kern_ksyms.c:1.83
--- src/sys/kern/kern_ksyms.c:1.82	Wed Dec  9 16:26:16 2015
+++ src/sys/kern/kern_ksyms.c	Sun Dec 27 20:52:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ksyms.c,v 1.82 2015/12/09 16:26:16 maxv Exp $	*/
+/*	$NetBSD: kern_ksyms.c,v 1.83 2015/12/27 20:52:25 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.82 2015/12/09 16:26:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.83 2015/12/27 20:52:25 gson Exp $");
 
 #if defined(_KERNEL) && defined(_KERNEL_OPT)
 #include "opt_copy_symtab.h"
@@ -102,7 +102,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c
 #include "ioconf.h"
 #endif
 
-#define KSYMS_MAX_ID	65536
+#define KSYMS_MAX_ID	98304
 #ifdef KDTRACE_HOOKS
 static uint32_t ksyms_nmap[KSYMS_MAX_ID];	/* sorted symbol table map */
 #else



CVS commit: src/lib/libedit

2015-12-08 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Dec  8 16:53:28 UTC 2015

Modified Files:
src/lib/libedit: tty.c

Log Message:
unbreak the build


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/lib/libedit/tty.c

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

Modified files:

Index: src/lib/libedit/tty.c
diff -u src/lib/libedit/tty.c:1.48 src/lib/libedit/tty.c:1.49
--- src/lib/libedit/tty.c:1.48	Tue Dec  8 12:57:16 2015
+++ src/lib/libedit/tty.c	Tue Dec  8 16:53:27 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.48 2015/12/08 12:57:16 christos Exp $	*/
+/*	$NetBSD: tty.c,v 1.49 2015/12/08 16:53:27 gson Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)tty.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: tty.c,v 1.48 2015/12/08 12:57:16 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.49 2015/12/08 16:53:27 gson Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -581,7 +581,7 @@ protected void
 tty_end(EditLine *el)
 {
 	if (el->el_flags & EDIT_DISABLED)
-		return 0;
+		return;
 
 	if (tty_setty(el, TCSAFLUSH, &el->el_tty.t_or) == -1) {
 #ifdef DEBUG_TTY



CVS commit: src/sys/kern

2015-08-25 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug 25 12:55:30 UTC 2015

Modified Files:
src/sys/kern: tty.c

Log Message:
In ttywait_timo(), break out of loop on all errors, not just
EWOULDBLOCK, as ttywait() did prior to 1.265.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/kern/tty.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/kern/tty.c
diff -u src/sys/kern/tty.c:1.266 src/sys/kern/tty.c:1.267
--- src/sys/kern/tty.c:1.266	Mon Aug 24 22:50:32 2015
+++ src/sys/kern/tty.c	Tue Aug 25 12:55:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.266 2015/08/24 22:50:32 pooka Exp $	*/
+/*	$NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.266 2015/08/24 22:50:32 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1552,10 +1552,10 @@ ttywait_timo(struct tty *tp, int timo)
 	CONNECTED(tp) && tp->t_oproc) {
 		(*tp->t_oproc)(tp);
 		error = ttysleep(tp, &tp->t_outcv, true, timo);
-		if (error == EWOULDBLOCK) {
+		if (error == EWOULDBLOCK)
 			ttyflush(tp, FWRITE);
+		if (error)
 			break;
-		}
 	}
 	mutex_spin_exit(&tty_lock);
 



CVS commit: src/sys/kern

2015-08-19 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Wed Aug 19 12:02:55 UTC 2015

Modified Files:
src/sys/kern: tty.c

Log Message:
When closing a tty, limit the amount of time spent waiting for the
output to drain to five seconds so that exiting processes with
buffered output for a serial port blocked by flow control or a pty
that is not being read do not hang indefinitely.  Should fix PRs
kern/12534 and kern/17171.  This is an updated version of the change
of tty.c 1.263.


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/kern/tty.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/kern/tty.c
diff -u src/sys/kern/tty.c:1.264 src/sys/kern/tty.c:1.265
--- src/sys/kern/tty.c:1.264	Sun Jun 14 16:19:31 2015
+++ src/sys/kern/tty.c	Wed Aug 19 12:02:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.264 2015/06/14 16:19:31 gson Exp $	*/
+/*	$NetBSD: tty.c,v 1.265 2015/08/19 12:02:55 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.264 2015/06/14 16:19:31 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.265 2015/08/19 12:02:55 gson Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -1536,10 +1536,10 @@ ttnread(struct tty *tp)
 }
 
 /*
- * Wait for output to drain.
+ * Wait for output to drain, or if this times out, flush it.
  */
-int
-ttywait(struct tty *tp)
+static int
+ttywait_timo(struct tty *tp, int timo)
 {
 	int	error;
 
@@ -1549,9 +1549,11 @@ ttywait(struct tty *tp)
 	while ((tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) &&
 	CONNECTED(tp) && tp->t_oproc) {
 		(*tp->t_oproc)(tp);
-		error = ttysleep(tp, &tp->t_outcv, true, 0);
-		if (error)
+		error = ttysleep(tp, &tp->t_outcv, true, timo);
+		if (error == EWOULDBLOCK) {
+			ttyflush(tp, FWRITE);
 			break;
+		}
 	}
 	mutex_spin_exit(&tty_lock);
 
@@ -1559,6 +1561,15 @@ ttywait(struct tty *tp)
 }
 
 /*
+ * Wait for output to drain.
+ */
+int
+ttywait(struct tty *tp)
+{
+	return ttywait_timo(tp, 0);
+}
+
+/*
  * Flush if successfully wait.
  */
 int
@@ -1566,7 +1577,8 @@ ttywflush(struct tty *tp)
 {
 	int	error;
 
-	if ((error = ttywait(tp)) == 0) {
+	error = ttywait_timo(tp, 5 * hz);
+	if (error == 0 || error == EWOULDBLOCK) {
 		mutex_spin_enter(&tty_lock);
 		ttyflush(tp, FREAD);
 		mutex_spin_exit(&tty_lock);



CVS commit: src/sys/kern

2015-06-14 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Sun Jun 14 16:19:31 UTC 2015

Modified Files:
src/sys/kern: tty.c

Log Message:
Revert previous; it broke the lib/libc/ttyio/t_ttyio/ioctl test case.


To generate a diff of this commit:
cvs rdiff -u -r1.263 -r1.264 src/sys/kern/tty.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/kern/tty.c
diff -u src/sys/kern/tty.c:1.263 src/sys/kern/tty.c:1.264
--- src/sys/kern/tty.c:1.263	Fri Jun 12 17:28:53 2015
+++ src/sys/kern/tty.c	Sun Jun 14 16:19:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.263 2015/06/12 17:28:53 gson Exp $	*/
+/*	$NetBSD: tty.c,v 1.264 2015/06/14 16:19:31 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.263 2015/06/12 17:28:53 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.264 2015/06/14 16:19:31 gson Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -102,7 +102,6 @@ __KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.26
 #endif /* COMPAT_60 */
 
 static int	ttnread(struct tty *);
-static int	ttywait_timo(struct tty *, int timo);
 static void	ttyblock(struct tty *);
 static void	ttyecho(int, struct tty *);
 static void	ttyrubo(struct tty *, int);
@@ -1537,10 +1536,10 @@ ttnread(struct tty *tp)
 }
 
 /*
- * Wait for output to drain, or if this times out, flush it.
+ * Wait for output to drain.
  */
-static int
-ttywait_timo(struct tty *tp, int timo)
+int
+ttywait(struct tty *tp)
 {
 	int	error;
 
@@ -1550,11 +1549,9 @@ ttywait_timo(struct tty *tp, int timo)
 	while ((tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) &&
 	CONNECTED(tp) && tp->t_oproc) {
 		(*tp->t_oproc)(tp);
-		error = ttysleep(tp, &tp->t_outcv, true, timo);
-		if (error) {
-			ttyflush(tp, FWRITE);
+		error = ttysleep(tp, &tp->t_outcv, true, 0);
+		if (error)
 			break;
-		}
 	}
 	mutex_spin_exit(&tty_lock);
 
@@ -1562,15 +1559,6 @@ ttywait_timo(struct tty *tp, int timo)
 }
 
 /*
- * Wait for output to drain.
- */
-int
-ttywait(struct tty *tp)
-{
-	return ttywait_timo(tp, 0);
-}
-
-/*
  * Flush if successfully wait.
  */
 int
@@ -1578,8 +1566,7 @@ ttywflush(struct tty *tp)
 {
 	int	error;
 
-	error = ttywait_timo(tp, 5 * hz);
-	if (error == 0 || error == EWOULDBLOCK) {
+	if ((error = ttywait(tp)) == 0) {
 		mutex_spin_enter(&tty_lock);
 		ttyflush(tp, FREAD);
 		mutex_spin_exit(&tty_lock);



CVS commit: src/sys/kern

2015-06-12 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri Jun 12 17:28:53 UTC 2015

Modified Files:
src/sys/kern: tty.c

Log Message:
When closing a tty, limit the amount of time spent waiting for the
output to drain to five seconds so that exiting processes with
buffered output for a serial port blocked by flow control do not
hang indefinitely.  Should fix PR kern/12534.  OK christos.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/kern/tty.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/kern/tty.c
diff -u src/sys/kern/tty.c:1.262 src/sys/kern/tty.c:1.263
--- src/sys/kern/tty.c:1.262	Fri Sep  5 05:33:39 2014
+++ src/sys/kern/tty.c	Fri Jun 12 17:28:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.262 2014/09/05 05:33:39 matt Exp $	*/
+/*	$NetBSD: tty.c,v 1.263 2015/06/12 17:28:53 gson Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.262 2014/09/05 05:33:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.263 2015/06/12 17:28:53 gson Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -102,6 +102,7 @@ __KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.26
 #endif /* COMPAT_60 */
 
 static int	ttnread(struct tty *);
+static int	ttywait_timo(struct tty *, int timo);
 static void	ttyblock(struct tty *);
 static void	ttyecho(int, struct tty *);
 static void	ttyrubo(struct tty *, int);
@@ -1536,10 +1537,10 @@ ttnread(struct tty *tp)
 }
 
 /*
- * Wait for output to drain.
+ * Wait for output to drain, or if this times out, flush it.
  */
-int
-ttywait(struct tty *tp)
+static int
+ttywait_timo(struct tty *tp, int timo)
 {
 	int	error;
 
@@ -1549,9 +1550,11 @@ ttywait(struct tty *tp)
 	while ((tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) &&
 	CONNECTED(tp) && tp->t_oproc) {
 		(*tp->t_oproc)(tp);
-		error = ttysleep(tp, &tp->t_outcv, true, 0);
-		if (error)
+		error = ttysleep(tp, &tp->t_outcv, true, timo);
+		if (error) {
+			ttyflush(tp, FWRITE);
 			break;
+		}
 	}
 	mutex_spin_exit(&tty_lock);
 
@@ -1559,6 +1562,15 @@ ttywait(struct tty *tp)
 }
 
 /*
+ * Wait for output to drain.
+ */
+int
+ttywait(struct tty *tp)
+{
+	return ttywait_timo(tp, 0);
+}
+
+/*
  * Flush if successfully wait.
  */
 int
@@ -1566,7 +1578,8 @@ ttywflush(struct tty *tp)
 {
 	int	error;
 
-	if ((error = ttywait(tp)) == 0) {
+	error = ttywait_timo(tp, 5 * hz);
+	if (error == 0 || error == EWOULDBLOCK) {
 		mutex_spin_enter(&tty_lock);
 		ttyflush(tp, FREAD);
 		mutex_spin_exit(&tty_lock);



CVS commit: src/usr.bin/tip

2015-06-11 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Thu Jun 11 18:12:00 UTC 2015

Modified Files:
src/usr.bin/tip: tip.c

Log Message:
Don't call exit() from a signal handler, as it's not async-signal-safe;
use _exit() instead.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.bin/tip/tip.c

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/tip/tip.c
diff -u src/usr.bin/tip/tip.c:1.55 src/usr.bin/tip/tip.c:1.56
--- src/usr.bin/tip/tip.c:1.55	Sun Jul 27 04:32:23 2014
+++ src/usr.bin/tip/tip.c	Thu Jun 11 18:12:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tip.c,v 1.55 2014/07/27 04:32:23 dholland Exp $	*/
+/*	$NetBSD: tip.c,v 1.56 2015/06/11 18:12:00 gson Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)tip.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: tip.c,v 1.55 2014/07/27 04:32:23 dholland Exp $");
+__RCSID("$NetBSD: tip.c,v 1.56 2015/06/11 18:12:00 gson Exp $");
 #endif /* not lint */
 
 /*
@@ -264,7 +264,7 @@ cleanup(int dummy __unused)
 
 	if (odisc)
 		(void)ioctl(0, TIOCSETD, &odisc);
-	exit(0);
+	_exit(0);
 }
 
 /*



CVS commit: src/usr.sbin/sysinst

2015-05-01 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Fri May  1 13:48:05 UTC 2015

Modified Files:
src/usr.sbin/sysinst: msg.mi.en

Log Message:
Shorten the message "System configuration files (/etc)" to just
"Configuration files (/etc)" so that it doesn't overflow into the
"Selected" column, overwriting the "Yes" or "No" so that there is
no way to know if the set is selected or not.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/msg.mi.en

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

Modified files:

Index: src/usr.sbin/sysinst/msg.mi.en
diff -u src/usr.sbin/sysinst/msg.mi.en:1.8 src/usr.sbin/sysinst/msg.mi.en:1.9
--- src/usr.sbin/sysinst/msg.mi.en:1.8	Thu Apr 30 06:37:26 2015
+++ src/usr.sbin/sysinst/msg.mi.en	Fri May  1 13:48:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.8 2015/04/30 06:37:26 snj Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.9 2015/05/01 13:48:05 gson Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -712,7 +712,7 @@ message set_base
 {Base}
 
 message set_system
-{System configuration files (/etc)}
+{Configuration files (/etc)}
 
 message set_compiler
 {Compiler tools}



CVS commit: src/sys/dev/usb

2015-01-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 26 20:56:44 UTC 2015

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

Log Message:
Fix URLs of USB audio specs


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/dev/usb/uaudio.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/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.143 src/sys/dev/usb/uaudio.c:1.144
--- src/sys/dev/usb/uaudio.c:1.143	Mon Jan 26 20:37:44 2015
+++ src/sys/dev/usb/uaudio.c	Mon Jan 26 20:56:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.143 2015/01/26 20:37:44 gson Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.144 2015/01/26 20:56:44 gson Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -31,13 +31,13 @@
  */
 
 /*
- * USB audio specs: http://www.usb.org/developers/devclass_docs/audio10.pdf
- *  http://www.usb.org/developers/devclass_docs/frmts10.pdf
- *  http://www.usb.org/developers/devclass_docs/termt10.pdf
+ * USB audio specs: http://www.usb.org/developers/docs/devclass_docs/audio10.pdf
+ *  http://www.usb.org/developers/docs/devclass_docs/frmts10.pdf
+ *  http://www.usb.org/developers/docs/devclass_docs/termt10.pdf
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.143 2015/01/26 20:37:44 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.144 2015/01/26 20:56:44 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"



CVS commit: src/share/man/man4

2015-01-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 26 20:53:49 UTC 2015

Modified Files:
src/share/man/man4: uaudio.4

Log Message:
bump date


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/man/man4/uaudio.4

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

Modified files:

Index: src/share/man/man4/uaudio.4
diff -u src/share/man/man4/uaudio.4:1.27 src/share/man/man4/uaudio.4:1.28
--- src/share/man/man4/uaudio.4:1.27	Mon Jan 26 20:53:12 2015
+++ src/share/man/man4/uaudio.4	Mon Jan 26 20:53:49 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: uaudio.4,v 1.27 2015/01/26 20:53:12 gson Exp $
+.\" $NetBSD: uaudio.4,v 1.28 2015/01/26 20:53:49 gson Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 20, 2011
+.Dd January 26, 2015
 .Dt UAUDIO 4
 .Os
 .Sh NAME



CVS commit: src/share/man/man4

2015-01-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 26 20:53:12 UTC 2015

Modified Files:
src/share/man/man4: uaudio.4

Log Message:
Note that revision 2.0 of the audio device class spec is not supported.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/share/man/man4/uaudio.4

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

Modified files:

Index: src/share/man/man4/uaudio.4
diff -u src/share/man/man4/uaudio.4:1.26 src/share/man/man4/uaudio.4:1.27
--- src/share/man/man4/uaudio.4:1.26	Mon Jan 26 20:41:49 2015
+++ src/share/man/man4/uaudio.4	Mon Jan 26 20:53:12 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: uaudio.4,v 1.26 2015/01/26 20:41:49 gson Exp $
+.\" $NetBSD: uaudio.4,v 1.27 2015/01/26 20:53:12 gson Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -120,6 +120,13 @@ driver
 appeared in
 .Nx 1.5 .
 .Sh BUGS
+Releases 1.0 and 2.0 of the 
+.Tn USB
+Audio class specification are not mutually compatible.
+The
+.Nm
+driver only supports devices compliant with Release 1.0.
+.Pp
 There is no support for multiple-endpoints audio stream,
 adaptive recording, async playback, and TYPE-II/III formats.
 .Pp



CVS commit: src/share/man/man4

2015-01-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 26 20:41:49 UTC 2015

Modified Files:
src/share/man/man4: uaudio.4

Log Message:
Fix URL of USB Approved Class Specification Documents.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/share/man/man4/uaudio.4

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

Modified files:

Index: src/share/man/man4/uaudio.4
diff -u src/share/man/man4/uaudio.4:1.25 src/share/man/man4/uaudio.4:1.26
--- src/share/man/man4/uaudio.4:1.25	Tue Sep 20 19:31:47 2011
+++ src/share/man/man4/uaudio.4	Mon Jan 26 20:41:49 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: uaudio.4,v 1.25 2011/09/20 19:31:47 wiz Exp $
+.\" $NetBSD: uaudio.4,v 1.26 2015/01/26 20:41:49 gson Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -111,7 +111,7 @@ reading.
 .Xr usb 4
 .Rs
 .%T "USB Approved Class Specification Documents"
-.%U http://www.usb.org/developers/devclass_docs/
+.%U http://www.usb.org/developers/docs/devclass_docs/
 .Re
 .Sh HISTORY
 The



CVS commit: src/sys/dev/usb

2015-01-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 26 20:37:44 UTC 2015

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

Log Message:
Don't crash with a division by zero if a bControlSize field is 0.


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/dev/usb/uaudio.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/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.142 src/sys/dev/usb/uaudio.c:1.143
--- src/sys/dev/usb/uaudio.c:1.142	Mon Jan 26 20:32:17 2015
+++ src/sys/dev/usb/uaudio.c	Mon Jan 26 20:37:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.142 2015/01/26 20:32:17 gson Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.143 2015/01/26 20:37:44 gson Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.142 2015/01/26 20:32:17 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.143 2015/01/26 20:37:44 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1122,6 +1122,10 @@ uaudio_add_feature(struct uaudio_softc *
 	d = iot[id].d.fu;
 	ctls = d->bmaControls;
 	ctlsize = d->bControlSize;
+	if (ctlsize == 0) {
+		DPRINTF("ignoring feature %d with controlSize of zero\n", id);
+		return;
+	}
 	nchan = (d->bLength - 7) / ctlsize;
 	mmask = GET(0);
 	/* Figure out what we can control */



CVS commit: src/sys/dev/usb

2015-01-26 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 26 20:32:18 UTC 2015

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

Log Message:
When dumping iot[] contents to the console for debugging, don't crash
if iot[i].output is NULL for some i.  Share code with the dumping of
iot[i].inputs[], which already handled NULLs.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/dev/usb/uaudio.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/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.141 src/sys/dev/usb/uaudio.c:1.142
--- src/sys/dev/usb/uaudio.c:1.141	Mon Jan 26 09:25:08 2015
+++ src/sys/dev/usb/uaudio.c	Mon Jan 26 20:32:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.141 2015/01/26 09:25:08 gson Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.142 2015/01/26 20:32:17 gson Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.141 2015/01/26 09:25:08 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.142 2015/01/26 20:32:17 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -252,6 +252,10 @@ Static const char *uac_names[] = {
 };
 #endif
 
+#ifdef UAUDIO_DEBUG
+Static void uaudio_dump_tml
+	(struct terminal_list *tml);
+#endif
 Static usbd_status uaudio_identify_ac
 	(struct uaudio_softc *, const usb_config_descriptor_t *);
 Static usbd_status uaudio_identify_as
@@ -1872,6 +1876,21 @@ uaudio_identify_as(struct uaudio_softc *
 	return USBD_NORMAL_COMPLETION;
 }
 
+#ifdef UAUDIO_DEBUG
+Static void
+uaudio_dump_tml(struct terminal_list *tml) {
+	if (tml == NULL) {
+		printf("NULL");
+	} else {
+int i;
+		for (i = 0; i < tml->size; i++)
+			printf("%s ", uaudio_get_terminal_name
+			   (tml->terminals[i]));
+	}
+	printf("\n");
+}
+#endif
+
 Static usbd_status
 uaudio_identify_ac(struct uaudio_softc *sc, const usb_config_descriptor_t *cdesc)
 {
@@ -2015,23 +2034,11 @@ uaudio_identify_ac(struct uaudio_softc *
   iot[i].d.desc->bDescriptorSubtype);
 		}
 		for (j = 0; j < iot[i].inputs_size; j++) {
-			int k;
 			printf("\tinput%d: ", j);
-			tml = iot[i].inputs[j];
-			if (tml == NULL) {
-printf("NULL\n");
-continue;
-			}
-			for (k = 0; k < tml->size; k++)
-printf("%s ", uaudio_get_terminal_name
-	  (tml->terminals[k]));
-			printf("\n");
+			uaudio_dump_tml(iot[i].inputs[j]);
 		}
 		printf("\toutput: ");
-		tml = iot[i].output;
-		for (j = 0; j < tml->size; j++)
-			printf("%s ", uaudio_get_terminal_name(tml->terminals[j]));
-		printf("\n");
+		uaudio_dump_tml(iot[i].output);
 	}
 #endif
 



  1   2   >