summaryrefslogtreecommitdiff
path: root/Test/A05execution.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/A05execution.ztst')
-rw-r--r--Test/A05execution.ztst36
1 files changed, 32 insertions, 4 deletions
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index 9615f091b..ca97f4f41 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -204,15 +204,43 @@ F:the bug is still there or it reappeared. See workers-29973 for details.
F:This similar test was triggering a reproducible failure with pipestatus.
{ unsetopt MONITOR } 2>/dev/null
- coproc { read -Et 5 || kill -INT $$ }
+ coproc { read -et 5 || { print -u $ZTST_fd KILLED; kill -HUP -$$ } }
print -u $ZTST_fd 'This test takes 5 seconds to fail...'
- { printf "%d\n" {1..20000} } | ( read -E )
- hang(){ printf "%d\n" {2..20000} | cat }; hang | ( read -E )
+ { printf "%d\n" {1..20000} } | ( read -e )
+ hang(){ printf "%d\n" {2..20000} | cat }; hang | ( read -e )
print -p done
- read -Et 6 -p
+ read -et 6 -p
0:Bug regression: piping a shell construct to an external process may hang
>1
>2
>done
F:This test checks for a file descriptor leak that could cause the left
F:side of a pipe to block on write after the right side has exited
+
+ { setopt MONITOR } 2>/dev/null
+ if [[ -o MONITOR ]]
+ then
+ ( while :; do print "This is a line"; done ) | () : &
+ sleep 1
+ jobs -l
+ else
+ print -u $ZTST_fd "Skipping pipe leak test, requires MONITOR option"
+ print "[0] 0 0"
+ fi
+0:Bug regression: piping to anonymous function; piping to backround function
+*>\[<->\] <-> <->
+F:This test checks for two different bugs, a parser segfault piping to an
+F:anonymous function, and a descriptor leak when backgrounding a pipeline
+
+ print "autoload_redir() { print Autoloaded ksh style; } >autoload.log" >autoload_redir
+ autoload -Uk autoload_redir
+ autoload_redir
+ print No output yet
+ cat autoload.log
+ functions autoload_redir
+0:
+>No output yet
+>Autoloaded ksh style
+>autoload_redir () {
+> print Autoloaded ksh style
+>} > autoload.log