Skip to content

Commit bc0153d

Browse files
aledbfclaude
andcommitted
harness: let the unlock check's count settle
The check counted the GDM worker's open files at a fixed moment after three lock cycles, and on a slow machine the last cycle's teardown was still closing: 14 files became 16 in two of four runs, with Software refreshing Flathub behind the harness, and 16 again a moment later. A leak never comes back down, so the count is given up to 20 s to return to where it started. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 3f0f7ec commit bc0153d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎cmd/image/test.go‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,14 @@ func (r *report) unlockLeaves(v *qemu.VM, g *guest) {
806806
// The lock turned the display off, and an unlock asked for by the shell does not turn it on:
807807
// the views after would be black.
808808
wakePointer(v, nil)
809+
// The last cycle's teardown may still be closing when a slow machine is counted at once -
810+
// Software refreshing Flathub behind the harness made two files show for a while - where a
811+
// leak never comes back down: the count is given time to settle, not a fixed moment.
809812
after := files()
813+
until(20*time.Second, time.Second, func() bool {
814+
after = files()
815+
return after <= before
816+
})
810817
r.add("unlock leaves nothing open", before > 0 && after <= before,
811818
fmt.Sprintf("the session's gdm-session-worker: %d files open, %d after three locks, prompts, dropped channels and unlocks", before, after))
812819
}

0 commit comments

Comments
 (0)