summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-redir/redir_script.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-redir/redir_script.tests')
-rwxr-xr-xshell/ash_test/ash-redir/redir_script.tests9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/ash_test/ash-redir/redir_script.tests b/shell/ash_test/ash-redir/redir_script.tests
index ccc497d..740daa4 100755
--- a/shell/ash_test/ash-redir/redir_script.tests
+++ b/shell/ash_test/ash-redir/redir_script.tests
@@ -20,10 +20,15 @@ eval "find_fds $fds"
# Shell should not lose that fd. Did it?
find_fds
-test x"$fds1" = x"$fds" && { echo "Ok: script fd is not closed"; exit 0; }
+test x"$fds1" = x"$fds" \
+&& { echo "Ok: script fd is not closed"; exit 0; }
+
+# One legit way to handle it is to move script fd. For example, if we see that fd 10 moved to fd 11:
+test x"$fds1" = x" 10>&- 3>&-" && \
+test x"$fds" = x" 11>&- 3>&-" \
+&& { echo "Ok: script fd is not closed"; exit 0; }
echo "Bug: script fd is closed"
echo "fds1:$fds1"
echo "fds2:$fds"
exit 1
-