summaryrefslogtreecommitdiffhomepage
path: root/tests/zos/leak.sh
Commit message (Collapse)AuthorAgeFilesLines
* test: keep child reports out of the leak comparisonSean Kurtz6 days1-2/+15
| | | | | | | | A child inherits _CEE_DMPTARG and writes its own heap report, so the substitution and the pipeline added a report per iteration: growth measured 2 MB over 900 children, none of it zash's. The forked commands now turn heap checking off for themselves, and the test fails if anything but one report came back.
* test: leak-check the spawn, redirection and pipeline paths tooSean Kurtz6 days1-1/+6
| | | | | | | The loop body had builtins only, so nothing but parsing, expansion and variables was measured. A substitution, a redirection, a forked command and a pipeline per iteration put the storage those paths keep under the same comparison.
* test: report leak checking as a verdict, not an exact figureSean Kurtz6 days1-1/+5
| | | | | | | | The growth over 10x the work is 0 or 8 bytes depending on how the environment copy lands on an 8-byte boundary, so printing it made the expectation depend on the caller's environment. Print the finding only when the limit is exceeded; the reports in build/leaks keep the numbers.
* test: fail when zash leaks under LE's heap checkerSean Kurtz6 days1-0/+68
HEAPCHK with a call depth and no per-call walk makes LE write the heap storage diagnostics into a CEEDUMP at normal termination: every allocation still live at exit, with the traceback that made it. A shell leaves working storage live on purpose, so the total says nothing by itself; a leak shows as the total growing with the work done. tests/zos/leak.sh therefore runs one builtin-only loop body at 100 and 1000 iterations in the same shell, sums the live bytes out of each report, and fails if the second run is more than 2 KiB larger. `make zos-leakcheck` is the target: it points _CEE_DMPTARG at build/leaks and skips zash/limits, which recurses deep enough to run out of storage under the checker.