[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6322] check read -t has no output
From: |
Gavin D. Smith |
Subject: |
[6322] check read -t has no output |
Date: |
Mon, 08 Jun 2015 11:50:27 +0000 |
Revision: 6322
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6322
Author: gavin
Date: 2015-06-08 11:50:25 +0000 (Mon, 08 Jun 2015)
Log Message:
-----------
check read -t has no output
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/t/Timeout-test.inc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-06-07 21:47:16 UTC (rev 6321)
+++ trunk/ChangeLog 2015-06-08 11:50:25 UTC (rev 6322)
@@ -1,3 +1,8 @@
+2015-06-08 Gavin Smith <address@hidden>
+
+ * info/t/Timeout-test.inc: Also check that "time -t 0" produces
+ no output. (Attempt at stopping failures under OpenBSD 5.5.)
+
2015-06-07 Gavin Smith <address@hidden>
* configure.ac (AC_CHECK_HEADERS): Check for stropts.h.
Modified: trunk/info/t/Timeout-test.inc
===================================================================
--- trunk/info/t/Timeout-test.inc 2015-06-07 21:47:16 UTC (rev 6321)
+++ trunk/info/t/Timeout-test.inc 2015-06-08 11:50:25 UTC (rev 6322)
@@ -22,11 +22,23 @@
# should exit the subshell with an error exit status. Under some other
# shells the subshell will not exit but the "read -t" will have an exit
# status of 2, representing a syntax error.
+status=0
(read -t 0 ; test $? != 2 ; exit $?)
if test $? != 0; then
# skip test below
status=2
-else
+fi
+
+# If that succeeded, now check that "read -t 0" has no output, which could
+# be an error message.
+if test $status != 2; then
+ (read -t 0 2>&1 ) | grep .
+ test $? = 0 && status=2
+fi
+# This last test was needed under OpenBSD 5.5, where
+# "read -t 0" has an exit status of 1, not 2
+
+if test $status != 2; then
read -t 3 FINISHED <$FINISHEDFIFO
status=$?
fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6322] check read -t has no output,
Gavin D. Smith <=