Repository navigation
Phase 3: characterize leaf utilities and port crc32 (#6) - #34
Merged
Merged
Conversation
Pin current C behavior of crc32, utf8, dstr, lexer, cf-lexer/cf-parser, text-lookup, base and bmem before porting, and document the characterization-test rule and Phase 3 port order in testing-policy.md. Refs #6
Adds the calc_crc32 shim, oracle wrapper, ENABLE_RUST_LIBOBS guard, rust-exports.txt entry and Tier 1/Tier 3 tests. The safe core body is todo!(), so soldr cargo test -p obs-util --test crc32 fails 0/6. Refs #6
Table-driven reflected CRC-32 with a const fn table, matching libobs/util/crc32.c. GREEN for the Tier 1 and Tier 3 crc32 tests. Refs #6
… link (#6) fail_msg() expands to cm_print_error(), which the Windows cmocka library does not export (LNK2019). Report via fprintf and call fail().
This was referenced Oct 9, 2026
This was referenced Oct 9, 2026
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 #6
Phase 3 (pure leaf utilities): cmocka characterization tests, then the first port,
calc_crc32.Commits (policy order)
test: add cmocka characterization tests ...: 8 new cmocka tests (test_crc32, test_utf8, test_dstr, test_lexer, test_cf_lexer, test_text_lookup, test_base, test_bmem), their CMake registration, and the testing-policy.md sections for characterization tests and the Phase 3 port order. No Rust. These pin the current C behavior.test(obs-util): RED crc32 port with todo!() core: the shim, oracle, ENABLE_RUST_LIBOBS guard, rust-exports.txt entry and Tier 1/3 tests, with the safe core body set totodo!().soldr cargo test -p obs-util --test crc32fails all 6 tests.feat(obs-util): port calc_crc32 to Rust: GREEN.Verification (local, Linux)
soldr cargo test -p obs-util --test crc32 --test crc32_parity --test export_listpasses 6, 3 and 1 tests.POLYto0xEDB8_8321inrust/obs-util/src/crc32.rs.crc32_parity::matches_c_oracleFAILED. I restored the value and the test passes again../lintpasses. clang-format fixes were applied to the new C tests../unittestpasses: rust-test lane ok. Tier 2 Linux ctest passes 14/14 with ENABLE_RUST_LIBOBS OFF and 14/14 with it ON, and the libobs exported symbols are IDENTICAL OFF vs ON (1752).Not verified locally
_CRT_SECURE_NO_WARNINGSis defined globally incmake/windows/compilerconfig.cmake, so thestrcpy/fopencalls in test_dstr and test_text_lookup should not trip /WX. test_utf8 is insideif(NOT MSVC). No native CI label was added: this is not a platform implementation change.