Repository navigation
Conversation
Pins os_inhibit_sleep_* in libobs/util/platform-nix-inhibit.c on Linux and FreeBSD before the Rust port, so the port cannot drop a path the way the first platform-nix port dropped the portal and D-Bus inhibitors. No Rust and no production code change. test_inhibit_sleep (new) covers the path with no session D-Bus: the bus address points at a missing socket and PATH holds only a fake xdg-screensaver, so the user's session is never touched. It pins a NULL inhibitor, set_active returning true only on a change, 50 activate/deactivate cycles, destroy while active joining the thread at once, NULL, empty, long and non-ASCII reasons, and two independent inhibitors. The first reset waits the full 30 s, so the fake never runs. test_inhibit_sleep_dbus gains seven cases on its private bus: the portal is used and the session screensaver is not when both exist, repeated set_active on the portal and on org.freedesktop.ScreenSaver reaches the service once per change, destroy while active releases the inhibit, the reason is copied at create byte for byte, and an empty bus falls back without calling either service. Without dbus-daemon it used to skip every case, which cmocka reports as a pass, so a Tier 2 image without dbus would have passed it silently. It now exits 77 (SKIP_RETURN_CODE), and check-skips.sh refuses a skipped test_inhibit_sleep* in Tier 2. Not pinned: the Flatpak branch (needs /.flatpak-info at the root) and a NULL reason with a portal or D-Bus inhibitor (reaches g_variant_new_string(NULL)). Refs obs-rust#1500
6 of 7 tasks
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 20, 2026
Member
|
Coordinator: closing as landed. Its characterization commit went into master with the stacked port #1504 (merged 07:08Z); the tree of this PR has no remaining diff against master. |
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 #1500
What and why
Characterization before the port of
libobs/util/platform-nix-inhibit.c.h(Linux and FreeBSDos_inhibit_sleep_*). No Rust and no production code in this change. The port may not edit these tests.The first platform-nix port (#403) dropped the portal and session D-Bus inhibitors without a failing test (#453). These tests pin every path of the file, so the port cannot do that again.
test_inhibit_sleep(new) covers the path with no session D-Bus. The bus address points at a socket that does not exist, andPATHholds only a fakexdg-screensaver, so the user's session is never touched.null_info_is_rejectedset_active(NULL, …)returns false;destroy(NULL)does nothingno_bus_falls_back_to_xdg_screensaverset_activereturns true only when the state changes. Deactivating joins at oncerepeated_activate_deactivatedestroy_while_active_joinsdestroy_inactivenull_and_odd_reasonsreason_is_copiedtwo_inhibitors_are_independentIn every case the fake
xdg-screensavernever runs: the thread waits the full 30 s before its first reset.test_inhibit_sleep_dbusgets 7 new cases on its private bus. The 3 old cases are unchanged.test_portal_preferred_over_screensaverorg.freedesktop.ScreenSaverboth up, only the portal is usedtest_portal_repeated_set_activetest_portal_destroy_while_activetest_screensaver_repeated_set_activetest_screensaver_destroy_while_activetest_screensaver_reason_is_copiedtest_empty_bus_falls_backWithout
dbus-daemon,test_inhibit_sleep_dbusused to callskip()in each case. cmocka counts that as a pass, so a Tier 2 image with nodbus-daemonwould have passed it without running anything. It now exits 77, which ctest reports as Skipped (SKIP_RETURN_CODE), andrust/tools/linux-validate/check-skips.shfails a skippedtest_inhibit_sleep*.ci/test_tier2_skips.pyhas a case for that.Not pinned:
/.flatpak-infoexists, and a test cannot create that file at the root of the file system;g_variant_new_string(NULL).RED → GREEN
13e73b115) unchanged. Headless; the D-Bus cases run on their own private bus (GTestDBus).test_inhibit_sleeptest_inhibit_sleep_dbusENABLE_RUST_LIBOBS=OFF)libobs(OFF)libobs-with-rust(ON, loaded fromlibobs-with-rust/)ctest -R '^test_inhibit_sleep' --repeat until-fail:5passed in all three.dbus-daemononPATH, ctest reportstest_inhibit_sleep_dbus ... Skipped, andtest_inhibit_sleepstill passes.uv run ci/local_gate.py --lane lint: ok.uv run python -m unittest ci/test_tier2_skips.py: 3/3.Checklist
master