diff options
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-redir/redir2.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-redir/redir2.tests | 5 | ||||
-rw-r--r-- | shell/ash_test/ash-redir/redir3.right | 3 | ||||
-rwxr-xr-x | shell/ash_test/ash-redir/redir3.tests | 5 | ||||
-rwxr-xr-x | shell/ash_test/run-all | 4 |
5 files changed, 16 insertions, 2 deletions
diff --git a/shell/ash_test/ash-redir/redir2.right b/shell/ash_test/ash-redir/redir2.right new file mode 100644 index 0000000..d86bac9 --- /dev/null +++ b/shell/ash_test/ash-redir/redir2.right @@ -0,0 +1 @@ +OK diff --git a/shell/ash_test/ash-redir/redir2.tests b/shell/ash_test/ash-redir/redir2.tests new file mode 100755 index 0000000..61ccea3 --- /dev/null +++ b/shell/ash_test/ash-redir/redir2.tests @@ -0,0 +1,5 @@ +# ash once couldn't redirect above fd#9 +exec 1>/dev/null +(echo LOST1 >&22) 22>&1 +(echo LOST2 >&22) 22>&1 +(echo OK >&22) 22>&2 diff --git a/shell/ash_test/ash-redir/redir3.right b/shell/ash_test/ash-redir/redir3.right new file mode 100644 index 0000000..fd641a8 --- /dev/null +++ b/shell/ash_test/ash-redir/redir3.right @@ -0,0 +1,3 @@ +TEST +./redir3.tests: line 4: 9: Bad file descriptor +Output to fd#9: 1 diff --git a/shell/ash_test/ash-redir/redir3.tests b/shell/ash_test/ash-redir/redir3.tests new file mode 100755 index 0000000..f50a767 --- /dev/null +++ b/shell/ash_test/ash-redir/redir3.tests @@ -0,0 +1,5 @@ +# redirects to closed descriptors should not leave these descriptors" +# open afterwards +echo TEST 9>/dev/null +echo MUST ERROR OUT >&9 +echo "Output to fd#9: $?" diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all index b0a6d10..4d0f39a 100755 --- a/shell/ash_test/run-all +++ b/shell/ash_test/run-all @@ -3,8 +3,8 @@ TOPDIR=$PWD test -x ash || { - echo "No ./ash?! Perhaps you want to run 'ln -s ../../busybox ash'" - exit + echo "No ./ash - creating a link to ../../busybox" + ln -s ../../busybox ash } test -x printenv || gcc -O2 -o printenv printenv.c || exit $? test -x recho || gcc -O2 -o recho recho.c || exit $? |