Skip to content

fix: BSD tests#631

Merged
creativeprojects merged 8 commits into
masterfrom
fix-bsd-tests
Apr 17, 2026
Merged

fix: BSD tests#631
creativeprojects merged 8 commits into
masterfrom
fix-bsd-tests

Conversation

@creativeprojects

Copy link
Copy Markdown
Owner

No description provided.

@codecov

codecov Bot commented Apr 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.99%. Comparing base (d58824b) to head (3f0bc9b).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #631   +/-   ##
=======================================
  Coverage   80.99%   80.99%           
=======================================
  Files         162      162           
  Lines       12112    12113    +1     
=======================================
+ Hits         9809     9810    +1     
  Misses       1806     1806           
  Partials      497      497           
Flag Coverage Δ
unittests 79.26% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@creativeprojects creativeprojects marked this pull request as ready for review April 17, 2026 20:01
Copilot AI review requested due to automatic review settings April 17, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets improving test reliability and behavior consistency on BSD platforms, and re-enables CI coverage for BSD VMs.

Changes:

  • Adjusts OS-specific test logic (e.g., Windows checks, BSD-specific exit code variance) and makes some time-based tests deterministic via testing/synctest.
  • Improves temp directory creation fallback behavior by ensuring the user cache directory exists before creating a temp dir within it.
  • Expands/reshapes platform-specific util.Executable() behavior and restructures lock PID-related tests to avoid NetBSD failures; re-enables BSD GitHub Actions workflow triggers.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wrapper_test.go Uses platform.IsWindows() and broadens accepted interrupt-related error strings for stream source tests.
util/write/file_test.go Wraps a timing-sensitive test in synctest.Test to avoid flaky sleeps/timeouts.
util/tempdir_test.go Switches to require.NoError so assertions don’t proceed with invalid dir values.
util/tempdir.go Ensures os.UserCacheDir() path exists (os.MkdirAll) before attempting os.MkdirTemp there.
util/executable_symlink.go Broadens build tags for the non-Darwin/non-Windows executable resolution implementation and updates docs.
util/executable_os.go Adds a Darwin/Windows-specific Executable() implementation (os.Executable-based).
util/executable_linux_test.go Broadens build tags for resolveExecutable tests to match non-Darwin/non-Windows targets.
shell/command_test.go Makes the “local file” command test choose an existing file in the package dir instead of a hardcoded filename.
lock_test.go Adds a new test intended to validate lock release behavior when signalled.
lock/lock_test.go Removes PID/process-related tests (moved out) and drops related imports.
lock/lock_pid_test.go Adds PID/process-related tests back under a !netbsd build tag.
.github/workflows/BSD-tests.yml Re-enables push/PR triggers for BSD test workflow and updates VM action version.
Comments suppressed due to low confidence (1)

util/executable_symlink.go:16

  • The new build constraint (!darwin && !windows) makes this implementation of Executable() apply to all non-Darwin/non-Windows targets (e.g., plan9, wasip1, etc.), but resolveExecutable() assumes Unix-style absolute paths (executable[0] == '/'). Either narrow the build tags to the actual intended OS set (Linux + the BSDs) or make the path logic fully OS-agnostic (e.g., use filepath.IsAbs / filepath.Separator) so the broader tag is correct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread util/executable_linux_test.go Outdated
Comment thread lock_test.go Outdated
…adge; refactor lock tests and add executable resolution tests for BSD systems

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

util/executable_symlink.go:4

  • The build tag here (!darwin && !windows) makes this implementation apply to all other GOOS targets (e.g., linux, the BSDs, but also any other non-darwin/non-windows ports). The doc comment says this behavior is for “Linux and BSDs”, and the behavior change could be unintended for other OSes that previously used os.Executable.

Consider either (a) narrowing the build constraint to the specific OSes you intend to support with os.Args[0] resolution, or (b) adjusting the comment to accurately describe the broader build scope and explicitly documenting why this is safe for all non-darwin/non-windows platforms.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@creativeprojects creativeprojects merged commit d37d8e7 into master Apr 17, 2026
16 checks passed
@creativeprojects creativeprojects deleted the fix-bsd-tests branch April 17, 2026 20:44
@creativeprojects creativeprojects added this to the v0.34.0 milestone Apr 17, 2026
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.

2 participants