summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md43
1 files changed, 37 insertions, 6 deletions
diff --git a/README.md b/README.md
index b2a9f24..e9ea102 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,11 @@
<p align="center">
- <img src="packaging/zash-logo.svg" alt="zash" width="128">
+ <img src="packaging/zash-logo.svg" alt="zash" width="220">
</p>
# zash
+<p align="center">Sean Kurtz</p>
+
A small, fast POSIX shell for z/OS UNIX System Services, in the Almquist
(ash) tradition. zash aims to be for z/OS what FreeBSD's `sh` is for
FreeBSD: a lean, standards-following `/bin/sh` that is quick at running
@@ -87,6 +89,12 @@ The code is plain C17. The few attributes it uses are behind macros. See
[DESIGN.md](DESIGN.md#language-level) for the language level and the
coding style.
+The z/OS build is 31-bit (`-m32`), because a 31-bit `fork()` costs a
+ten-th of a 64-bit one and the catalog can then be called from C. Open
+XL also takes `-m64`, and the sources build either way unmodified; the
+measured difference between the two is discussed in
+[bench/README.md](bench/README.md).
+
Where the z/OS code generator leaves measurable performance on the table,
a hot routine may be rewritten in HLASM. Any such routine keeps its C
version. That stays the reference, and it is what Linux builds use.
@@ -101,7 +109,9 @@ make asan # build zash-asan (ASan + UBSan) and run the tests
make valgrind # run the tests under Valgrind
make bench # CPU time against dash, bash, ksh, zsh, oksh (or /bin/sh)
make compdb # write compile_commands.json for clangd
-make format tidy doc # clang-format, clang-tidy, Doxygen
+make format tidy # clang-format, clang-tidy
+make doc # the source reference: docs/html, docs/zash-reference.pdf
+make docs # that, plus HTML and PDF of this file and DESIGN.md
make zos-ascii # z/OS, ibm-clang, ASCII mode (zopen convention)
make zos-ebcdic # the same in EBCDIC (IBM-1047), as zash-ebcdic
@@ -117,6 +127,12 @@ Makefile is one flat, plain `.POSIX` makefile: it works with any `make`
and never invokes make recursively. Variant builds (sanitizers, the
z/OS modes) are single compile-and-link commands over the source list.
+`make doc` needs Doxygen, and for the PDF a working `pdflatex` with the
+packages Doxygen's LaTeX output uses (the Fedora list is a comment above
+the `doc` target in the Makefile); without `pdflatex` it builds
+`docs/html` and says so. `make docs` also needs `pandoc` and a
+Chrome/Chromium to turn the two Markdown documents into HTML and PDF.
+
## Testing
The project is tested at several levels:
@@ -143,7 +159,12 @@ The project is tested at several levels:
Language Environment can put a check zone after every heap element and
validate the heap on every request, so an overlay becomes a U4042
abend: `make zos-heapcheck` runs the whole suite that way, and
- `tests/zos/fuzz.sh` runs its own cases under it.
+ `tests/zos/fuzz.sh` runs its own cases under it. `zos-check` also puts a
+ bundled `sleep` first in `PATH`, because `/bin/sleep` rejects a
+ fractional interval and four tests of job ordering need one. Both
+ character modes pass `zos-check`; under the heap checker two signal
+ tests fail, as they do not in `zos-check` (see
+ [DESIGN.md](DESIGN.md#testing)).
- **A debugger** is `lldb` on Linux (`make debug`, `make attach`) and
`dbx` on z/OS (`make zos-debug`, `make zos-dbx`). `make zos-amblist`
maps the CSECTs of the program object when a module-level question
@@ -170,9 +191,10 @@ history and `fc`, libedit optional). It builds warning-free with Clang and
GCC as C17 and passes its suite plain, under ASan/UBSan, and under
Valgrind.
-On z/OS it builds in both character modes with Open XL, passes its suite
-(including the `zos/` group, run under the LE heap checker) and debugs
-with `dbx`. `make zos-debug`, `zos-dbx`, `zos-heapcheck` and
+On z/OS it builds in both character modes with Open XL, 31-bit, passes
+its suite (including the `zos/` group) and debugs with `dbx`. The
+LE heap-checker run is the one exception: two signal tests fail there and
+pass in `zos-check`. `make zos-debug`, `zos-dbx`, `zos-heapcheck` and
`zos-amblist` are the entry points. Data set redirection and `tso` are
the parts still written from documentation. See
[DESIGN.md](DESIGN.md#roadmap).
@@ -267,6 +289,15 @@ subshell whose body is one output-only builtin now runs in the shell,
like a pipeline stage already did, so the same 3000 cost 0.00 s here
against ksh88's 0.79.
+What is left of the gap in the `background jobs` row above is the price
+of the address mode, not of the design: measured on this machine a
+64-bit `fork()` costs 4.2 ms and a 31-bit one 0.10 ms, and the same
+program starts in 29.5 ms at 64-bit against 1.1 ms at 31-bit. The z/OS
+make targets therefore build `-m32`, and the table above is the last
+64-bit run: at 31-bit `background jobs` is 0.08, `zz-bgsub` 0.11 (ksh88
+0.12) and `zz-bgcd` 0.08 (ksh88 0.14), with no other row moving.
+[bench/README.md](bench/README.md) has the measurements.
+
The `port bug` entries are the third-party `oksh` port's, not zash's:
on there `echo hi | cat` prints two bytes of garbage, so those rows
measure nothing and the run reports a differing result. n/a means the