Stop the disk size tests failing at random on ZFS (closes #150)
check / check (push) Canceled after 0s

unix.Sync can return before ZFS has counted a file's blocks, so a test
that expected the size on disk to be settled after it 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 accept either value.

Model: opus-5-5
This commit is contained in:
2026-11-02 22:27:01 +00:00
parent 2322f8bb02
commit 5d8862938d
2 changed files with 49 additions and 23 deletions
+6
View File
@@ -29,6 +29,12 @@
# Completed Steps
- the three disk size tests in `scan_test.go` no longer fail at random on ZFS,
where `unix.Sync` can return before a file's blocks are counted. 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 and accepts either value (2026-11-02,
https://git.eeqj.de/sneak/sfdupes/issues/150)
- `README.md` rewritten from scratch, sentence by sentence, as a newcomer reads
it. It leads with what the program is and how to use it. A reference section
covers every setting and every subcommand. Development and testing come last.