fstests: remove _wipe_fs from dump testing entirely
PATCH v4 1/2 fstests: remove _wipe_fs from dump testing entirely
The _wipe_fs function in common/dump is a historical remnant of xfstests, it's easy to cause confusion now. Now xfstests tend to call require_scratch && scratch_mkfs && scratch_mount in each case itself, we don't need to use a function to do that specially, so remove _wipe_fs entirely.
Signed-off-by Zorro Lang <[email protected]>
---
Hi,
Send this patch singly, the other patch has been reviewed. This V4 changes xfs/035, does umount&&mkfs&&mount before _create_dumpdir_fill2.
Thanks,
Zorro
common/dump | 17 ----------------- tests/xfs/022 | 3 +++ tests/xfs/023 | 3 +++ tests/xfs/024 | 3 +++ tests/xfs/025 | 3 +++ tests/xfs/026 | 3 +++ tests/xfs/027 | 3 +++ tests/xfs/028 | 7 +++---- tests/xfs/035 | 7 +++++++ tests/xfs/036 | 3 +++ tests/xfs/037 | 3 +++ tests/xfs/038 | 3 +++ tests/xfs/039 | 3 +++ tests/xfs/043 | 5 ++++- tests/xfs/046 | 3 +++ tests/xfs/047 | 7 +++---- tests/xfs/055 | 4 ++++ tests/xfs/056 | 3 +++ tests/xfs/059 | 3 +++ tests/xfs/060 | 3 +++ tests/xfs/061 | 3 +++ tests/xfs/063 | 3 +++ tests/xfs/064 | 3 +++ tests/xfs/065 | 3 ++- tests/xfs/066 | 3 +++ tests/xfs/068 | 3 +++ tests/xfs/266 | 3 +++ tests/xfs/267 | 4 +++- tests/xfs/268 | 4 +++- tests/xfs/281 | 4 +++- tests/xfs/282 | 4 +++- tests/xfs/283 | 4 +++- tests/xfs/296 | 4 ++-- tests/xfs/301 | 2 ++ tests/xfs/302 | 3 ++- 35 files changed, 104 insertions(+), 35 deletions(-)
common/dump +0 -17
@@ -217,14 +217,6 @@ _require_tape() _set_variable } -_wipe_fs() -{ - _require_scratch - - _scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" - _scratch_mount >>$seqres.full -} - # # Cleanup created dirs and files # Called by trap
@@ -289,7 +281,6 @@ _create_dumpdir_stress_num() echo "Creating directory system to dump using fsstress." _count=$1 - _wipe_fs _param="-f link=10 -f creat=10 -f mkdir=10 -f truncate=5 -f symlink=10" rm -rf $dump_dir
@@ -567,7 +558,6 @@ End-of-File _create_dumpdir_largefile() { - _wipe_fs mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\"" _largesize=4294967297 _largefile=$dump_dir/largefile
@@ -579,7 +569,6 @@ _create_dumpdir_largefile() _create_dumpdir_fill() { - _wipe_fs _mk_fillconfig1 _do_create_dumpdir_fill _stable_fs
@@ -587,7 +576,6 @@ _create_dumpdir_fill() _create_dumpdir_fill2() { - _wipe_fs _mk_fillconfig2 _do_create_dumpdir_fill _stable_fs
@@ -595,7 +583,6 @@ _create_dumpdir_fill2() _create_dumpdir_fill_perm() { - _wipe_fs _mk_fillconfig_perm _do_create_dumpdir_fill _stable_fs
@@ -603,7 +590,6 @@ _create_dumpdir_fill_perm() _create_dumpdir_fill_ea() { - _wipe_fs _mk_fillconfig_ea _do_create_dumpdir_fill _stable_fs
@@ -615,7 +601,6 @@ _create_dumpdir_fill_ea() # _create_dumpdir_fill_multi() { - _wipe_fs _mk_fillconfig_multi _do_create_dumpdir_fill _stable_fs
@@ -720,7 +705,6 @@ End-of-File _create_dumpdir_symlinks() { - _wipe_fs _mk_symlink_config _do_create_dump_symlinks _stable_fs
@@ -771,7 +755,6 @@ _modify_level() _create_dumpdir_hardlinks() { _numsets=$1 - _wipe_fs echo "Creating directory system of hardlinks to incrementally dump." mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\""
tests/xfs/022 +3 -0
@@ -29,6 +29,9 @@ _cleanup() _supported_fs xfs _require_tape $TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount # note: fsstress uses an endian dependent random number generator, running this # will produce different output for big/little endian machines.
tests/xfs/023 +3 -0
@@ -28,6 +28,9 @@ _cleanup() _supported_fs xfs _require_tape $TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_hard _do_dump_sub
tests/xfs/024 +3 -0
@@ -26,6 +26,9 @@ _cleanup() _supported_fs xfs _require_tape $TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill # ensure file/dir timestamps precede dump timestamp sleep 2
tests/xfs/025 +3 -0
@@ -26,6 +26,9 @@ _cleanup() _supported_fs xfs _require_tape $TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_hard _do_dump_min
tests/xfs/026 +3 -0
@@ -24,6 +24,9 @@ _cleanup() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _do_dump_file
tests/xfs/027 +3 -0
@@ -24,6 +24,9 @@ _cleanup() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _do_dump_restore
tests/xfs/028 +3 -4
@@ -24,10 +24,9 @@ _cleanup() # real QA test starts here _supported_fs xfs - -# wipe test dir clean first -# so dump can be real quick -_wipe_fs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount # # Create 5 dumps
tests/xfs/035 +7 -0
@@ -25,10 +25,17 @@ _cleanup() _supported_fs xfs _require_tape $TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_hard _do_dump -L $seq.1 _rewind +_scratch_unmount + +_scratch_mkfs_xfs >>$seqres.full +_scratch_mount _create_dumpdir_fill2 _do_dump -L $seq.2 _do_restore -L $seq.2
tests/xfs/036 +3 -0
@@ -25,6 +25,9 @@ _cleanup() _supported_fs xfs _require_tape $RMT_IRIXTAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_soft _do_dump_min -o -F
tests/xfs/037 +3 -0
@@ -24,6 +24,9 @@ _cleanup() _supported_fs xfs _require_tape $RMT_TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_soft _do_dump_min -o -F
tests/xfs/038 +3 -0
@@ -24,6 +24,9 @@ _cleanup() _supported_fs xfs _require_tape $RMT_TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_hard _do_dump
tests/xfs/039 +3 -0
@@ -25,6 +25,9 @@ _cleanup() _supported_fs xfs _require_tape $RMT_IRIXTAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_soft _do_dump -o -F
tests/xfs/043 +4 -1
@@ -26,7 +26,10 @@ _cleanup() # real QA test starts here _supported_fs xfs -_require_tape $TAPE_DEV +_require_tape $TAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill _erase_hard _do_dump_sub
tests/xfs/046 +3 -0
@@ -22,6 +22,9 @@ _cleanup() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_symlinks _do_dump_file
tests/xfs/047 +3 -4
@@ -22,10 +22,9 @@ _cleanup() # real QA test starts here _supported_fs xfs - -# wipe test dir clean first -# so dump can be real quick -_wipe_fs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount # # Create 5 dumps
tests/xfs/055 +4 -0
@@ -25,6 +25,10 @@ _cleanup() _supported_fs xfs _require_tape $RMT_TAPE_USER@$RMT_IRIXTAPE_DEV +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount + _create_dumpdir_fill _erase_soft _do_dump -o -F
tests/xfs/056 +3 -0
@@ -25,6 +25,9 @@ _cleanup() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill_perm _do_dump_file
tests/xfs/059 +3 -0
@@ -26,6 +26,9 @@ _cleanup() _supported_fs xfs _require_multi_stream +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill_multi _do_dump_multi_file --multi 4
tests/xfs/060 +3 -0
@@ -26,6 +26,9 @@ _cleanup() _supported_fs xfs _require_multi_stream +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill_multi _do_dump_multi_file --multi 4
tests/xfs/061 +3 -0
@@ -24,6 +24,9 @@ _cleanup() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount # src/dumpfile based on dumping from # _create_dumpdir_fill_perm (small dump)
tests/xfs/063 +3 -0
@@ -26,6 +26,9 @@ _cleanup() _supported_fs xfs _require_attrs trusted user +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount # create files with EAs _create_dumpdir_fill_ea
tests/xfs/064 +3 -0
@@ -36,6 +36,9 @@ _ls_size_filter() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_hardlinks 9
tests/xfs/065 +2 -1
@@ -70,7 +70,8 @@ _scratch_unmount # files and directories # -_wipe_fs +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount mkdir -p $dump_dir || _fail "cannot mkdir \"$dump_dir\"" cd $dump_dir
tests/xfs/066 +3 -0
@@ -24,6 +24,7 @@ _cleanup() # real QA test starts here _supported_fs xfs _require_test +_require_scratch _my_stat_filter() {
@@ -37,6 +38,8 @@ else _notrun "Installed libc doesn't correctly handle setrlimit/ftruncate64" fi +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_largefile echo "ls dumpdir/largefile" stat $dump_dir/largefile | _my_stat_filter
tests/xfs/068 +3 -0
@@ -28,6 +28,9 @@ _cleanup() # real QA test starts here _supported_fs xfs +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_stress_num 4096
tests/xfs/266 +3 -0
@@ -50,12 +50,15 @@ filter_cumulative_quota_updates() { # real QA test starts here _supported_fs xfs +_require_scratch $XFSDUMP_PROG -h 2>&1 | grep -q -e -D if [ $? -ne 0 ]; then _notrun "requires xfsdump -D" fi +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill # ensure file/dir timestamps precede dump timestamp sleep 2
tests/xfs/267 +3 -1
@@ -34,7 +34,6 @@ _create_files() biggg 41943040 $nobody $nobody 777 attr1 some_text1 root End-of-File - _wipe_fs _do_create_dumpdir_fill _stable_fs }
@@ -48,6 +47,9 @@ _supported_fs xfs _require_tape $TAPE_DEV _require_attrs trusted +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_files _erase_hard
tests/xfs/268 +3 -1
@@ -37,7 +37,6 @@ bigg1 12582912 $nobody $nobody 777 attr1 some_text1 root bigg2 12582912 $nobody $nobody 777 attr2 some_text2 user End-of-File - _wipe_fs _do_create_dumpdir_fill _stable_fs }
@@ -51,6 +50,9 @@ _supported_fs xfs _require_tape $TAPE_DEV _require_attrs trusted user +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_files _erase_hard
tests/xfs/281 +3 -1
@@ -22,8 +22,10 @@ _cleanup() # real QA test starts here _supported_fs xfs - _require_legacy_v2_format +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill
tests/xfs/282 +3 -1
@@ -24,8 +24,10 @@ _cleanup() # real QA test starts here _supported_fs xfs - _require_legacy_v2_format +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill # ensure file/dir timestamps precede dump timestamp
tests/xfs/283 +3 -1
@@ -24,8 +24,10 @@ _cleanup() # real QA test starts here _supported_fs xfs - _require_legacy_v2_format +_require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount _create_dumpdir_fill # ensure file/dir timestamps precede dump timestamp
tests/xfs/296 +2 -2
@@ -28,8 +28,8 @@ _supported_fs xfs _require_scratch _require_command "$SETCAP_PROG" setcap _require_command "$GETCAP_PROG" getcap - -_wipe_fs +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount mkdir -p $dump_dir echo test > $dump_dir/testfile
tests/xfs/301 +2 -0
@@ -27,6 +27,8 @@ _cleanup() # Modify as appropriate. _supported_fs xfs _require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount # Extended attributes attr_name=attrname
tests/xfs/302 +2 -1
@@ -26,9 +26,10 @@ _cleanup() # Modify as appropriate. _supported_fs xfs _require_scratch +_scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed" +_scratch_mount echo "Silence is golden." -_wipe_fs mkdir $dump_dir >> $seqres.full 2>&1 || _fail "mkdir \"$dump_dir\" failed" for i in `seq 1 4`; do $XFS_IO_PROG -f -c "truncate 1t" $dump_dir/sparsefile$i \
Signature · 1 line
2.31.1