test: add access control tests and fix exec fallthrough#57
Draft
toddr-bot wants to merge 1 commit into
Draft
Conversation
- Add t/accept.t with 13 tests covering Accept() access control logic: allow/deny masks, first-match semantics, arrayref masks, unconditional entries, default deny, and unix socket client resolution. - Fix exec-without-die in Test.pm Child(): if exec fails, the forked child now dies instead of silently falling through as a second parent. - Remove stale 'Test' dependency from cpanfile — all tests use Test::More. Co-Authored-By: Claude Opus 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.
What
Add dedicated tests for the Accept() access control logic, fix an exec-without-die
bug in Test.pm, and remove a stale test dependency.
Why
Accept()'s client/mask matching is the module's security gate — IP allow/deny rules
determine which clients can connect. This logic had zero dedicated test coverage.
The exec bug meant a failed server spawn in Child() would silently create a zombie
parent process instead of failing visibly.
How
Covers: allow/deny masks, first-match semantics, arrayref masks, unconditional
entries (no mask), default deny, and unix socket client resolution (localhost/127.0.0.1).
die "exec failed: $!"afterexec @_in Child() fork path.Testdependency — all test files useTest::Moresince thetest modernization PRs.
Testing
Full test suite passes (20 test files). New t/accept.t: 13/13 pass.
🤖 Generated with Claude Code
Quality Report
Changes: 4 files changed, 173 insertions(+), 1 deletion(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline