mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Rename _test_mount to _test_cycle_mount
This makes it clear when we are using "mount ; umount" versus "mount
-o remount" for most file systems. The reason for this distinction is
(a) tests may want to test the difference between what happens on the
remount versus the munt paths, (b) with tmpfs, "mount ; umount" will
cause the contents of all of the files to disappear which makes many
tests sad, and (c) some mount options may not be changed using "mount
-o remount".
Currently _test_mount performs "_test_mount ; _test_umount"
so mechnically rename this function to _test_cycle_mount. This was
done mechnically using the script fragment:
git grep -E "_test_remount" | \
awk -F: '{print $1}' | sort -u | grep -v tests/xfs/189 \
xargs sed -i 's/_test_remount/_test_cycle_mount/g'
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
76c21d6815
commit
dddae984bc
@@ -354,7 +354,7 @@ _test_unmount()
|
||||
fi
|
||||
}
|
||||
|
||||
_test_remount()
|
||||
_test_cycle_mount()
|
||||
{
|
||||
_test_unmount
|
||||
_test_mount
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ _cleanup()
|
||||
{
|
||||
cd /
|
||||
# we might get here with a RO FS
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
# now remove fsstress directory.
|
||||
# N.B. rm(1) on IRIX can find problems when building up a long pathname
|
||||
# such that what it has is greater the 1024 chars and will
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ echo "Create the original files"
|
||||
blksz=65536
|
||||
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -68,7 +68,7 @@ echo "Reflink the middle blocks together"
|
||||
free_before=$(stat -f -c '%a' $testdir)
|
||||
_reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
|
||||
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
free_after=$(stat -f -c '%a' $testdir)
|
||||
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
|
||||
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ echo "Create the original files"
|
||||
blksz=65536
|
||||
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -69,7 +69,7 @@ echo "Reflink the middle blocks together"
|
||||
free_before=$(stat -f -c '%a' $testdir)
|
||||
_reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
|
||||
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
free_after=$(stat -f -c '%a' $testdir)
|
||||
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
|
||||
|
||||
|
||||
+3
-3
@@ -60,7 +60,7 @@ _pwrite_byte 0x61 0 $((blksz * 8)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x62 0 $((blksz * 8)) $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x63 0 $((blksz * 8)) $testdir/file3 >> $seqres.full
|
||||
_pwrite_byte 0x64 0 $((blksz * 8)) $testdir/file4 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -80,7 +80,7 @@ echo "Reflink the first four blocks together, 1-2 3-4"
|
||||
free_before=$(stat -f -c '%a' $testdir)
|
||||
_reflink_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) >> $seqres.full
|
||||
_reflink_range $testdir/file3 0 $testdir/file4 0 $((blksz * 4)) >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
free_after=$(stat -f -c '%a' $testdir)
|
||||
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
|
||||
|
||||
@@ -112,7 +112,7 @@ echo "Reflink the first two blocks together, 1-3 1-4"
|
||||
free_before=$(stat -f -c '%a' $testdir)
|
||||
_reflink_range $testdir/file1 0 $testdir/file3 0 $((blksz * 2)) >> $seqres.full
|
||||
_reflink_range $testdir/file1 0 $testdir/file4 0 $((blksz * 2)) >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
free_after=$(stat -f -c '%a' $testdir)
|
||||
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
|
||||
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ echo "Create the original files"
|
||||
blksz=65536
|
||||
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -68,7 +68,7 @@ echo "Dedupe the middle blocks together"
|
||||
free_before=$(stat -f -c '%a' $testdir)
|
||||
_dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
|
||||
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
free_after=$(stat -f -c '%a' $testdir)
|
||||
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
|
||||
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ echo "Create the original files"
|
||||
blksz=65536
|
||||
_pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -68,7 +68,7 @@ echo "(Fail to) dedupe the middle blocks together"
|
||||
free_before=$(stat -f -c '%a' $testdir)
|
||||
_dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
|
||||
$((blksz * 4)) $((blksz * 2)) >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
free_after=$(stat -f -c '%a' $testdir)
|
||||
echo "freesp changed by $free_before -> $free_after" >> $seqres.full
|
||||
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ _pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
|
||||
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -84,7 +84,7 @@ test ${c3} = ${c4} || echo "file3 and file4 should match"
|
||||
echo "Reflink the last blocks together, 1-2 1-3"
|
||||
_reflink_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
|
||||
_reflink_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ _pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file1 >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
|
||||
_pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -86,7 +86,7 @@ echo "1->2"
|
||||
_dedupe_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
|
||||
echo "1->3"
|
||||
_dedupe_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ seq 1 $((nr_blks / 7)) | while read nr; do
|
||||
$((nr * 7 * blksz)) $blksz >> $seqres.full 2>&1
|
||||
done
|
||||
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Check block mappings"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ blksz=65536
|
||||
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
|
||||
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
@@ -79,7 +79,7 @@ _pwrite_byte 0x62 $((blksz * 16 - 34)) 17 $testdir/file3 >> $seqres.full
|
||||
|
||||
_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file3 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -60,7 +60,7 @@ blksz=65536
|
||||
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
|
||||
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
@@ -80,7 +80,7 @@ _pwrite_byte 0x62 $((blksz * 16 - 512)) 512 $testdir/file3 -d >> $seqres.full
|
||||
|
||||
_pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file2 -d >> $seqres.full
|
||||
_pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file3 -d >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ blksz=65536
|
||||
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
|
||||
_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
@@ -79,7 +79,7 @@ _mwrite_byte 0x62 $((blksz * 16 - 34)) 17 $((blksz * 48 - 3)) $testdir/file3 >>
|
||||
|
||||
_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file2 >> $seqres.full
|
||||
_mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+3
-3
@@ -61,7 +61,7 @@ blksz=65536
|
||||
nr=9
|
||||
filesize=$((blksz * nr))
|
||||
_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
csum=$(_md5_checksum $testdir/file1)
|
||||
@@ -70,13 +70,13 @@ echo "Create the reflink copies"
|
||||
seq 2 $nr | while read i; do
|
||||
_cp_reflink $testdir/file1 $testdir/file$i
|
||||
done
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Rewrite the copies"
|
||||
seq 2 $nr | while read i; do
|
||||
_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i >> $seqres.full
|
||||
done
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Examine original file"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+3
-3
@@ -62,7 +62,7 @@ blksz=65536
|
||||
nr=9
|
||||
filesize=$((blksz * nr))
|
||||
_pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
csum=$(_md5_checksum $testdir/file1)
|
||||
@@ -71,13 +71,13 @@ echo "Create the reflink copies"
|
||||
seq 2 $nr | while read i; do
|
||||
_cp_reflink $testdir/file1 $testdir/file$i
|
||||
done
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Rewrite the copies"
|
||||
seq 2 $nr | while read i; do
|
||||
_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i -d >> $seqres.full
|
||||
done
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Examine original file"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ _reflink_range $testdir/file1 $((blksz * 3)) $testdir/file4 $((blksz * 3)) \
|
||||
$blksz >> $seqres.full
|
||||
|
||||
_cp_reflink $testdir/file1 $testdir/file5
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare sections"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
@@ -116,7 +116,7 @@ echo "falloc everything"
|
||||
$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file2 >> $seqres.full
|
||||
$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file3 >> $seqres.full
|
||||
$XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file4 >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -109,7 +109,7 @@ echo "fcollapse files"
|
||||
$XFS_IO_PROG -f -c "fcollapse 0 $blksz" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "fcollapse $blksz $blksz" $testdir/file3
|
||||
$XFS_IO_PROG -f -c "fcollapse $((blksz * 2)) $blksz" $testdir/file4
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -77,7 +77,7 @@ _pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -103,7 +103,7 @@ echo "fpunch files"
|
||||
$XFS_IO_PROG -f -c "fpunch 0 $blksz" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "fpunch $blksz $blksz" $testdir/file3
|
||||
$XFS_IO_PROG -f -c "fpunch $((blksz * 2)) $blksz" $testdir/file4
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -80,7 +80,7 @@ _pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
|
||||
_pwrite_byte 0x63 $((blksz * 3)) $blksz $testdir/file4.chk >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -106,7 +106,7 @@ echo "finsert files"
|
||||
$XFS_IO_PROG -f -c "finsert 0 $blksz" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "finsert $blksz $blksz" $testdir/file3
|
||||
$XFS_IO_PROG -f -c "finsert $((blksz * 2)) $blksz" $testdir/file4
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ _pwrite_byte 0x62 $blksz 34 $testdir/file2.chk >> $seqres.full
|
||||
_pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
|
||||
_pwrite_byte 0x62 $blksz 37 $testdir/file3.chk >> $seqres.full
|
||||
_pwrite_byte 0x00 $((blksz + 37)) 3 $testdir/file3.chk >> $seqres.full
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
md5sum $testdir/file2 | _filter_test_dir
|
||||
@@ -90,7 +90,7 @@ test ${c2} = ${c3} || echo "file2 and file3 should match"
|
||||
echo "truncate files"
|
||||
$XFS_IO_PROG -f -c "truncate $((blksz + 34))" $testdir/file2
|
||||
$XFS_IO_PROG -f -c "truncate $((blksz + 40))" $testdir/file3
|
||||
_test_remount
|
||||
_test_cycle_mount
|
||||
|
||||
echo "Compare files"
|
||||
md5sum $testdir/file1 | _filter_test_dir
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user