From 2de9abc5c9d40b3c716307d67d16146f823fd554 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Tue, 17 Jan 2012 14:43:55 +0000 Subject: add the output of bootstrap --- gnulib | 1 - gnulib/tests/test-select-in.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) delete mode 160000 gnulib create mode 100755 gnulib/tests/test-select-in.sh (limited to 'gnulib/tests/test-select-in.sh') diff --git a/gnulib b/gnulib deleted file mode 160000 index 443bc5f..0000000 --- a/gnulib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 443bc5ffcf7429e557f4a371b0661abe98ddbc13 diff --git a/gnulib/tests/test-select-in.sh b/gnulib/tests/test-select-in.sh new file mode 100755 index 0000000..44f5dbb --- /dev/null +++ b/gnulib/tests/test-select-in.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Test select() on file descriptors opened for reading. + +# This test is known to fail on Solaris 2.6 and older, due to its handling +# of /dev/null. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles t-select-in.tmp" + +# Regular files. + +rm -f t-select-in.tmp +./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT} +test `cat t-select-in.tmp` = "1" || exit 1 + +# Pipes. + +rm -f t-select-in.tmp +{ sleep 1; echo abc; } | \ + { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; } +test `cat t-select-in.tmp` = "0" || exit 1 + +rm -f t-select-in.tmp +echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; } +test `cat t-select-in.tmp` = "1" || exit 1 + +# Special files. +# This part of the test is known to fail on Solaris 2.6 and older. + +rm -f t-select-in.tmp +./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null +test `cat t-select-in.tmp` = "1" || exit 1 + +rm -fr $tmpfiles + +exit 0 -- cgit v1.2.1