Last change
on this file since 3531 was 3529, checked in by bird, 4 years ago |
Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.
|
-
Property svn:executable
set to
*
|
File size:
932 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | # Test select() on file descriptors opened for writing.
|
---|
3 |
|
---|
4 | tmpfiles=""
|
---|
5 | trap 'rm -fr $tmpfiles' 1 2 3 15
|
---|
6 |
|
---|
7 | tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp"
|
---|
8 |
|
---|
9 | # Regular files.
|
---|
10 |
|
---|
11 | rm -f t-select-out.tmp
|
---|
12 | ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out
|
---|
13 | test `cat t-select-out.tmp` = "1" || exit 1
|
---|
14 |
|
---|
15 | # Pipes.
|
---|
16 |
|
---|
17 | if false; then # This test fails on some platforms.
|
---|
18 | rm -f t-select-out.tmp
|
---|
19 | ( { echo abc; ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null
|
---|
20 | test `cat t-select-out.tmp` = "0" || exit 1
|
---|
21 | fi
|
---|
22 |
|
---|
23 | rm -f t-select-out.tmp
|
---|
24 | ( { sleep 1; echo abc; ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null
|
---|
25 | test `cat t-select-out.tmp` = "1" || exit 1
|
---|
26 |
|
---|
27 | # Special files.
|
---|
28 |
|
---|
29 | rm -f t-select-out.tmp
|
---|
30 | ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null
|
---|
31 | test `cat t-select-out.tmp` = "1" || exit 1
|
---|
32 |
|
---|
33 | rm -fr $tmpfiles
|
---|
34 |
|
---|
35 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.