hyperhive/hive-priv/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 258c0998ab test(#2862): cover both fd/op mismatch branches in hive-priv
check_fd_agreement is the guard that keeps a descriptor and the request
it arrived with in agreement, and both of its rejections were untested.

An fd-taking op with no descriptor must not fall back to anything: a
temp file or the response socket would send an agent's state somewhere
the caller never asked for. The mirror case matters for a different
reason -- returning the error is what drops the OwnedFd and closes it,
so ignoring a stray descriptor instead would leak one per bad request
in a long-lived root process.

The third test pins both agreeing combinations, so the check is
rejecting mismatches rather than descriptors in general. Descriptors
are real /dev/null handles so the closing drop is genuinely exercised.
2026-07-31 22:15:37 +02:00
..
main.rs test(#2862): cover both fd/op mismatch branches in hive-priv 2026-07-31 22:15:37 +02:00