Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix macos portability issues (sixth batch) #6508

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

garlick
Copy link
Member

@garlick garlick commented Dec 14, 2024

This fixes a few more issues, plus adds the capability to build flux-core with an external libev for #6485. Finally, run the working unit tests under macos so we don't end up with regressions there.

This is built on top of #6494 because localizing the libev code mad this PR easier.

Problem: libev asserts in ev_epoll.c on macos.

Assertion failed: (("libev: I/O watcher with invalid fd found in epoll_ctl", errno != EBADF && errno != ELOOP && errno != EINVAL)), function epoll_modify, file ev_epoll.c, line 134.

The fact that libev is using epoll, which is not native to macos,
indicates that its configure logic is getting confused by the presence
of the epoll-shim (required for the flux_t handle implementation).

Get around this by adding a configure option --with-external-libev so
we can use the homebrew libev, which is properly configured to use kqueue
instead of epoll.

Fixes flux-framework#6485
Problem: install-deps-macos.sh doesn't install the homebrew
libev, and configure-macos.sh doesn't configure --with-external-libev.

Update macos scripts.
Problem: some tests fail on macos because dlerror(3) produces
different output, e.g. "not a file" vs "Is a directory".

Adjust libtap like() regex to relax match requirements.
Problem: some tests fail on macos because strsignal(3) produces
different output, e.g.

       got: 'task(s) Segmentation fault: 11'
  expected: 'task(s) Segmentation fault'

Use libtap like() instead of is() to relax match requirements.
Problem: a subset of flux works on macos so far, but because we do
not run 'make check' in CI, regressions are likely.

Add a script that runs specific tests known to work on macos.
Call it from the macos builder in CI.
Copy link
Contributor

@grondo grondo left a comment

Choose a reason for hiding this comment

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

LGTM!

@garlick
Copy link
Member Author

garlick commented Dec 16, 2024

Thanks! I'll set MWP.

@mergify mergify bot merged commit 4be4d46 into flux-framework:master Dec 16, 2024
35 checks passed
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.61%. Comparing base (1088270) to head (a472a28).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6508      +/-   ##
==========================================
- Coverage   83.63%   83.61%   -0.02%     
==========================================
  Files         522      522              
  Lines       87680    87680              
==========================================
- Hits        73330    73315      -15     
- Misses      14350    14365      +15     
Files with missing lines Coverage Δ
src/common/libflux/reactor.c 95.83% <ø> (ø)
src/common/libflux/watcher_wrap.c 97.21% <ø> (ø)

... and 8 files with indirect coverage changes

@garlick garlick deleted the macos6 branch December 16, 2024 15:20
chu11 pushed a commit to chu11/flux-core that referenced this pull request Dec 17, 2024
fix macos portability issues (sixth batch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants