<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests/zos, branch docs/startup-probe</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=docs%2Fstartup-probe</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=docs%2Fstartup-probe'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-23T17:09:45Z</updated>
<entry>
<title>z/OS: keep a close-on-exec pipe out of the child's fd map</title>
<updated>2026-11-23T17:09:45Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-23T17:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=92fb4b12ac631ce5c794e5b5b29f204f34ab9e59'/>
<id>urn:sha1:92fb4b12ac631ce5c794e5b5b29f204f34ab9e59</id>
<content type='text'>
sys_pipe() duplicates the shell's pipe ends above SYS_NFD and marks them
FD_CLOEXEC, so that other children do not inherit them.  spawn()'s fd_map
hands the child the parent's descriptor as it is, without clearing the
flag the way dup2() would, so a mapping onto the child's 0..2 carried
FD_CLOEXEC into the child.  The child could still write, but the next
exec inside it lost stdout: ps printed

    FSUM6004 write error on standard output: EDC5113I Bad file descriptor

and a #!/bin/sh shim lost the pipe it was given.

Pass a plain duplicate, which fcntl F_DUPFD makes above SYS_NFD without
the flag, for every map entry that names a different descriptor, and
close the duplicates once spawn() has made the child.  Entries that map
a descriptor onto itself are untouched.

tests/zos/fdmap.sh records the case: a pipe the shell made, read by a
child that execs.

Reported in #1.
</content>
</entry>
<entry>
<title>z/OS: run 31-bit and load IGGCSI00 through the C library</title>
<updated>2026-11-23T17:09:32Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-23T17:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d1ea4c7f4530e3d1d4689a9d20029a0c1a418df5'/>
<id>urn:sha1:d1ea4c7f4530e3d1d4689a9d20029a0c1a418df5</id>
<content type='text'>
zash was AMODE 64, so calling the AMODE 31 IGGCSI00 needed assembler
glue (zos_csi.s) that switched addressing mode around the branch.  Built
with -m32 the program is 31-bit itself: the call goes through a plain
function pointer, the work area and the saved registers live in one
31-bit block in C, and the glue is gone.

The rest of the tree follows the change: the build, the off-z/OS lint
shim, DESIGN.md and README.md, the benches, the Lean spec of the
pattern matcher, and the tests that recorded what the extra address bits
had changed.
</content>
</entry>
<entry>
<title>tests/zos/ebcdic: drop the external sort from the collation test</title>
<updated>2026-11-19T01:01:22Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T01:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=656fadb9631cdbc1a2a469bdff0acf39978420fb'/>
<id>urn:sha1:656fadb9631cdbc1a2a469bdff0acf39978420fb</id>
<content type='text'>
/bin/sort collates by the environment's collation, not by EBCDIC byte
order, so on z/OS it put the digits first and the test failed the first
time it ran in the EBCDIC build.  The shell's own ordering, which is what
the test is for, is checked above it.
</content>
</entry>
<entry>
<title>tests/zos/security: ask whether the redirect was refused, not how</title>
<updated>2026-11-19T00:13:38Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=8dfa69877bedafd6d5b83754252065ded33abb90'/>
<id>urn:sha1:8dfa69877bedafd6d5b83754252065ded33abb90</id>
<content type='text'>
zash exits 1 for a failed redirection on Linux and 2 on z/OS (the errno
is mapped differently there).  What the test is about is that the
command fails, not the number it fails with.
</content>
</entry>
<entry>
<title>tests/zos/security: set PATH, and drop the read-only directory check</title>
<updated>2026-11-19T00:11:41Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=1d7b0e126f6c7b5373c0dd405c3c986ebdbfb42e'/>
<id>urn:sha1:1d7b0e126f6c7b5373c0dd405c3c986ebdbfb42e</id>
<content type='text'>
z/OS profiles end PATH with a colon, which POSIX reads as the current
directory, so the PATH check passed for the wrong reason there.  The
ZFS test also let the owner create files in a directory it had just
chmod'ed 500, so that check proved nothing on the machine it was written
for.  A redirection into a missing directory tests the same error path
and is refused everywhere.
</content>
</entry>
<entry>
<title>Readme icon and contents, a security test, realistic bench scripts</title>
<updated>2026-11-19T00:10:36Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=b0f3aacedd6d1ebacbc774767611cdef0ac6761c'/>
<id>urn:sha1:b0f3aacedd6d1ebacbc774767611cdef0ac6761c</id>
<content type='text'>
README.md shows the shell's icon on a light or dark background, has a
table of contents, and says C17 rather than C11 (the tree has built C17
since b4d6bf1).

tests/zos/security.sh is the security-relevant half of the suite: a file
created by redirection or mkdir takes the umask, a redirect into a
directory without write permission fails, the current directory is not
searched for a command, ENV is not read by a non-interactive shell, and
neither an expansion nor a file name is re-parsed.

bench/report.sh counts a generated log by level and hour, and
bench/deploy.sh renders and verifies 100 configs from a template. Both
are realistic scripts and both are compared for output against other
shells by bench/run.sh, so they fail as tests as well as being timed.
</content>
</entry>
<entry>
<title>tests/zos/fdmap: the output of the descriptor sweep</title>
<updated>2026-11-18T23:06:12Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=75fd07c908a3695c1038847822b94d76f940e1f1'/>
<id>urn:sha1:75fd07c908a3695c1038847822b94d76f940e1f1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>z/OS: test a spawn with the script's whole descriptor range open</title>
<updated>2026-11-18T23:05:49Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=79141a999257c915bf9987e32c7530a67700cab1'/>
<id>urn:sha1:79141a999257c915bf9987e32c7530a67700cab1</id>
<content type='text'>
A script owns descriptors 0..SYS_NFD-1 and the shell's own live above
them, so filling 3..9 is as far as a script can go; the spawn map keeps
the terminal duplicate reachable past them.  The earlier '64' map was
guessing at a case the shell cannot present: back to SYS_NFD+16.
</content>
</entry>
<entry>
<title>z/OS: a wider spawn map, and the suite runs both builds</title>
<updated>2026-11-18T21:13:09Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T21:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=0d69168ada30c4b584a6c3aa77640d2b396d9599'/>
<id>urn:sha1:0d69168ada30c4b584a6c3aa77640d2b396d9599</id>
<content type='text'>
The map carried SYS_NFD+16 descriptors, so a script holding more pushed
the terminal's duplicate out of reach and its commands lost the
controlling terminal.  64 leaves room.

`make zos-check` now builds the EBCDIC program too and runs the
character-set tests against it, which nothing did before.
</content>
</entry>
<entry>
<title>z/OS: check the heap the way z/OS can</title>
<updated>2026-11-18T16:40:04Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T16:40:04Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c321bd509b37bc180a5292e8ad142c3df9e2d28c'/>
<id>urn:sha1:c321bd509b37bc180a5292e8ad142c3df9e2d28c</id>
<content type='text'>
There is no ASan there, but Language Environment can put a check zone
after every heap element (above and below the 2 GB bar) and validate
the heap on every request: an overlay then abends with U4042 and prints
CEE3716I instead of staying silent.  A small C program that writes 8
bytes past a malloc() calibrated the options against the real system.

tests/zos/fuzz.sh now runs its 200 cases under those options, and
make zos-heapcheck runs the whole suite under them.  Its generator also
stays inside 32 bits now, so /bin/sh can run the script too.
</content>
</entry>
</feed>
