feat(coreutils): add true, false, head, tail, wc utilities#93
Merged
feat(coreutils): add true, false, head, tail, wc utilities#93
Conversation
Root cause: The entire sys_execv_with_frame() was wrapped in without_interrupts(), causing ext2 filesystem I/O to run with interrupts disabled. This blocked timer interrupts, starved the scheduler, and caused TCP packet processing delays in CI. Changes: 1. Restructure sys_execv_with_frame() to only disable interrupts for the critical frame manipulation section, not ELF loading 2. Increase TCP test MAX_LOOPBACK_RETRIES from 3 to 10 for CI environments where system load causes packet processing delays The ext2 lookup (path resolution, inode reads, file content reads) now runs with interrupts enabled, allowing proper VirtIO operation and timer interrupt handling. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements 5 new POSIX-compatible coreutils for the ext2 filesystem: - true: always exits with status 0 (16 bytes) - false: always exits with status 1 (17 bytes) - head: output first N lines of files (-n option, default 10) - tail: output last N lines of files (-n option, default 10) - wc: word, line, and byte count (-l/-w/-c options) All utilities: - Support reading from stdin when no files specified - Support multiple file arguments with headers - Use libbreenix syscall wrappers - Follow POSIX conventions Updated build.sh and Cargo.toml to include new binaries. Updated create_ext2_disk.sh to install in ext2 /bin/. Regenerated testdata/ext2.img with all 13 coreutils. Co-Authored-By: Claude Opus 4.5 <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
true: always exits with status 0 (16 bytes)false: always exits with status 1 (17 bytes)head: output first N lines of files (-n option, default 10)tail: output last N lines of files (-n option, default 10)wc: word, line, and byte count (-l/-w/-c options)Test plan
Note: This PR includes cherry-picked commit from PR #92 (TCP timing fix) - should merge after #92.
🤖 Generated with Claude Code