Repository navigation
test: Characterize portal sleep inhibitor lifecycle - #1633
Merged
zackees merged 1 commit intoOct 21, 2026
Merged
Conversation
nathan-v
marked this pull request as ready for review
October 21, 2026 18:13
5 tasks done
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 #1631
What and why
Add nine deterministic C characterization cases for the portal sleep inhibitor before its Rust port. They pin discovery failure/success, request fields and sender path, repeated activation, success/denial/error responses, retry, cancellation, response-before-reply ordering, and destruction with pending Inhibit/Close callbacks. Allocation-count assertions check that callback-owned inhibitor storage is released.
The test includes the unchanged original C source because these entry points are hidden. It uses real GLib variants, cancellables and reference counts with a fake D-Bus transport; it does not contact a desktop or sleep. This is source-only characterization, not proof of the future Rust swap. The existing public-API test_inhibit_sleep_dbus remains unchanged and supplies OFF/ON integration coverage.
Validation
No production changes, public-header edits, existing C-test edits, or user-visible behavior change.
Checklist