fix: capture Non-zero wait status from signal-killed tests#14
Draft
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Draft
fix: capture Non-zero wait status from signal-killed tests#14Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Koan-Bot wants to merge 1 commit intoPerl-Toolchain-Gang:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a test is killed by a signal (e.g. SIGKILL on timeout), Test::Harness reports
Non-zero wait statusinstead ofNon-zero exit status. Three regex patterns inSmoker.pmandReporter.pmonly matchedexit, so the status line was silently dropped frommktest.rptandsmokecurrent.log, leaving the report incomplete for signal-killed tests.Fixes #8
Changes
Smoker.pm(_run_harness3_target): broaden regex fromNon-zero exit statustoNon-zero (?:exit|wait) statusSmoker.pm(_parse_harness3_output): same regex fixReporter.pm(read_parse): same regex fixt/smoker.t: add test case for a signal-killed test (Wstat: 9 (Signal: KILL)) verifyingNon-zero wait statusis capturedt/reporter.t: add test case verifyingNon-zero wait statusappears in the failures reportTest plan
t/smoker.tfails before the fix, passes aftert/reporter.tfails before the fix, passes aftert/smoker.t(79 tests) andt/reporter.t(694 tests) passGenerated by Kōan /fix