svn commit: r215547 - head/tools/regression/bin/sh/builtins

Jilles Tjoelker jilles at FreeBSD.org
Fri Nov 19 21:15:07 UTC 2010


Author: jilles
Date: Fri Nov 19 21:15:06 2010
New Revision: 215547
URL: http://svn.freebsd.org/changeset/base/215547

Log:
  sh: Add another simple test for the wait builtin.

Added:
  head/tools/regression/bin/sh/builtins/wait3.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/wait3.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/wait3.0	Fri Nov 19 21:15:06 2010	(r215547)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+failures=
+failure() {
+	echo "Error at line $1" >&2
+	failures=x$failures
+}
+
+T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
+trap 'rm -rf $T' 0
+cd $T || exit 3
+mkfifo fifo1
+for i in 1 2 3 4 5 6 7 8 9 10; do
+	exit $i 4<fifo1 &
+done
+exec 3>fifo1
+wait || failure $LINENO
+(echo >&3) 2>/dev/null && failure $LINENO
+wait || failure $LINENO
+
+test -z "$failures"


More information about the svn-src-head mailing list