mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
76f4a7b9fa
This test creates some files, runs defrag on them, and compares the before/after fragmentation as well as file md5sums and timestamps. The test currently expects to find e4defrag in /usr/bin It should be relatively easy to add more interestingly fragmented files to the tests, as well as to test that memory-mapped files aren't touched, etc - but this gives us a framework. V2: remount before checking file contents, and create common.defrag. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@lst.de>
20 lines
392 B
Plaintext
20 lines
392 B
Plaintext
QA output created by 218
|
|
zero-length file:
|
|
Before: 0
|
|
After: 0
|
|
Sparse file (no blocks):
|
|
Before: 0
|
|
After: 0
|
|
Contiguous file:
|
|
Before: 1
|
|
After: 1
|
|
Write backwards sync, but contiguous - should defrag to 1 extent
|
|
Before: 10
|
|
After: 1
|
|
Write backwards sync leaving holes - defrag should do nothing
|
|
Before: 16
|
|
After: 16
|
|
Write forwards sync leaving holes - defrag should do nothing
|
|
Before: 16
|
|
After: 16
|