Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2014 13:30:08 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r264457 - in stable/10: sys/net tools/regression/lib/libc/net tools/regression/lib/libc/string tools/regression/priv tools/regression/sbin/mdconfig tools/regression/usr.bin/lastcomm too...
Message-ID:  <201404141330.s3EDU8JH047639@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv
Date: Mon Apr 14 13:30:08 2014
New Revision: 264457
URL: http://svnweb.freebsd.org/changeset/base/264457

Log:
  MFC various fixes to the tools/regression/ tests.
  
  - r262953 Fix m4 tests so that they run cleanly with prove.
  - r262954 Fix printf tests so that they run cleanly with prove.
  - r262959 Fix sed tests so that they run cleanly with prove.
  - r262960 Fix yacc tests so that they run cleanly with prove.
  - r262961 Fix pkill tests so that they run cleanly with prove.
  - r262962 Fix ncal tests so that they run cleanly with prove.
  - r263081 Fix lastcomm tests under amd64.
  - r263082 Only run the make tests when make is fmake.
  - r263083 Fix sa tests.
  - r263084 Turn a test precondition into a skip in the mdconfig tests.
  - r263085 Make the strerror tests work without libtap.
  - r263087 Remove broken tests for eui64_line.
  - r263221 Change etcupdate tests to return 1 on test failures.
  - r263352 Make the priv test program exit with non-zero if any failures are detected.
  - r263353 errx prepends the program name to the message; don't do it by hand.
  - r263362 Include strings.h so that bpf_filter.c can be built in userland.

Deleted:
  stable/10/tools/regression/lib/libc/net/test-eui64_line.c
  stable/10/tools/regression/lib/libc/net/test-eui64_line.t
Modified:
  stable/10/sys/net/bpf_filter.c
  stable/10/tools/regression/lib/libc/net/Makefile
  stable/10/tools/regression/lib/libc/string/Makefile
  stable/10/tools/regression/lib/libc/string/test-strerror.c
  stable/10/tools/regression/priv/main.c
  stable/10/tools/regression/sbin/mdconfig/00.t
  stable/10/tools/regression/usr.bin/lastcomm/regress.t
  stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out
  stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out
  stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out
  stable/10/tools/regression/usr.bin/m4/regress.sh
  stable/10/tools/regression/usr.bin/m4/regress.t
  stable/10/tools/regression/usr.bin/make/common.sh
  stable/10/tools/regression/usr.bin/ncal/regress.sh
  stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t
  stable/10/tools/regression/usr.bin/printf/regress.sh
  stable/10/tools/regression/usr.bin/sed/regress.sh
  stable/10/tools/regression/usr.bin/yacc/regress.00.out
  stable/10/tools/regression/usr.bin/yacc/regress.01.out
  stable/10/tools/regression/usr.bin/yacc/regress.02.out
  stable/10/tools/regression/usr.bin/yacc/regress.03.out
  stable/10/tools/regression/usr.bin/yacc/regress.04.out
  stable/10/tools/regression/usr.bin/yacc/regress.05.out
  stable/10/tools/regression/usr.bin/yacc/regress.06.out
  stable/10/tools/regression/usr.bin/yacc/regress.07.out
  stable/10/tools/regression/usr.bin/yacc/regress.08.out
  stable/10/tools/regression/usr.bin/yacc/regress.09.out
  stable/10/tools/regression/usr.bin/yacc/regress.10.out
  stable/10/tools/regression/usr.bin/yacc/regress.11.out
  stable/10/tools/regression/usr.bin/yacc/regress.12.out
  stable/10/tools/regression/usr.bin/yacc/regress.13.out
  stable/10/tools/regression/usr.bin/yacc/regress.14.out
  stable/10/tools/regression/usr.bin/yacc/regress.sh
  stable/10/tools/regression/usr.sbin/etcupdate/always.sh
  stable/10/tools/regression/usr.sbin/etcupdate/conflicts.sh
  stable/10/tools/regression/usr.sbin/etcupdate/fbsdid.sh
  stable/10/tools/regression/usr.sbin/etcupdate/ignore.sh
  stable/10/tools/regression/usr.sbin/etcupdate/preworld.sh
  stable/10/tools/regression/usr.sbin/etcupdate/tests.sh
  stable/10/tools/regression/usr.sbin/etcupdate/tzsetup.sh
  stable/10/tools/regression/usr.sbin/sa/regress.t
  stable/10/tools/regression/usr.sbin/sa/v1-amd64-sav.out
  stable/10/tools/regression/usr.sbin/sa/v1-amd64-u.out
  stable/10/tools/regression/usr.sbin/sa/v1-amd64-usr.out
  stable/10/tools/regression/usr.sbin/sa/v1-i386-sav.out
  stable/10/tools/regression/usr.sbin/sa/v1-i386-u.out
  stable/10/tools/regression/usr.sbin/sa/v1-i386-usr.out
  stable/10/tools/regression/usr.sbin/sa/v1-sparc64-sav.out
  stable/10/tools/regression/usr.sbin/sa/v1-sparc64-u.out
  stable/10/tools/regression/usr.sbin/sa/v1-sparc64-usr.out
  stable/10/tools/regression/usr.sbin/sa/v2-amd64-u.out
  stable/10/tools/regression/usr.sbin/sa/v2-i386-u.out
  stable/10/tools/regression/usr.sbin/sa/v2-sparc64-u.out
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/bpf_filter.c
==============================================================================
--- stable/10/sys/net/bpf_filter.c	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/sys/net/bpf_filter.c	Mon Apr 14 13:30:08 2014	(r264457)
@@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 
+#if !defined(_KERNEL)
+#include <strings.h>
+#endif
 #if !defined(_KERNEL) || defined(sun)
 #include <netinet/in.h>
 #endif

Modified: stable/10/tools/regression/lib/libc/net/Makefile
==============================================================================
--- stable/10/tools/regression/lib/libc/net/Makefile	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/lib/libc/net/Makefile	Mon Apr 14 13:30:08 2014	(r264457)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-TESTS=	test-ether test-eui64_aton test-eui64_line test-eui64_ntoa
+TESTS=	test-ether test-eui64_aton test-eui64_ntoa
 CFLAGS+= -g -Wall
 
 .PHONY: tests

Modified: stable/10/tools/regression/lib/libc/string/Makefile
==============================================================================
--- stable/10/tools/regression/lib/libc/string/Makefile	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/lib/libc/string/Makefile	Mon Apr 14 13:30:08 2014	(r264457)
@@ -1,9 +1,5 @@
 # $FreeBSD$
 
-CFLAGS+=	-I/usr/local/include 
-LDFLAGS+=	-L/usr/local/lib
-LDLIBS=		-ltap
-
 TESTS=	test-stpncpy test-strerror test-wcscasecmp test-wcsnlen
 
 .PHONY: tests

Modified: stable/10/tools/regression/lib/libc/string/test-strerror.c
==============================================================================
--- stable/10/tools/regression/lib/libc/string/test-strerror.c	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/lib/libc/string/test-strerror.c	Mon Apr 14 13:30:08 2014	(r264457)
@@ -33,7 +33,19 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <tap.h>
+static int test_count = 1;
+static int exit_status = EXIT_SUCCESS;
+
+#define CHECK(x) \
+	do { \
+		if (x) { \
+			printf("ok %d\n", test_count); \
+		} else { \
+			printf("not ok %d # %s\n", test_count, #x); \
+			exit_status = EXIT_FAILURE; \
+		} \
+		++test_count; \
+	} while (0)
 
 int
 main(void)
@@ -42,7 +54,7 @@ main(void)
 	char *sret;
 	int iret;
 
-	plan_tests(27);
+	printf("1..27\n");
 
 	/*
 	 * strerror() failure tests.
@@ -50,86 +62,86 @@ main(void)
 	errno = 0;
 	sret = strerror(INT_MAX);
 	snprintf(buf, sizeof(buf), "Unknown error: %d", INT_MAX);
-	ok1(strcmp(sret, buf) == 0);
-	ok1(errno == EINVAL);
+	CHECK(strcmp(sret, buf) == 0);
+	CHECK(errno == EINVAL);
 
 	/*
 	 * strerror() success tests.
 	 */
 	errno = 0;
 	sret = strerror(0);
-	ok1(strcmp(sret, "No error: 0") == 0);
-	ok1(errno == 0);
+	CHECK(strcmp(sret, "No error: 0") == 0);
+	CHECK(errno == 0);
 
 	errno = 0;
 	sret = strerror(EPERM);
-	ok1(strcmp(sret, "Operation not permitted") == 0);
-	ok1(errno == 0);
+	CHECK(strcmp(sret, "Operation not permitted") == 0);
+	CHECK(errno == 0);
 
 	errno = 0;
 	sret = strerror(EPFNOSUPPORT);
-	ok1(strcmp(sret, "Protocol family not supported") == 0);
-	ok1(errno == 0);
+	CHECK(strcmp(sret, "Protocol family not supported") == 0);
+	CHECK(errno == 0);
 
 	errno = 0;
 	sret = strerror(ELAST);
-	ok1(errno == 0);
+	CHECK(errno == 0);
 
 	/*
 	 * strerror_r() failure tests.
 	 */
 	memset(buf, '*', sizeof(buf));
 	iret = strerror_r(-1, buf, sizeof(buf));
-	ok1(strcmp(buf, "Unknown error: -1") == 0);
-	ok1(iret == EINVAL);
+	CHECK(strcmp(buf, "Unknown error: -1") == 0);
+	CHECK(iret == EINVAL);
 
 	memset(buf, '*', sizeof(buf));
 	/* One byte too short. */
 	iret = strerror_r(EPERM, buf, strlen("Operation not permitted"));
-	ok1(strcmp(buf, "Operation not permitte") == 0);
-	ok1(iret == ERANGE);
+	CHECK(strcmp(buf, "Operation not permitte") == 0);
+	CHECK(iret == ERANGE);
 
 	memset(buf, '*', sizeof(buf));
 	/* One byte too short. */
 	iret = strerror_r(-1, buf, strlen("Unknown error: -1"));
-	ok1(strcmp(buf, "Unknown error: -") == 0);
-	ok1(iret == EINVAL);
+	CHECK(strcmp(buf, "Unknown error: -") == 0);
+	CHECK(iret == EINVAL);
 
 	memset(buf, '*', sizeof(buf));
 	/* Two bytes too short. */
 	iret = strerror_r(-2, buf, strlen("Unknown error: -2") - 1);
-	ok1(strcmp(buf, "Unknown error: ") == 0);
-	ok1(iret == EINVAL);
+	CHECK(strcmp(buf, "Unknown error: ") == 0);
+	CHECK(iret == EINVAL);
 
 	memset(buf, '*', sizeof(buf));
 	/* Three bytes too short. */
 	iret = strerror_r(-2, buf, strlen("Unknown error: -2") - 2);
-	ok1(strcmp(buf, "Unknown error:") == 0);
-	ok1(iret == EINVAL);
+	CHECK(strcmp(buf, "Unknown error:") == 0);
+	CHECK(iret == EINVAL);
 
 	memset(buf, '*', sizeof(buf));
 	/* One byte too short. */
 	iret = strerror_r(12345, buf, strlen("Unknown error: 12345"));
-	ok1(strcmp(buf, "Unknown error: 1234") == 0);
-	ok1(iret == EINVAL);
+	CHECK(strcmp(buf, "Unknown error: 1234") == 0);
+	CHECK(iret == EINVAL);
 
 	/*
 	 * strerror_r() success tests.
 	 */
 	memset(buf, '*', sizeof(buf));
 	iret = strerror_r(0, buf, sizeof(buf));
-	ok1(strcmp(buf, "No error: 0") == 0);
-	ok1(iret == 0);
+	CHECK(strcmp(buf, "No error: 0") == 0);
+	CHECK(iret == 0);
 
 	memset(buf, '*', sizeof(buf));
 	iret = strerror_r(EDEADLK, buf, sizeof(buf));
-	ok1(strcmp(buf, "Resource deadlock avoided") == 0);
-	ok1(iret == 0);
+	CHECK(strcmp(buf, "Resource deadlock avoided") == 0);
+	CHECK(iret == 0);
 
 	memset(buf, '*', sizeof(buf));
 	iret = strerror_r(EPROCLIM, buf, sizeof(buf));
-	ok1(strcmp(buf, "Too many processes") == 0);
-	ok1(iret == 0);
+	CHECK(strcmp(buf, "Too many processes") == 0);
+	CHECK(iret == 0);
 
-	return exit_status();
+	return exit_status;
 }

Modified: stable/10/tools/regression/priv/main.c
==============================================================================
--- stable/10/tools/regression/priv/main.c	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/priv/main.c	Mon Apr 14 13:30:08 2014	(r264457)
@@ -53,6 +53,16 @@
 #include "main.h"
 
 /*
+ * If true, some test or preparatory step failed along the execution of this
+ * program.
+ *
+ * Intuitively, we would define a counter instead of a boolean.  However,
+ * we fork to run the subtests and keeping proper track of the number of
+ * failed tests would be tricky and not provide any real value.
+ */
+static int something_failed = 0;
+
+/*
  * Registration table of privilege tests.  Each test registers a name, a test
  * function, and a cleanup function to run after the test has completed,
  * regardless of success/failure.
@@ -358,13 +368,18 @@ expect(const char *test, int error, int 
 {
 
 	if (error == 0) {
-		if (expected_error != 0)
+		if (expected_error != 0) {
+			something_failed = 1;
 			warnx("%s: returned 0", test);
+		}
 	} else {
-		if (expected_error == 0)
+		if (expected_error == 0) {
+			something_failed = 1;
 			warn("%s: returned (%d, %d)", test, error, errno);
-		else if (expected_errno != errno)
+		} else if (expected_errno != errno) {
+			something_failed = 1;
 			warn("%s: returned (%d, %d)", test, error, errno);
+		}
 	}
 }
 
@@ -488,14 +503,24 @@ run(struct test *test, int asroot, int i
 		run_child(test, asroot, injail);
 		fflush(stdout);
 		fflush(stderr);
-		exit(0);
+		exit(something_failed ? EXIT_FAILURE : EXIT_SUCCESS);
 	} else {
 		while (1) {
-			pid = waitpid(childpid, NULL, 0);
-			if (pid == -1)
+			int status;
+			pid = waitpid(childpid, &status, 0);
+			if (pid == -1) {
+				something_failed = 1;
 				warn("test: waitpid %s", test->t_name);
-			if (pid == childpid)
+			}
+			if (pid == childpid) {
+				if (WIFEXITED(status) &&
+				    WEXITSTATUS(status) == EXIT_SUCCESS) {
+					/* All good in the subprocess! */
+				} else {
+					something_failed = 1;
+				}
 				break;
+			}
 		}
 	}
 	fflush(stdout);
@@ -518,7 +543,7 @@ main(int argc, char *argv[])
 	 * force the use of privilege, and will likely need checking.
 	 */
 	if (getuid() != 0 && geteuid() != 0)
-		errx(-1, "priv: must be run as root");
+		errx(-1, "must be run as root");
 
 	/*
 	 * Run each test four times, varying whether the process is running
@@ -530,5 +555,5 @@ main(int argc, char *argv[])
 		run(&tests[i], 1, 0);
 		run(&tests[i], 1, 1);
 	}
-	return (0);
+	return (something_failed ? EXIT_FAILURE : EXIT_SUCCESS);
 }

Modified: stable/10/tools/regression/sbin/mdconfig/00.t
==============================================================================
--- stable/10/tools/regression/sbin/mdconfig/00.t	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/sbin/mdconfig/00.t	Mon Apr 14 13:30:08 2014	(r264457)
@@ -32,8 +32,8 @@
 echo "1..1"
 
 if [ `whoami` != "root" ]; then
-	echo "not ok 1 - you need to be root to run this test."
-	exit 1
+	echo "ok 1 # skip You need to be root to run this test."
+	exit 0
 fi
 
 TESTDIR=$(dirname $(realpath $0))

Modified: stable/10/tools/regression/usr.bin/lastcomm/regress.t
==============================================================================
--- stable/10/tools/regression/usr.bin/lastcomm/regress.t	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/lastcomm/regress.t	Mon Apr 14 13:30:08 2014	(r264457)
@@ -6,6 +6,8 @@
 DIR=`dirname $0`
 ARCH=`uname -m`
 
+TZ=UTC; export TZ
+
 check()
 {
 	NUM=$1

Modified: stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out
==============================================================================
--- stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/lastcomm/v1-amd64.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -1,28 +1,28 @@
-core -FDX root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-core -DX root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-cc - root  0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 06:44
-ld - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-as - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-cc1 - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time -F root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-ln - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time -F root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-ln - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time -F root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-ln - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 0.234 es Wed May 16 06:44
-diff - root  0.203 secs 0.203 us 0.000 sy 0.234 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 06:44
-dd - root  0.016 secs 0.000 us 0.016 sy 0.016 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 3.016 es Wed May 16 06:44
-sleep - root  0.000 secs 0.000 us 0.000 sy 3.000 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 1.938 es Wed May 16 06:44
-find - root  0.250 secs 0.031 us 0.219 sy 1.938 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 3.062 es Wed May 16 06:44
-egrep - root  3.031 secs 3.031 us 0.000 sy 3.062 es Wed May 16 06:44
-time - root  0.000 secs 0.000 us 0.000 sy 0.188 es Wed May 16 06:44
-awk - root  0.172 secs 0.172 us 0.000 sy 0.188 es Wed May 16 06:44
-accton - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 06:44
+core -FDX root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+core -DX root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+cc - root  0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44
+ld - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+as - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+cc1 - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time -F root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+ln - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time -F root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+ln - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time -F root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+ln - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 0.234 es Wed May 16 11:44
+diff - root  0.203 secs 0.203 us 0.000 sy 0.234 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 0.016 es Wed May 16 11:44
+dd - root  0.016 secs 0.000 us 0.016 sy 0.016 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 3.016 es Wed May 16 11:44
+sleep - root  0.000 secs 0.000 us 0.000 sy 3.000 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 1.938 es Wed May 16 11:44
+find - root  0.250 secs 0.031 us 0.219 sy 1.938 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 3.062 es Wed May 16 11:44
+egrep - root  3.031 secs 3.031 us 0.000 sy 3.062 es Wed May 16 11:44
+time - root  0.000 secs 0.000 us 0.000 sy 0.188 es Wed May 16 11:44
+awk - root  0.172 secs 0.172 us 0.000 sy 0.188 es Wed May 16 11:44
+accton - root  0.000 secs 0.000 us 0.000 sy 0.000 es Wed May 16 11:44

Modified: stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out
==============================================================================
--- stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/lastcomm/v2-amd64.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -1,28 +1,28 @@
-core -FDX root  0.002 secs 0.000 us 0.002 sy 0.009 es Thu May 17 00:57
-core -DX root  0.005 secs 0.000 us 0.005 sy 0.010 es Thu May 17 00:57
-cc - root  0.005 secs 0.000 us 0.005 sy 0.652 es Thu May 17 00:57
-ld - root  0.014 secs 0.005 us 0.009 sy 0.150 es Thu May 17 00:57
-as - root  0.005 secs 0.000 us 0.005 sy 0.078 es Thu May 17 00:57
-cc1 - root  0.024 secs 0.008 us 0.016 sy 0.347 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 00:57
-1234567890123456 - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57
-ln - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 00:57
-1234567890123456 - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57
-ln - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 0.013 es Thu May 17 00:57
-123456789012345 - root  0.002 secs 0.000 us 0.002 sy 0.010 es Thu May 17 00:57
-ln - root  0.003 secs 0.000 us 0.003 sy 0.003 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 0.246 es Thu May 17 00:57
-diff - root  0.223 secs 0.164 us 0.060 sy 0.243 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 0.079 es Thu May 17 00:57
-dd - root  0.076 secs 0.000 us 0.076 sy 0.076 es Thu May 17 00:57
-time - root  0.004 secs 0.000 us 0.004 sy 3.006 es Thu May 17 00:57
-sleep - root  0.002 secs 0.000 us 0.002 sy 3.002 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 9.945 es Thu May 17 00:57
-find - root  0.822 secs 0.055 us 0.767 sy 9.942 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 3.313 es Thu May 17 00:57
-egrep - root  3.247 secs 3.247 us 0.000 sy 3.310 es Thu May 17 00:57
-time - root  0.003 secs 0.000 us 0.003 sy 0.185 es Thu May 17 00:57
-awk - root  0.163 secs 0.156 us 0.007 sy 0.164 es Thu May 17 00:57
-accton - root  0.002 secs 0.000 us 0.002 sy 0.019 es Thu May 17 00:57
+core -FDX root  0.002 secs 0.000 us 0.002 sy 0.009 es Thu May 17 05:57
+core -DX root  0.005 secs 0.000 us 0.005 sy 0.010 es Thu May 17 05:57
+cc - root  0.005 secs 0.000 us 0.005 sy 0.652 es Thu May 17 05:57
+ld - root  0.014 secs 0.005 us 0.009 sy 0.150 es Thu May 17 05:57
+as - root  0.005 secs 0.000 us 0.005 sy 0.078 es Thu May 17 05:57
+cc1 - root  0.024 secs 0.008 us 0.016 sy 0.347 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57
+1234567890123456 - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57
+ln - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 0.005 es Thu May 17 05:57
+1234567890123456 - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57
+ln - root  0.002 secs 0.000 us 0.002 sy 0.002 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 0.013 es Thu May 17 05:57
+123456789012345 - root  0.002 secs 0.000 us 0.002 sy 0.010 es Thu May 17 05:57
+ln - root  0.003 secs 0.000 us 0.003 sy 0.003 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 0.246 es Thu May 17 05:57
+diff - root  0.223 secs 0.164 us 0.060 sy 0.243 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 0.079 es Thu May 17 05:57
+dd - root  0.076 secs 0.000 us 0.076 sy 0.076 es Thu May 17 05:57
+time - root  0.004 secs 0.000 us 0.004 sy 3.006 es Thu May 17 05:57
+sleep - root  0.002 secs 0.000 us 0.002 sy 3.002 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 9.945 es Thu May 17 05:57
+find - root  0.822 secs 0.055 us 0.767 sy 9.942 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 3.313 es Thu May 17 05:57
+egrep - root  3.247 secs 3.247 us 0.000 sy 3.310 es Thu May 17 05:57
+time - root  0.003 secs 0.000 us 0.003 sy 0.185 es Thu May 17 05:57
+awk - root  0.163 secs 0.156 us 0.007 sy 0.164 es Thu May 17 05:57
+accton - root  0.002 secs 0.000 us 0.002 sy 0.019 es Thu May 17 05:57

Modified: stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out
==============================================================================
--- stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/m4/regress.gnusofterror.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -1 +1,2 @@
+m4: gnusofterror.m4 at line 3: include(hey I do not exit): No such file or directory
 abc

Modified: stable/10/tools/regression/usr.bin/m4/regress.sh
==============================================================================
--- stable/10/tools/regression/usr.bin/m4/regress.sh	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/m4/regress.sh	Mon Apr 14 13:30:08 2014	(r264457)
@@ -2,7 +2,7 @@
 
 LC_ALL=C; export LC_ALL
 
-echo 1..22
+echo 1..21
 
 REGRESSION_START($1)
 
@@ -17,7 +17,7 @@ REGRESSION_TEST(`gnuformat', `m4 -g gnuf
 REGRESSION_TEST(`gnupatterns', `m4 -g gnupatterns.m4')
 REGRESSION_TEST(`gnupatterns2', `m4 -g gnupatterns2.m4')
 REGRESSION_TEST(`gnuprefix', `m4 -P gnuprefix.m4 2>&1')
-REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4')
+REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4 2>&1')
 REGRESSION_TEST(`gnutranslit2', `m4 -g translit2.m4')
 REGRESSION_TEST(`includes', `m4 -I. includes.m4')
 REGRESSION_TEST(`m4wrap3', `m4 m4wrap3.m4')

Modified: stable/10/tools/regression/usr.bin/m4/regress.t
==============================================================================
--- stable/10/tools/regression/usr.bin/m4/regress.t	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/m4/regress.t	Mon Apr 14 13:30:08 2014	(r264457)
@@ -3,4 +3,4 @@
 
 cd `dirname $0`
 
-sh regress.sh
+m4 ../regress.m4 regress.sh | sh

Modified: stable/10/tools/regression/usr.bin/make/common.sh
==============================================================================
--- stable/10/tools/regression/usr.bin/make/common.sh	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/make/common.sh	Mon Apr 14 13:30:08 2014	(r264457)
@@ -13,6 +13,13 @@ fatal()
 	exit 1
 }
 
+make_is_fmake() {
+	# This test is not very reliable but works for now: the old fmake
+	# does have a -v option while bmake doesn't.
+	${MAKE_PROG} -f Makefile.non-existent -v 2>&1 | \
+	    grep -q "cannot open.*non-existent"
+}
+
 #
 # Check whether the working directory exists - it must.
 #
@@ -322,19 +329,25 @@ eval_compare()
 	while [ ${N} -le ${TEST_N} ] ; do
 		fail=
 		todo=
+		skip=
 		if ! skip_test ${N} ; then
 			do_compare stdout ${N} || fail="${fail}stdout "
 			do_compare stderr ${N} || fail="${fail}stderr "
 			do_compare status ${N} || fail="${fail}status "
 			eval todo=\${TEST_${N}_TODO}
+		else
+			eval skip=\${TEST_${N}_SKIP}
 		fi
 		if [ ! -z "$fail" ]; then
 			echo -n "not "
 		fi
 		echo -n "ok ${N} ${SUBDIR}/${N}"
-		if [ ! -z "$fail" -o ! -z "$todo" ]; then
+		if [ ! -z "$fail" -o ! -z "$todo" -o ! -z "$skip" ]; then
 			echo -n " # "
 		fi
+		if [ ! -z "$skip" ] ; then
+			echo -n "skip $skip; "
+		fi
 		if [ ! -z "$todo" ] ; then
 			echo -n "TODO $todo; "
 		fi
@@ -473,6 +486,12 @@ eval_cmd()
 		set -- prove
 	fi
 
+	if ! make_is_fmake ; then
+		for i in $(jot ${TEST_N:-1}) ; do
+			eval TEST_${i}_SKIP=\"make is not fmake\"
+		done
+	fi
+
 	for i
 	do
 		case $i in

Modified: stable/10/tools/regression/usr.bin/ncal/regress.sh
==============================================================================
--- stable/10/tools/regression/usr.bin/ncal/regress.sh	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/ncal/regress.sh	Mon Apr 14 13:30:08 2014	(r264457)
@@ -6,6 +6,8 @@ NCAL="${CAL_BIN} -N"
 YEARS="2008 2009 2010 2011"
 ONEYEAR="2009"
 
+echo 1..89
+
 REGRESSION_START($1)
 
 #
@@ -15,8 +17,6 @@ REGRESSION_START($1)
 
 # Full year calendars
 
-echo 1..16
-
 for y in ${YEARS}; do
 	# Regular calendar, Month days, No-highlight
 	REGRESSION_TEST(`r-y${y}-md-nhl', `$NCAL -h ${y}')
@@ -30,8 +30,6 @@ done
 
 # 3 month calendars
 
-echo 17 .. 29
-
 for m in $(jot -w %02d 12); do
 	# Regular calendar, Month days, No-highlight
 	REGRESSION_TEST(`r-3m${ONEYEAR}${m}-md-nhl',

Modified: stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t
==============================================================================
--- stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/pkill/pgrep-_s.t	Mon Apr 14 13:30:08 2014	(r264457)
@@ -5,15 +5,17 @@ base=`basename $0`
 
 echo "1..2"
 
+exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')"
+
 name="pgrep -S"
-pid=`pgrep -Sx g_event`
-if [ "$pid" = "2" ]; then
+pid=`pgrep -Sx idle`
+if [ "$pid" = "$exp_pid" ]; then
 	echo "ok 1 - $name"
 else
 	echo "not ok 1 - $name"
 fi
-pid=`pgrep -x g_event`
-if [ "$pid" != "2" ]; then
+pid=`pgrep -x idle`
+if [ "$pid" != "$exp_pid" ]; then
 	echo "ok 2 - $name"
 else
 	echo "not ok 2 - $name"

Modified: stable/10/tools/regression/usr.bin/printf/regress.sh
==============================================================================
--- stable/10/tools/regression/usr.bin/printf/regress.sh	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/printf/regress.sh	Mon Apr 14 13:30:08 2014	(r264457)
@@ -2,7 +2,7 @@
 
 REGRESSION_START($1)
 
-echo '1..12'
+echo '1..15'
 
 REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"')
 REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 123')

Modified: stable/10/tools/regression/usr.bin/sed/regress.sh
==============================================================================
--- stable/10/tools/regression/usr.bin/sed/regress.sh	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/sed/regress.sh	Mon Apr 14 13:30:08 2014	(r264457)
@@ -2,7 +2,7 @@
 
 REGRESSION_START($1)
 
-echo '1..25'
+echo '1..26'
 
 REGRESSION_TEST(`G', `sed G < regress.in')
 REGRESSION_TEST(`P', `sed P < regress.in')

Modified: stable/10/tools/regression/usr.bin/yacc/regress.00.out
==============================================================================
--- stable/10/tools/regression/usr.bin/yacc/regress.00.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/yacc/regress.00.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY        (-1)
 #define yyclearin      (yychar = YYEMPTY)
@@ -77,10 +78,11 @@ static const short yycheck[] = {        
 #define YYDEBUG 0
 #endif
 #define YYMAXTOKEN 0
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
 #if YYDEBUG
 static const char *yyname[] = {
 
-"end-of-file",
+"end-of-file","illegal-symbol",
 };
 static const char *yyrule[] = {
 "$accept : rule",
@@ -105,12 +107,12 @@ YYSTYPE  yylval;
 #ifdef YYMAXDEPTH
 #define YYSTACKSIZE YYMAXDEPTH
 #else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH  500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH  10000
 #endif
 #endif
 
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
 
 typedef struct {
     unsigned stacksize;
@@ -145,7 +147,7 @@ static int yygrowstack(YYSTACKDATA *data
     else if ((newsize *= 2) > YYMAXDEPTH)
         newsize = YYMAXDEPTH;
 
-    i = data->s_mark - data->s_base;
+    i = (int) (data->s_mark - data->s_base);
     newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
     if (newss == 0)
         return -1;
@@ -219,9 +221,7 @@ yyloop:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, reading %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -303,9 +303,7 @@ yyinrecovery:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -348,9 +346,7 @@ yyreduce:
 #if YYDEBUG
             if (yydebug)
             {
-                yys = 0;
-                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-                if (!yys) yys = "illegal-symbol";
+                yys = yyname[YYTRANSLATE(yychar)];
                 printf("%sdebug: state %d, reading %d (%s)\n",
                         YYPREFIX, YYFINAL, yychar, yys);
             }

Modified: stable/10/tools/regression/usr.bin/yacc/regress.01.out
==============================================================================
--- stable/10/tools/regression/usr.bin/yacc/regress.01.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/yacc/regress.01.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY        (-1)
 #define yyclearin      (yychar = YYEMPTY)
@@ -25,7 +26,7 @@ int base;
 extern int yylex(void);
 static void yyerror(const char *s);
 
-#line 28 "/dev/stdout"
+#line 29 "/dev/stdout"
 
 #ifndef YYSTYPE
 typedef int YYSTYPE;
@@ -152,6 +153,7 @@ static const short yycheck[] = {        
 #define YYDEBUG 0
 #endif
 #define YYMAXTOKEN 259
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
 #if YYDEBUG
 static const char *yyname[] = {
 
@@ -162,7 +164,7 @@ static const char *yyname[] = {
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",
+0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol",
 };
 static const char *yyrule[] = {
 "$accept : list",
@@ -204,12 +206,12 @@ YYSTYPE  yylval;
 #ifdef YYMAXDEPTH
 #define YYSTACKSIZE YYMAXDEPTH
 #else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH  500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH  10000
 #endif
 #endif
 
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
 
 typedef struct {
     unsigned stacksize;
@@ -263,7 +265,7 @@ yylex(void)
     }
     return( c );
 }
-#line 266 "/dev/stdout"
+#line 267 "/dev/stdout"
 
 #if YYDEBUG
 #include <stdio.h>		/* needed for printf */
@@ -287,7 +289,7 @@ static int yygrowstack(YYSTACKDATA *data
     else if ((newsize *= 2) > YYMAXDEPTH)
         newsize = YYMAXDEPTH;
 
-    i = data->s_mark - data->s_base;
+    i = (int) (data->s_mark - data->s_base);
     newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
     if (newss == 0)
         return -1;
@@ -361,9 +363,7 @@ yyloop:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, reading %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -445,9 +445,7 @@ yyinrecovery:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -529,7 +527,7 @@ case 18:
 #line 63 "calc.y"
 	{  yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; }
 break;
-#line 532 "/dev/stdout"
+#line 529 "/dev/stdout"
     }
     yystack.s_mark -= yym;
     yystate = *yystack.s_mark;
@@ -551,9 +549,7 @@ break;
 #if YYDEBUG
             if (yydebug)
             {
-                yys = 0;
-                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-                if (!yys) yys = "illegal-symbol";
+                yys = yyname[YYTRANSLATE(yychar)];
                 printf("%sdebug: state %d, reading %d (%s)\n",
                         YYPREFIX, YYFINAL, yychar, yys);
             }

Modified: stable/10/tools/regression/usr.bin/yacc/regress.02.out
==============================================================================
--- stable/10/tools/regression/usr.bin/yacc/regress.02.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/yacc/regress.02.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY        (-1)
 #define yyclearin      (yychar = YYEMPTY)
@@ -55,7 +56,7 @@ typedef union
 	INTERVAL vval;
 } YYSTYPE;
 #endif /* !YYSTYPE_IS_DECLARED */
-#line 58 "/dev/stdout"
+#line 59 "/dev/stdout"
 
 /* compatibility with bison */
 #ifdef YYPARSE_PARAM
@@ -192,6 +193,7 @@ static const short yycheck[] = {        
 #define YYDEBUG 0
 #endif
 #define YYMAXTOKEN 260
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
 #if YYDEBUG
 static const char *yyname[] = {
 
@@ -202,7 +204,7 @@ static const char *yyname[] = {
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,"DREG","VREG","CONST","UMINUS",
+0,0,"DREG","VREG","CONST","UMINUS","illegal-symbol",
 };
 static const char *yyrule[] = {
 "$accept : line",
@@ -254,12 +256,12 @@ YYSTYPE  yylval;
 #ifdef YYMAXDEPTH
 #define YYSTACKSIZE YYMAXDEPTH
 #else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH  500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH  10000
 #endif
 #endif
 
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
 
 typedef struct {
     unsigned stacksize;
@@ -402,7 +404,7 @@ vdiv(double a, double b, INTERVAL v)
 {
     return (hilo(a / v.hi, a / v.lo, b / v.hi, b / v.lo));
 }
-#line 405 "/dev/stdout"
+#line 406 "/dev/stdout"
 
 #if YYDEBUG
 #include <stdio.h>		/* needed for printf */
@@ -426,7 +428,7 @@ static int yygrowstack(YYSTACKDATA *data
     else if ((newsize *= 2) > YYMAXDEPTH)
         newsize = YYMAXDEPTH;
 
-    i = data->s_mark - data->s_base;
+    i = (int) (data->s_mark - data->s_base);
     newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
     if (newss == 0)
         return -1;
@@ -500,9 +502,7 @@ yyloop:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, reading %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -584,9 +584,7 @@ yyinrecovery:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -771,7 +769,7 @@ case 28:
 		yyval.vval = yystack.l_mark[-1].vval;
 	}
 break;
-#line 774 "/dev/stdout"
+#line 771 "/dev/stdout"
     }
     yystack.s_mark -= yym;
     yystate = *yystack.s_mark;
@@ -793,9 +791,7 @@ break;
 #if YYDEBUG
             if (yydebug)
             {
-                yys = 0;
-                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-                if (!yys) yys = "illegal-symbol";
+                yys = yyname[YYTRANSLATE(yychar)];
                 printf("%sdebug: state %d, reading %d (%s)\n",
                         YYPREFIX, YYFINAL, yychar, yys);
             }

Modified: stable/10/tools/regression/usr.bin/yacc/regress.03.out
==============================================================================
--- stable/10/tools/regression/usr.bin/yacc/regress.03.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/yacc/regress.03.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY        (-1)
 #define yyclearin      (yychar = YYEMPTY)
@@ -28,7 +29,7 @@ int YYLEX_DECL();
 static void YYERROR_DECL();
 #endif
 
-#line 31 "/dev/stdout"
+#line 32 "/dev/stdout"
 
 #ifndef YYSTYPE
 typedef int YYSTYPE;
@@ -159,6 +160,7 @@ static const short yycheck[] = {        
 #define YYDEBUG 0
 #endif
 #define YYMAXTOKEN 259
+#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a))
 #if YYDEBUG
 static const char *yyname[] = {
 
@@ -169,7 +171,7 @@ static const char *yyname[] = {
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",
+0,0,0,0,0,0,"DIGIT","LETTER","UMINUS","illegal-symbol",
 };
 static const char *yyrule[] = {
 "$accept : list",
@@ -206,12 +208,12 @@ int      yynerrs;
 #ifdef YYMAXDEPTH
 #define YYSTACKSIZE YYMAXDEPTH
 #else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH  500
+#define YYSTACKSIZE 10000
+#define YYMAXDEPTH  10000
 #endif
 #endif
 
-#define YYINITSTACKSIZE 500
+#define YYINITSTACKSIZE 200
 
 typedef struct {
     unsigned stacksize;
@@ -270,7 +272,7 @@ YYLEX_DECL()
     }
     return( c );
 }
-#line 273 "/dev/stdout"
+#line 274 "/dev/stdout"
 
 #if YYDEBUG
 #include <stdio.h>		/* needed for printf */
@@ -294,7 +296,7 @@ static int yygrowstack(YYSTACKDATA *data
     else if ((newsize *= 2) > YYMAXDEPTH)
         newsize = YYMAXDEPTH;
 
-    i = data->s_mark - data->s_base;
+    i = (int) (data->s_mark - data->s_base);
     newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
     if (newss == 0)
         return -1;
@@ -375,9 +377,7 @@ yyloop:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, reading %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -459,9 +459,7 @@ yyinrecovery:
 #if YYDEBUG
         if (yydebug)
         {
-            yys = 0;
-            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-            if (!yys) yys = "illegal-symbol";
+            yys = yyname[YYTRANSLATE(yychar)];
             printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                     YYPREFIX, yystate, yychar, yys);
         }
@@ -543,7 +541,7 @@ case 18:
 #line 73 "calc3.y"
 	{  yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
 break;
-#line 546 "/dev/stdout"
+#line 543 "/dev/stdout"
     }
     yystack.s_mark -= yym;
     yystate = *yystack.s_mark;
@@ -565,9 +563,7 @@ break;
 #if YYDEBUG
             if (yydebug)
             {
-                yys = 0;
-                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
-                if (!yys) yys = "illegal-symbol";
+                yys = yyname[YYTRANSLATE(yychar)];
                 printf("%sdebug: state %d, reading %d (%s)\n",
                         YYPREFIX, YYFINAL, yychar, yys);
             }

Modified: stable/10/tools/regression/usr.bin/yacc/regress.04.out
==============================================================================
--- stable/10/tools/regression/usr.bin/yacc/regress.04.out	Mon Apr 14 12:49:18 2014	(r264456)
+++ stable/10/tools/regression/usr.bin/yacc/regress.04.out	Mon Apr 14 13:30:08 2014	(r264457)
@@ -5,6 +5,7 @@ static const char yysccsid[] = "@(#)yacc
 #define YYBYACC 1
 #define YYMAJOR 1
 #define YYMINOR 9
+#define YYPATCH 20140101
 
 #define YYEMPTY        (-1)
 #define yyclearin      (yychar = YYEMPTY)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404141330.s3EDU8JH047639>