feat: add stat_as_fifo helper for named pipe mocking#93
Merged
atoomic merged 1 commit intocpan-authors:mainfrom Apr 23, 2026
Merged
Conversation
Contributor
|
@Koan-Bot rebase |
Every file type with a -X check had a corresponding stat_as_* helper except FIFO (named pipe). This completes the helper family so users of mock_all_from_stat can create FIFO stat arrays as easily as directories, files, or sockets. Also fixes CLAUDE.md referencing a non-existent mock_lstat function. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
Rebase with requested adjustmentsBranch StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
d3ca08f to
b18e375
Compare
atoomic
approved these changes
Apr 23, 2026
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
Adds
stat_as_fifo()helper — the only file type missing from thestat_as_*family.Why
Every file type with a
-Xcheck operator has a correspondingstat_as_*helper (directory, file, symlink, socket, chr, block) except FIFO/named pipe. Users ofmock_all_from_statwho need to simulate a FIFO had to manually construct the stat array with the correctS_IFIFOmode bits, while every other type has a one-liner helper.How
stat_as_fifo()following the exact same pattern as the existing helpers@STAT_HELPERS, exports, and PODstat-helpers.tand integration test inmock-all-from-stat_basic.t(verifies-p,-e,!-f,!-d,!-Sbehavior)mock_lstatfunctionTesting
Full test suite passes (
make test— all tests green).🤖 Generated with Claude Code