Skip to content

test/cmocka: Skip test_find_data_file on macOS before the bundle lookup - #2539

Closed
zackees wants to merge 1 commit into
masterfrom
fix/core-info-macos-find-data-file
Closed

zackees wants to merge 1 commit into
masterfrom
fix/core-info-macos-find-data-file

Conversation

@zackees

@zackees zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member

Follow-up to #2534. On macos-26, test_obs_core_info_characterization still fails, now with a crash (run 40410629662, on #2514 rebased onto master):

[ RUN      ] test_find_data_file
[  ERROR   ] --- Test failed with exception: Segmentation fault: 11(11)

#2534's runtime check calls obs_find_data_file and then inspects the path it returns. On macOS, find_libobs_data_file (libobs/obs-cocoa.m.h:26) builds that path from the com.obsproject.libobs framework bundle, without checking the bundle or the file. A cmocka binary has no such bundle, so the result is undefined: an earlier run returned a garbage non-NULL pointer, and this run crashed (likely strlen(NULL) on a nil NSString). The case now skips on __APPLE__ before the call, with a "characterized, not endorsed" note. Linux and Windows keep every assertion, and test files already use __APPLE__ (for example test_encoder_error_stop.c).

RED: the macOS lane above. GREEN: needs a lane that selects macOS Tier 2; #2514's re-run will show it. It is a CI fix, so RED and GREEN are pushed together.

The runtime check from #2534 calls obs_find_data_file first, and on
macos-26 that segfaults (run 40410629662): find_libobs_data_file uses the
libobs framework bundle, which a cmocka binary does not have.
@zackees

zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

Closing in favour of #2540, which fixes find_libobs_data_file (a nil bundle returns NULL) instead of skipping the case. With #2540 the macOS lane runs the full data-path checks, so a skip here would only lose coverage.

@zackees zackees closed this Oct 26, 2026
auto-merge was automatically disabled October 26, 2026 23:12

Pull request was closed

@zackees
zackees deleted the fix/core-info-macos-find-data-file branch October 26, 2026 23:12
@obs-rust-project-manager obs-rust-project-manager Bot moved this from In review to Done in obs-rust Multiview Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant