Skip to content

Add shutdown acceptance test for #122#123

Merged
mgrossmann merged 1 commit into
mainfrom
issue-122-shutdown-acceptance-test
Jul 22, 2026
Merged

Add shutdown acceptance test for #122#123
mgrossmann merged 1 commit into
mainfrom
issue-122-shutdown-acceptance-test

Conversation

@mgrossmann

@mgrossmann mgrossmann commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds tests/shutdown-acceptance.sh, the httpd-side acceptance criterion for
the shutdown crash in #122 (epic mvslovers/mvsmf#177, Workstream D).

After a request handler faults, P HTTPD must terminate the address space
cleanly: no S33E, no repeated __CRTGET CRT for TCB(...) was not found in PPA(...), no SVC dump. The code fix lives in libc370 (worker DETACH
gating + recovery-exit hardening); this test observes the symptom in httpd's
own address space.

How it works

  1. Provoke a faulting handler — ABEND_HITS requests to /abend
    (DC H'0' → S0C1 inside the worker pipeline), enough to poison the pool.
  2. Issue P HTTPD (pluggable adapter — manual operator by default, cmd for CI).
  3. Wait for the listener to stop.
  4. Assert over the captured MVS console log.

Verdict: FAIL when the crash signatures appear (the expected result on the
current pre-fix build), PASS on clean shutdown, INCONCLUSIVE when no
handler-fault marker is present.

Correctness safeguards

  • Windowed assertion. CONSOLE_LOG is typically an append-only Hercules
    hardcopy log that already contains prior S33E / __CRTGET lines. The
    script records the byte offset before provoking and asserts only over bytes
    appended during the run, so a stale crash cannot pin the result at FAIL.
  • Fault marker. Proof-of-fault accepts HTTPD062E (core abend caught by
    the worker try(serve_client)) or MVSMF99E (mvsMF CGI abend caught by
    its inner ESTAE) — valid whether ABEND_PATH is a core path or a CGI endpoint.

Notes

Refs #122

Adds tests/shutdown-acceptance.sh, the httpd-side acceptance criterion for
the shutdown crash tracked in #122: after a request handler faults, P HTTPD
must terminate the address space cleanly (no S33E, no repeated
"__CRTGET CRT for TCB(...) was not found in PPA(...)", no SVC dump).

The test provokes a faulting handler via the built-in /abend path
(DC H'0' inside the worker request pipeline), issues P HTTPD, then asserts
over the MVS console log. It reports FAIL when the crash signatures appear
(the expected result on the current build), PASS on clean shutdown, and
INCONCLUSIVE when no handler-fault marker (HTTPD062E or MVSMF99E) is present.

Two correctness safeguards: the assertion is windowed to the byte range
appended during the run so a pre-existing crash in an append-only console
log cannot pin the result at FAIL; and proof-of-fault accepts HTTPD062E
(core abend) or MVSMF99E (mvsMF CGI abend). Issuing P HTTPD and capturing
the console log are pluggable adapters (manual operator default, cmd for CI),
documented in tests/README.md.

Refs #122
@mgrossmann
mgrossmann merged commit 9f92c83 into main Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant