mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/dmlogwrites: genericize log writes target device
The dm-log-writes infrastructure is currently implemented to use SCRATCH_DEV as a hardcoded data device. In preparation to allow use of specialized devices in certain circumstances, genericize the code to allow an arbitrary data device. This requires passing the target device as a parameter to several helper functions from various tests. No functional changes. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
+4
-4
@@ -42,7 +42,7 @@ check_files()
|
||||
local filename=$(basename $i)
|
||||
local mark="${filename##*.}"
|
||||
echo "checking $filename" >> $seqres.full
|
||||
_log_writes_replay_log $filename
|
||||
_log_writes_replay_log $filename $SCRATCH_DEV
|
||||
_scratch_mount
|
||||
local expected_md5=$(_md5_checksum $i)
|
||||
local md5=$(_md5_checksum $SCRATCH_MNT/$name)
|
||||
@@ -57,7 +57,7 @@ rm -rf $SANITY_DIR
|
||||
mkdir $SANITY_DIR
|
||||
|
||||
# Create the log
|
||||
_log_writes_init
|
||||
_log_writes_init $SCRATCH_DEV
|
||||
|
||||
_log_writes_mkfs >> $seqres.full 2>&1
|
||||
|
||||
@@ -92,7 +92,7 @@ _check_scratch_fs
|
||||
|
||||
# check pre umount
|
||||
echo "checking pre umount" >> $seqres.full
|
||||
_log_writes_replay_log last
|
||||
_log_writes_replay_log last $SCRATCH_DEV
|
||||
_scratch_mount
|
||||
_scratch_unmount
|
||||
_check_scratch_fs
|
||||
@@ -103,7 +103,7 @@ done
|
||||
|
||||
# Check the end
|
||||
echo "checking post umount" >> $seqres.full
|
||||
_log_writes_replay_log end
|
||||
_log_writes_replay_log end $SCRATCH_DEV
|
||||
_scratch_mount
|
||||
for j in `seq 0 $((NUM_FILES-1))`; do
|
||||
md5=$(_md5_checksum $SCRATCH_MNT/testfile$j)
|
||||
|
||||
Reference in New Issue
Block a user