diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2025-08-11 14:10:17 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2025-08-11 14:10:17 +0200 |
| commit | d18c9eadf0f3fa5a7ca67e360c43aaf2e7d12f1c (patch) | |
| tree | 7762b7e81696be8503a57069d8e28d5e164dd051 /shell | |
| parent | e660eab45867748ccf9dd8d5ddbdb5815381d4a7 (diff) | |
| download | busybox-w32-d18c9eadf0f3fa5a7ca67e360c43aaf2e7d12f1c.tar.gz busybox-w32-d18c9eadf0f3fa5a7ca67e360c43aaf2e7d12f1c.tar.bz2 busybox-w32-d18c9eadf0f3fa5a7ca67e360c43aaf2e7d12f1c.zip | |
shells: testcase: add another test for EINTR on fifo open
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash_test/ash-redir/redir_EINTR2.right | 2 | ||||
| -rwxr-xr-x | shell/ash_test/ash-redir/redir_EINTR2.tests | 14 | ||||
| -rw-r--r-- | shell/hush_test/hush-redir/redir_EINTR2.right | 2 | ||||
| -rwxr-xr-x | shell/hush_test/hush-redir/redir_EINTR2.tests | 14 |
4 files changed, 32 insertions, 0 deletions
diff --git a/shell/ash_test/ash-redir/redir_EINTR2.right b/shell/ash_test/ash-redir/redir_EINTR2.right new file mode 100644 index 000000000..287d91f67 --- /dev/null +++ b/shell/ash_test/ash-redir/redir_EINTR2.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Hello | ||
| 2 | Done:0 | ||
diff --git a/shell/ash_test/ash-redir/redir_EINTR2.tests b/shell/ash_test/ash-redir/redir_EINTR2.tests new file mode 100755 index 000000000..3d343c7ea --- /dev/null +++ b/shell/ash_test/ash-redir/redir_EINTR2.tests | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | rm -f test.fifo | ||
| 2 | mkfifo test.fifo | ||
| 3 | |||
| 4 | (sleep 1; kill -chld $$) & | ||
| 5 | (sleep 2; echo Hello >test.fifo) & | ||
| 6 | |||
| 7 | # We get open("test.fifo") interrupted by SIGCHLD from the first subshell. | ||
| 8 | # The shell MUST retry the open (no printing of error messages). | ||
| 9 | # Then, the second subshell opens fifo for writing and open unblocks and succeeds. | ||
| 10 | read HELLO <test.fifo | ||
| 11 | echo "$HELLO" | ||
| 12 | |||
| 13 | echo "Done:$?" | ||
| 14 | rm -f test.fifo | ||
diff --git a/shell/hush_test/hush-redir/redir_EINTR2.right b/shell/hush_test/hush-redir/redir_EINTR2.right new file mode 100644 index 000000000..287d91f67 --- /dev/null +++ b/shell/hush_test/hush-redir/redir_EINTR2.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Hello | ||
| 2 | Done:0 | ||
diff --git a/shell/hush_test/hush-redir/redir_EINTR2.tests b/shell/hush_test/hush-redir/redir_EINTR2.tests new file mode 100755 index 000000000..3d343c7ea --- /dev/null +++ b/shell/hush_test/hush-redir/redir_EINTR2.tests | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | rm -f test.fifo | ||
| 2 | mkfifo test.fifo | ||
| 3 | |||
| 4 | (sleep 1; kill -chld $$) & | ||
| 5 | (sleep 2; echo Hello >test.fifo) & | ||
| 6 | |||
| 7 | # We get open("test.fifo") interrupted by SIGCHLD from the first subshell. | ||
| 8 | # The shell MUST retry the open (no printing of error messages). | ||
| 9 | # Then, the second subshell opens fifo for writing and open unblocks and succeeds. | ||
| 10 | read HELLO <test.fifo | ||
| 11 | echo "$HELLO" | ||
| 12 | |||
| 13 | echo "Done:$?" | ||
| 14 | rm -f test.fifo | ||
