diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 21:04:44 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 21:04:44 -0600 |
| commit | aa1a6d2179d4c1c139847aba0bb7675ce2e0b20f (patch) | |
| tree | f1ec03a4b7a0b6d06064917cf89bc04bcd3a343d /bench/README.md | |
| parent | b7e423db58e95a844b5bc4253f1eccb2745c7814 (diff) | |
| download | zash-bench/host-sh-compat.tar.gz | |
bench: measure zash against the sh this host hasbench/host-sh-compat
`compat.sh` runs every tests/posix script under zash and under another
shell, each in an empty directory, and prints the ones whose output or
status differ. It is not a test: the .exp files are a reference shell's
output, and on z/OS /bin/sh is IBM's ksh-lineage shell with wording and
statuses of its own. The count is how close a script naming #!/bin/sh
gets to its meaning here; the diffs say which differences to read.
On cbt, 10 of the 38 scripts agree and 28 differ, most of them on
diagnostics.
Diffstat (limited to 'bench/README.md')
| -rw-r--r-- | bench/README.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bench/README.md b/bench/README.md index f70dd06..c984b31 100644 --- a/bench/README.md +++ b/bench/README.md @@ -268,6 +268,25 @@ It matters for anything that starts zash often: a script with a `#!` line, `zash -c`, a spawned subshell. It does not matter for a long interactive session. +## The host's sh + +`compat.sh` runs every `tests/posix` script under zash and under the +shell this host calls `sh`, each in its own directory, and lists the ones +whose output or status differ: + +```sh +sh bench/compat.sh ./zash [/bin/sh] +``` + +The `.exp` files are a reference shell's output, so this is not a test. +It measures how close a script that names `#!/bin/sh` gets to the meaning +that name has here, which is the compatibility zash aims for. On z/OS +today, 10 of the 38 scripts agree and 28 differ: most differences are +wording that POSIX leaves to the shell (an IBM sh says `FSUM7351 not +found` where zash says `not found`), and the rest are behaviour worth +reading one at a time. Linux numbers are lower-information, because +`/bin/sh` there is usually bash while the `.exp` files come from dash. + Measured with 100 starts each: `-c :` is a bare start, `script` is the kernel starting the shell on a one-line file, which is what a `#!` line does. |
