Skip to content

fix: update test script to work without lsof on CI#798

Open
jrvb-rl wants to merge 2 commits into
mainfrom
jrvb/fix-lsof
Open

fix: update test script to work without lsof on CI#798
jrvb-rl wants to merge 2 commits into
mainfrom
jrvb/fix-lsof

Conversation

@jrvb-rl
Copy link
Copy Markdown
Contributor

@jrvb-rl jrvb-rl commented May 8, 2026

Summary

We had one test which worked locally but failed reliably in the github CI environment due to lsof not being installed. This fix should get the CI tests back to green.

  • Add fallbacks for kill_server_on_port when lsof is unavailable (e.g. on GitHub Actions runners)
  • Try ss, then fuser, then parse /proc/net/tcp directly as a final fallback
  • Warn gracefully if no method is available

Test plan

  • Verify CI passes on GitHub Actions (Linux runners without lsof)
  • Verify local ./scripts/test still works on macOS (uses lsof path)

🤖 Generated with Claude Code

jrvb-rl and others added 2 commits May 7, 2026 20:57
Use ss or fuser as fallbacks when lsof is not available, and warn
gracefully if none are present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When lsof, ss, and fuser are all unavailable, parse /proc/net/tcp to
find socket inodes listening on the target port, then scan /proc/*/fd/
to map inodes back to pids. Always available on Linux.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jrvb-rl jrvb-rl changed the title Fix test script to work without lsof on CI fix: update test script to work without lsof on CI May 8, 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.

1 participant