The test reports that the file takes an extra 4k on disk:
This is because du reports 32k for the file and 4k because the file system it lives on uses extended attributes.
We should modify the test to allow for some extra on-disk slack. The on-disk usage could also be smaller if the file data is all zeros or compression is enabled. The test currently handles the former by writing random data, we're punting on the latter.