Bug 15494 - tevent: event_fd tests failed on Darwin
Summary: tevent: event_fd tests failed on Darwin
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: smbtorture (show other bugs)
Version: unspecified
Hardware: Other Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Stefan Metzmacher
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-11 10:10 UTC by Torrekie Gen
Modified: 2023-10-12 14:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torrekie Gen 2023-10-11 10:10:07 UTC
By running `waf test`, several test cases failed

test: test_trace_event_fd__loop
failure: test_trace_event_fd__loop [
tctx->before_handler
../../tests/test_tevent_trace.c:436: error: Failure!
]
test: test_trace_event_fd__reset
success: test_trace_event_fd__reset
test: test_trace_event_fd__free
success: test_trace_event_fd__free
test: test_trace_event_fd__free_in_handler
failure: test_trace_event_fd__free_in_handler [
tctx->before_handler
../../tests/test_tevent_trace.c:529: error: Failure!
]

Built on/targeting Darwin iPad 20.4.0 Darwin Kernel Version 20.4.0: Sun Feb 28 21:05:09 PST 2021; root:xnu-7195.100.367~3/RELEASE_ARM64_T8101 arm64 arm Darwin

Built with cmocka 1.1.7, talloc 2.4.1, LLVM Clang 14.0.0

I guess if there's some platform differences within poll(2) call, as some projects also reported Darwin poll(2) might not behaves like poll calls on other platforms especially when fds=NULL and nfds=0.
Comment 1 Torrekie Gen 2023-10-11 10:12:00 UTC
Forget to say building latest tevent 0.15.0
Comment 2 Stefan Metzmacher 2023-10-12 12:56:12 UTC
Thanks for the report.

Would you be able to provide something like what
'strace -o /tmp/tevent-test.strace.txt -f -ttT -s256 bin/test_tevent_trace'
would do? Maybe with truss or dtruss
Comment 3 Torrekie Gen 2023-10-12 14:41:55 UTC
Sorry for the inconveniences that caused by this bug report, the problem I have met was related with codesigning/sandbox mechanism differences between macOS and iOS, which on iOS it verifies a strict install_name by default.

This problem solved by changing libtevent.dylib's install name and install it under /usr/lib with owner 0:0.