Stabilize DRM core contracts: fix latent panics, add diagnostics and tests

Production code fixes:
- scheme.rs: replace unwrap() after checked_mul with match binding,
  eliminating a latent panic if code is reordered
- main.rs: log request context_id (PID) on request handling failure
  instead of silently discarding the error
- drivers/amd/display.rs: split silent EDID read fallback into
  separate match arms with log::warn diagnostics for short reads
  and read failures, including byte count and connector index

Test coverage:
- gem.rs: add 4 basic tests for GemManager (create+verify,
  close+verify removal, double-close error, invalid handle error)
This commit is contained in:
2026-04-25 19:52:21 +01:00
parent 4e27bee9bf
commit e62acb2ebb
4 changed files with 72 additions and 13 deletions
@@ -129,8 +129,11 @@ fn run() -> Result<()> {
let response = match response {
Ok(response) => response,
Err(_request) => {
error!("redox-drm: failed to handle request");
Err(request) => {
error!(
"redox-drm: failed to handle request from context {}",
request.context_id()
);
continue;
}
};