summaryrefslogtreecommitdiffhomepage
path: root/tests/zos/script-errors.sh
blob: bad40c33b30dd0a058292998c8c314c819a08c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
# What a script path that cannot be read does on z/OS: only a missing file is
# an error.  The bit mode of a file does not decide access there, so a mode
# 000 script runs; the POSIX case lives in zash/script-errors, which the
# runner skips on this host.
"$TSH" /nonexistent/x >/dev/null 2>&1; echo "missing $?"
"$TSH" /nonexistent/x >/dev/null 2>msg; cat msg
"$TSH" /tmp >/dev/null 2>&1; echo "dir $?"
echo 'echo hi' >unreadable.sh
chmod 000 unreadable.sh
"$TSH" unreadable.sh >/dev/null 2>&1; echo "unreadable $?"
chmod 644 unreadable.sh