Skip to content

ci: Check the renderer and the mapped libobs of a recording evidence run (Refs #1305) - #1405

Merged
zackees merged 2 commits into
obs-rust:masterfrom
vpacher:test/1305-recording-evidence-check
Oct 18, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
vpacher:test/1305-recording-evidence-check

Conversation

@vpacher

@vpacher vpacher commented Oct 18, 2026

Copy link
Copy Markdown
Member

Refs #1305

What and why

#1305 requires evidence runs with hardware rendering and the correct libobs. The runs in #1295 used llvmpipe under Xvfb. Also, since #1086 the C libobs and the libobs-with-rust twin are installed side by side, so a run can use the wrong one without an error.

This PR adds ci/recording_evidence_check.py. It is the first part of #1305 (the run driver and the report follow in a separate PR). The script reads the OBS log of a run and a copy of /proc/<pid>/maps (on macOS, the output of vmmap <pid> or lsof -p <pid>). It fails when:

  1. The log shows a software renderer (llvmpipe, softpipe, swrast, lavapipe, Microsoft Basic Render Driver, Apple Software Renderer), more than one renderer, or no renderer line.
  2. The mapped libobs is not the expected backend (--libobs c|rust). The Rust twin is identified by its /rustc/ paths, the same test as release-rust.yaml since release-rust: Look for Rust code in libobs-with-rust, not the shipped C libobs #1253.
  3. Not exactly one libobs and one graphics module are mapped, or a mapped file was deleted or replaced while OBS ran.
  4. With --prefix: a libobs or graphics module comes from outside the install prefix. Example: a stock libobs-opengl.so.30 in /lib/x86_64-linux-gnu next to our libobs. This happened on our test machine: video init failed with "Could not load function 'device_sync_create'".

On success it prints the run identity as JSON (renderer, driver version, library paths and SHA-256), for the evidence report. Every check fails closed.

RED → GREEN

  • RED commit: 1d64a25. The check is a stub; 19/19 tests in ci/test_recording_evidence_check.py fail.
  • GREEN: 36e785a. 19/19 pass. uv run python -m unittest discover -s ci -p "test_*.py" on macOS: no new failures (the 8 failures before this change are Linux-only tests and stay the same).
  • Real app: Debian 13 LXC, RTX 3060, NVIDIA 595.104.02, fork master 9f573a9 with LD_LIBRARY_PATH set to libobs-with-rust:
    • --libobs rust --prefix /opt/obs-rust: pass. Renderer NVIDIA Corporation NVIDIA GeForce RTX 3060/PCIe/SSE2, mapped .../libobs-with-rust/libobs.so.30.
    • --libobs c: fail, expected the c libobs, mapped rust.
    • --prefix /usr/lib: fail, outside the install prefix.
    • The installed C libobs.so.30 has 0 /rustc/ matches, the twin has 13.

Checklist

  • Base is master
  • I claimed the issue, or no one else has an open PR for it
  • Characterization test (if the unit had none), then RED, then GREEN commits (new tool, no characterization needed)
  • User-visible change: its line in docs/features.md is added or updated (not applicable: no user-visible change)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): not applicable
  • Intentional differences from C listed in the parity test header and rust/README.md (ports): not applicable

🤖 Generated with Claude Code

vpacher and others added 2 commits October 18, 2026 10:13
…mapped libobs (Refs obs-rust#1305)

RED: the check is a stub, 19/19 tests fail. The tests reject llvmpipe,
softpipe and WARP renderers, the wrong libobs backend, two or zero libobs,
a missing graphics module, a graphics module from outside the install
prefix and a deleted mapping, and accept the hardware setup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…run (Refs obs-rust#1305)

GREEN: 19/19. recording_evidence_check.py reads the OBS log and a copy of
/proc/<pid>/maps (or vmmap/lsof output on macOS). It fails when the log
shows a software renderer (llvmpipe, softpipe, swrast, lavapipe, WARP,
Apple Software Renderer) or more than one renderer, when the mapped
libobs is not the expected backend (Rust twin told apart by its /rustc/
paths, as in release-rust.yaml since obs-rust#1253), when not exactly one libobs
and one graphics module are mapped, when a mapping was deleted, or when
a library comes from outside --prefix (a stock libobs-opengl from the
system lib dir next to our libobs). On success it prints the run identity
(renderer, paths, SHA-256) as JSON for the evidence report.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vpacher
vpacher requested a review from zackees as a code owner October 18, 2026 08:14
@zackees
zackees added this pull request to the merge queue Oct 18, 2026
Merged via the queue into obs-rust:master with commit ad55d81 Oct 18, 2026
22 checks passed
@vpacher
vpacher deleted the test/1305-recording-evidence-check branch October 18, 2026 17:24
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.

2 participants