test(libwebrtc): cover odd-width rate bucket rounding #16419
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16419"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-11-06T16:54:12Z.
What
Adds a Linux regression for odd-width RateTracker bucket rounding, after #16381.
The parent's valid fixtures use 100ms buckets, where floor-half and ceil-half both equal 50.
This test uses a 3ms bucket, one retained bucket, a controlled clock, and the real exports and default guest heap.
One sample at time 0 must yield zero at time 5. A ceil-half mutation incorrectly yields
1000.0 / 3.0.The topic contains only the new test and its additive registration. It needs #16381 to build.
It does not copy or change that PR's production code, headers, fixture, or targets.
The expected arithmetic follows WebRTC rate_tracker.cc.
This does not establish console behavior.
Tested
Ubuntu 24.04.2 LTS under WSL2, x86-64 i7-13700K, GCC 13.3.0, Release.
23d549a9c7b9994e14f76fcb96ff2c92a5a1beec. A separate probe uses main's declarations and confirms its constructor throwsnot implemented. This proves absence only.533e376f517a7a54372bdaa2057cb5a77bf5bf42. Its registered fixture and this new test both pass against the exact parent modules.83ba1bff597347eb23cae84ed9e26b091c69bb39. The final build integrates main, that exact parent, and this topic.45e24ed200f69e5a31219dd86861a61fa319d099; tree:89f3053593b977847032682be0b78026d577e167. All 6,801 tracked source files match this tree. Parent production and fixture bytes remain unchanged.The integrated CTest run passes 2/2. The new test asserts exact binary64 values with FE_TONEAREST:
0.01000.0 / 3.00.07000.0 / 3.0Mutation: change only production
bucketMilliseconds >> 1to(bucketMilliseconds + 1) >> 1.The unchanged parent fixture still passes. The new test fails first at time 5:
333.33333333333331, expected0.Direct D1 cleanup completes on success and the expected failure. After restoration, 2/2 pass again.
Both test executables remain fixed through mutation. Restored module and executable hashes match the baseline.
Loader traces confirm the final executable loads the integration's libwebrtc and libc.
Each test finishes below 0.01 seconds; the registered timeout is 20 seconds.
Final integration and mutation commands (
Wis the integration source;Bis its build).Builds hold the shared lock and run without credential variables:
The exact-parent control builds
guest_webrtc_rate_tracker_tests, runsctest -R '^guest_webrtc_rate_tracker$' -V,and compiles the new fixture directly with
g++ -std=c++20 -O2 -fno-fast-math -fno-reciprocal-math -frounding-math,the parent include directory, and its libwebrtc/libc paths and rpath. That executable passes all nine checks.
The main control builds
libwebrtc libcand links a small probe against those exact main modules and declarations.It calls the no-argument constructor stub and requires the
not implementedexception. It does not compile the new fixture on main.Conventions pass. The complete ownership audit finds no competing odd-bucket test; shared CMake additions concern other targets.
The overlap tool exits 2 because #15154, #15211, and #15285 conflict with main.
Full manual comparison confirms their CurrentThreadId, LogMessage/PendingTaskSafetyFlag, and FieldTrial registrations are disjoint.
No full product build, full suite, Windows/macOS run, title, console, allocator leak check, or GPU test is claimed.
This is CPU coverage. Maintainer CI remains external.
Publication refresh: main advances to
2a696e1eade4fafffb2d22f7979748f6fe078d98after the tests.Its full delta changes only unrelated AGC files and documentation; no inputs of these CPU tests change.
The topic and exact parent still merge cleanly with that head. This is a source merge check, not another runtime result.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T21:44:18Z.
Review: COMMENTED
Windows run of head
83ba1bff59, merged ontomain095ff72367in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release,BUILD_TESTING=ON.guest_webrtc_rate_tracker_odd_bucket_testsis registered only whenCMAKE_SYSTEM_NAMEisLinux, so a Windows build has no such target.Pull request closed