Commit Graph

1 Commits

Author SHA1 Message Date
b68ce6cccd hw_oracle: remove the temp workdir when the constructor fails (HW-ORACLE-WORKDIR-LEAK)
DrmOracle.__init__ and Oracle.__init__ create a temporary workdir and then
can raise Unavailable (a skipped probe, exit 77). close() is never reached
for an object whose constructor raised, so every skipped run left a
leonida-hw-oracle-* directory in the temp dir.

Remove the directory when the constructor made it and then fails. A
caller-supplied workdir is left alone. tests/test_hw_oracle_workdir_leak.py
covers the early, late and caller-supplied cases with no GPU or libdrm.
2026-11-24 10:53:58 +01:00