summaryrefslogtreecommitdiff
path: root/tests/test-nonblocking-pipe.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-nonblocking-pipe.sh')
-rwxr-xr-xtests/test-nonblocking-pipe.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test-nonblocking-pipe.sh b/tests/test-nonblocking-pipe.sh
new file mode 100755
index 0000000000..dd692be7ee
--- /dev/null
+++ b/tests/test-nonblocking-pipe.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Note: This test fails on Cygwin 1.5.x, because the non-blocking flag has
+# apparently no effect on STDOUT_FILENO. It is fixed in Cygwin 1.7.
+
+# Test blocking write() with blocking read().
+# Commented out because this test succeeds on all platforms anyway.
+#./test-nonblocking-pipe-main${EXEEXT} ./test-nonblocking-pipe-child${EXEEXT} 0 || exit 1
+
+# Test non-blocking write() with blocking read().
+./test-nonblocking-pipe-main${EXEEXT} ./test-nonblocking-pipe-child${EXEEXT} 1 || exit 1
+
+# Test blocking write() with non-blocking read().
+./test-nonblocking-pipe-main${EXEEXT} ./test-nonblocking-pipe-child${EXEEXT} 2 || exit 1
+
+# Test non-blocking write() with non-blocking read().
+./test-nonblocking-pipe-main${EXEEXT} ./test-nonblocking-pipe-child${EXEEXT} 3 || exit 1