Repository navigation
test: characterize obs-missing-files.c before port (Refs #1459) - #1460
Merged
Merged
Conversation
Pin list create and destroy, path copies, add_file versus append refcounts, script and unknown types, a null source, and the source-name snapshot plus issue_callback. Every case checks bnum_allocs. Refs obs-rust#1459
zackees
approved these changes
Oct 19, 2026
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1459. This is the characterization before the port. No Rust in this change. The port may not edit this test.
test/cmocka/test_missing_files.cpins whatlibobs/obs-missing-files.c.hdoes today. It is registered intest/cmocka/tests.d/test_missing_files.cmake. The source-name case callsobs_startup, so on Linux the test is wrapped withxvfb-run, the same waytest_audio_iois.test/cmocka/test_missing_files_list.cstays as it is. That one is the frontend leak regression for--disable-missing-files-check.empty_list_testpath_copy_testnull_and_empty_path_testdirect_destroy_testobs_missing_file_destroyfrees the file while its ref is still 1.release_null_testobs_missing_file_release(NULL)returns.add_does_not_ref_testadd_filestores the pointer and does not take a reference. Destroying the list frees the file.insertion_order_testget_filedoes not allocate.null_entry_testrelease(NULL)returns.append_keeps_files_testappendtakes a reference. Destroying the source list leaves the destination's files alive.append_empty_testscript_and_unknown_issue_testnull_source_issue_testissue_callbackreturns without calling.source_snapshot_testissue_callbackgoes throughobs_source_replace_missing_file: the callback gets the source's private data, the new path pointer, and the file's data pointer. A null new path is passed through.Every case checks
bnum_allocs().Not called, because the C crashes or does not return: a null list, a null file,
get_filepast the end, appending a list to itself (the loop grows the array it walks), a SOURCE file with a null callback and a live source, and adding the same file twice without an extra reference.How this was run
build_rust_OFF). Homebrew cmocka 2.0.2 aborts on Team ID when the test is launched in place. Copied the binary andlibcmockainto$TMPDIR, signed both ad-hoc, and the run passed 13/13, includingsource_snapshot_test.obs-rust-linux-validate(Ubuntu 26.04, Docker Desktop). This is the arm64 image. CI's Tier 2 job is x86_64.lddloaded/build/tree/libobs/libobs.so.30for OFF and/build/tree/libobs-with-rust/libobs.so.30for ON. Each library exports the 12 missing-file symbols. Underxvfb-run,test_missing_filespassed 13/13 in both modes, includingsource_snapshot_test(obs_startuplogged "Unable to open X display" and still came up).test_missing_files_listpassed 4/4 in both modes. The file is still C in both libraries. A full OFF ctest of that tree stopped on four other tests:test_group_empty_bounds,test_scene_dup_group_children,test_ws_batch_order,test_ws_current_scene_removed. An earlier build was killed by the zccache stall window and signal 137 while compiling unrelated Qt objects.Checklist
master