summaryrefslogtreecommitdiffhomepage
path: root/bench/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'bench/README.md')
-rw-r--r--bench/README.md19
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.