Stop the disk size tests failing at random on ZFS (closes #150)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
One ZFS commit can take a file through several sizes, and unix.Sync can return before the blocks are counted. A test that expected the size on disk to be settled therefore failed at random. The test that needs the size to change now calls unix.Sync in a loop until it does, for at most 30 seconds. All three tests read the size before and after the scan and fail only on a disk_size outside those two reads. The two that do not wait call unix.Sync once first, so a wrong 512 usually fails them. Model: opus-5-5
This commit is contained in:
@@ -29,6 +29,13 @@
|
||||
Newest first. An entry ends with its date and its issue or branch, where those
|
||||
are known.
|
||||
|
||||
- The three disk size tests in `scan_test.go` no longer fail at random on ZFS.
|
||||
`unix.Sync` can return before ZFS has counted a file's blocks, and one ZFS
|
||||
commit can take a file through several sizes. The test that needs the size to
|
||||
change waits for it, for at most 30 seconds. Each test reads the size before
|
||||
and after its scan. It fails only on a `disk_size` outside those two reads
|
||||
(2026-11-02, https://git.eeqj.de/sneak/sfdupes/issues/150)
|
||||
|
||||
- `TODO.md` rewritten from scratch by the same rules as `README.md`, sentence by
|
||||
sentence. Every completed step is kept, with its date and its issue or branch.
|
||||
The policy-compliance checklist of 2026-07-22 is folded into its step
|
||||
|
||||
Reference in New Issue
Block a user