mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
reflink: refactor mixed block creation code
Refactor the code that creates files with mixed block types that we feed into CoW tests to make sure that we can tiptoe around that kind of stuff. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
+1
-7
@@ -63,13 +63,7 @@ mkdir $testdir
|
||||
echo "Create the original files"
|
||||
blksz=65536
|
||||
nr=64
|
||||
_pwrite_byte 0x61 0 $((blksz * nr)) "$testdir/file1" >> "$seqres.full"
|
||||
$XFS_IO_PROG -f -c "truncate $((blksz * nr))" "$testdir/file3" >> "$seqres.full"
|
||||
_pwrite_byte 0x00 0 $((blksz * nr)) "$testdir/file3.chk" >> "$seqres.full"
|
||||
seq 0 2 $((nr-1)) | while read f; do
|
||||
_reflink_range "$testdir/file1" $((blksz * f)) "$testdir/file3" $((blksz * f)) $blksz >> "$seqres.full"
|
||||
_pwrite_byte 0x61 $((blksz * f)) $blksz "$testdir/file3.chk" >> "$seqres.full"
|
||||
done
|
||||
_weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
|
||||
_scratch_remount
|
||||
|
||||
echo "Compare files"
|
||||
|
||||
Reference in New Issue
Block a user