Skip to content

Make cronic portable to macOS's BSD grep and cmp, and test it on macOS - #141

Merged
mernst merged 14 commits into
plume-lib:masterfrom
mernst:cronic-portability
Oct 11, 2026
Merged

mernst merged 14 commits into
plume-lib:masterfrom
mernst:cronic-portability

Conversation

@mernst

@mernst mernst commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

This pull request builds on #139; merge #139 first. Until then, this pull request's diff also shows #139's commits.

  • Replace the GNU-only BRE extensions \+, \?, and \| with POSIX equivalents (a repeated group for the PS4 pattern, and grep -E for the make directory filter), and use cmp -s rather than cmp --silent.
  • In cronic-test.sh, skip the two "silent" checks for a PS4 that contains an expansion or an escape when /bin/bash is earlier than 4.1. Without BASH_XTRACEFD, such trace lines go to stderr and cannot be recognized; these two checks already failed under bash 3.2.
  • Add a GitHub Actions job that runs the cronic tests on macos-latest, whose /bin/bash is bash 3.2 and whose utilities are BSD.

Tested locally on Linux, and in the bash:3.2 Docker image (busybox grep and cmp) as a non-root user.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: plume-lib/plume-scripts/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 54221f40-302e-4019-ae40-7d6b7f238660






📥 Commits

Reviewing files that changed from the base of the PR and between b5ec97e and ef2d597.







📒 Files selected for processing (4)
  • .github/workflows/tests.yaml
  • cronic
  • tests/cronic-test/cronic-test.sh
  • tests/cronic-test/temp-file-test.sh






Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.








📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The change updates cronic’s Bash and utility usage, expands tests for trace handling and GNU make notices, follows a symlinked /tmp during a temporary-file search, and adds a macOS CI job that runs the cronic test suite.

















Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ef2d5

The macOS test job follows the repository’s workflow requirements. No actionable merge-blocking issue remains from this review.

Pre-merge checks | Passed 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (2 skipped: 2 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.











✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

mernst added 11 commits October 10, 2026 12:33
… behavior, and detect BASH_XTRACEFD by feature

Accept GNU make 3.81's `dir' quoting and the name gmake in cronic's make
filter; state precisely which utilities cronic uses portably.  In the
tests, check cronic's behavior under a bash earlier than 4.1 instead of
skipping it, run a real bash trace nested 3 deep through the stderr path,
and test /bin/bash for BASH_XTRACEFD support rather than copying cronic's
version test.
…more thoroughly

Simplify cronic's trace pattern and stderr filter.  Run the trace-and-stderr
check on every bash, run the PS4-dependent old-bash checks only when not root,
make temp-file-test search through macOS's /tmp symlink, and put /bin first in
PATH in the macOS CI job so that it tests bash 3.2.
…s, and make the BASH_XTRACEFD probe ignore warnings
…nto cronic-portability

# Conflicts:
#	cronic
#	tests/cronic-test/cronic-test.sh
@mernst
mernst merged commit 428f783 into plume-lib:master Oct 11, 2026
7 of 8 checks passed
@mernst
mernst deleted the cronic-portability branch October 11, 2026 20:25
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.

1 participant