summaryrefslogtreecommitdiffhomepage
path: root/tests/zos
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zos')
-rw-r--r--tests/zos/fdmap.exp1
-rw-r--r--tests/zos/fdmap.sh5
-rw-r--r--tests/zos/tagging.sh2
3 files changed, 7 insertions, 1 deletions
diff --git a/tests/zos/fdmap.exp b/tests/zos/fdmap.exp
index cd47308..62f83ce 100644
--- a/tests/zos/fdmap.exp
+++ b/tests/zos/fdmap.exp
@@ -7,4 +7,5 @@ piped
captured
script descriptors ok
and closed again
+survives exec
[status 0]
diff --git a/tests/zos/fdmap.sh b/tests/zos/fdmap.sh
index c4f1679..b63a199 100644
--- a/tests/zos/fdmap.sh
+++ b/tests/zos/fdmap.sh
@@ -26,3 +26,8 @@ while [ $i -le 9 ]; do
i=$((i + 1))
done
/bin/sh -c 'echo "and closed again"'
+# The map hands the child the shell's own pipe descriptors. They are
+# close-on-exec (sys_pipe()), and spawn() keeps the flag, so a grandchild
+# that execs would lose the pipe -- ps printed EDC5113I Bad file
+# descriptor. The map must pass a duplicate without the flag.
+/bin/sh -c 'exec /bin/echo survives exec' | /bin/cat
diff --git a/tests/zos/tagging.sh b/tests/zos/tagging.sh
index 5f3c3bb..5ef4a3d 100644
--- a/tests/zos/tagging.sh
+++ b/tests/zos/tagging.sh
@@ -69,7 +69,7 @@ _TAG_REDIR_OUT=BIN printf 'hello\n' >in819 # ASCII bytes in an ASCII build
[ "$self" = IBM-1047 ] && _TAG_REDIR_OUT=BIN printf '\150\145\154\154\157\012' >in819
chtag -tc ISO8859-1 in819
_TAG_REDIR_IN=TXT cat <in819
-_TAG_REDIR_IN=BIN od -An -tx1 <in819 | tr -d ' \n'
+_TAG_REDIR_IN=BIN od -An -tx1 <in819 | tr -d ' \n' | tr '[:upper:]' '[:lower:]'
echo
echo "-- pipeline stage tagged by _TAG_REDIR_OUT"