Skip to content

fix: capture Non-zero wait status from signal-killed tests#14

Draft
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Koan-Bot:koan.atoomic/fix-issue-8
Draft

fix: capture Non-zero wait status from signal-killed tests#14
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Koan-Bot:koan.atoomic/fix-issue-8

Conversation

@Koan-Bot
Copy link

Summary

When a test is killed by a signal (e.g. SIGKILL on timeout), Test::Harness reports Non-zero wait status instead of Non-zero exit status. Three regex patterns in Smoker.pm and Reporter.pm only matched exit, so the status line was silently dropped from mktest.rpt and smokecurrent.log, leaving the report incomplete for signal-killed tests.

Fixes #8

Changes

  • Smoker.pm (_run_harness3_target): broaden regex from Non-zero exit status to Non-zero (?:exit|wait) status
  • Smoker.pm (_parse_harness3_output): same regex fix
  • Reporter.pm (read_parse): same regex fix
  • t/smoker.t: add test case for a signal-killed test (Wstat: 9 (Signal: KILL)) verifying Non-zero wait status is captured
  • t/reporter.t: add test case verifying Non-zero wait status appears in the failures report

Test plan

  • New test in t/smoker.t fails before the fix, passes after
  • New test in t/reporter.t fails before the fix, passes after
  • Full t/smoker.t (79 tests) and t/reporter.t (694 tests) pass

Generated by Kōan /fix

When a test is killed by a signal (e.g. SIGKILL on timeout), Test::Harness
reports 'Non-zero wait status' instead of 'Non-zero exit status'. The
three regex patterns that matched the exit-status line only matched 'exit',
so signal kills were silently dropped from mktest.rpt and smokecurrent.log.

Change the patterns in Smoker.pm (_run_harness3_target and
_parse_harness3_output) and Reporter.pm (read_parse) from
  /Non-zero exit status/
to
  /Non-zero (?:exit|wait) status/
so that both normal exits and signal kills are captured in the report.

Fixes Perl-Toolchain-Gang#8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Test::Smoke is missing some output from the test summary

1 participant