* [PATCH 1/1] xfs: update the output of AG metadata corruption checking and repair tests
@ 2018-02-26 8:26 Shan Hai
2018-02-26 22:52 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Shan Hai @ 2018-02-26 8:26 UTC (permalink / raw)
To: linux-xfs
The xfs/087 and xfs/097 fail after the introduction of the
"xfs: set up per-AG free space reservations" in the kernel code,
because the filesystem is shutdown by the per-AG metadata reservation
code on the -EFSCORRUPTED error, the above mentioned tests initiate
the -EFSCORRUPTED error intentionally but its results checking part is
out of date and cause the failure of the tests.
Update the output of the tests to match with the current kernel behavior.
Signed-off-by: Shan Hai <shan.hai@oracle.com>
---
tests/xfs/087 | 32 ++++++++++++++++----------------
tests/xfs/087.out | 26 ++++++++++++++------------
tests/xfs/097 | 32 ++++++++++++++++----------------
tests/xfs/097.out | 26 ++++++++++++++------------
4 files changed, 60 insertions(+), 56 deletions(-)
diff --git a/tests/xfs/087 b/tests/xfs/087
index 58ba958..d557c12 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -58,14 +58,14 @@ rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
-echo "+ create scratch fs"
+echo "create scratch fs"
_scratch_mkfs_xfs > /dev/null
-echo "+ mount fs image"
+echo "mount fs image"
_scratch_mount
blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
-echo "+ make some files"
+echo "make some files"
mkdir -p "${TESTDIR}"
for x in `seq 1 1024`; do
touch "${SCRATCH_MNT}/junk.${x}"
@@ -80,45 +80,45 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
-umount "${SCRATCH_MNT}"
+_scratch_unmount
-echo "+ check fs"
+echo "check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
-echo "+ corrupt image"
+echo "corrupt image"
for ag in $(seq 1 $((agcount - 1))) 0; do
_scratch_xfs_db -x -c "agi ${ag}" -c "agi ${ag}" -c "stack" -c "blocktrash -x 32 -o +64 -y 4096 -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
done
-echo "+ mount image"
-_scratch_mount
+echo "mount image"
+_try_scratch_mount 2>&1 | _filter_error_mount
-echo "+ modify files"
+echo "modify files"
broken=0
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_scratch_unmount 2>&1 | _filter_scratch
-echo "+ repair fs"
+echo "repair fs"
_scratch_xfs_repair >> $seqres.full 2>&1
-echo "+ mount image (2)"
+echo "mount image (2)"
_scratch_mount
-echo "+ chattr -R -i"
+echo "chattr -R -i"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
-echo "+ modify files (2)"
+echo "modify files (2)"
broken=0
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_scratch_unmount
-echo "+ check fs (2)"
+echo "check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
status=0
diff --git a/tests/xfs/087.out b/tests/xfs/087.out
index 1f6e0b5..c4aee5a 100644
--- a/tests/xfs/087.out
+++ b/tests/xfs/087.out
@@ -1,15 +1,17 @@
QA output created by 087
-+ create scratch fs
-+ mount fs image
-+ make some files
-+ check fs
-+ corrupt image
-+ mount image
-+ modify files
+create scratch fs
+mount fs image
+make some files
+check fs
+corrupt image
+mount image
+mount: Structure needs cleaning
+modify files
broken: 1
-+ repair fs
-+ mount image (2)
-+ chattr -R -i
-+ modify files (2)
+umount: SCRATCH_DEV: not mounted.
+repair fs
+mount image (2)
+chattr -R -i
+modify files (2)
broken: 0
-+ check fs (2)
+check fs (2)
diff --git a/tests/xfs/097 b/tests/xfs/097
index 303ad04..4d6fda5 100755
--- a/tests/xfs/097
+++ b/tests/xfs/097
@@ -60,15 +60,15 @@ rm -f $seqres.full
TESTDIR="${SCRATCH_MNT}/scratchdir"
TESTFILE="${TESTDIR}/testfile"
-echo "+ create scratch fs"
+echo "create scratch fs"
_scratch_mkfs_xfs > /dev/null
-echo "+ mount fs image"
+echo "mount fs image"
_scratch_mount
xfs_info "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
-echo "+ make some files"
+echo "make some files"
mkdir -p "${TESTDIR}"
for x in `seq 1 1024`; do
touch "${SCRATCH_MNT}/junk.${x}"
@@ -83,45 +83,45 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
-umount "${SCRATCH_MNT}"
+_scratch_unmount 2>&1 | _filter_scratch
-echo "+ check fs"
+echo "check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
-echo "+ corrupt image"
+echo "corrupt image"
for ag in $(seq 1 $((agcount - 1))) 0; do
_scratch_xfs_db -x -c "agi ${ag}" -c "agi ${ag}" -c "addr free_root" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
done
-echo "+ mount image"
-_scratch_mount
+echo "mount image"
+_try_scratch_mount 2>&1 | _filter_error_mount
-echo "+ modify files"
+echo "modify files"
broken=0
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_scratch_unmount 2>&1 | _filter_scratch
-echo "+ repair fs"
+echo "repair fs"
_scratch_xfs_repair >> $seqres.full 2>&1
-echo "+ mount image (2)"
+echo "mount image (2)"
_scratch_mount
-echo "+ chattr -R -i"
+echo "chattr -R -i"
$CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
-echo "+ modify files (2)"
+echo "modify files (2)"
broken=0
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_scratch_unmount
-echo "+ check fs (2)"
+echo "check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
status=0
diff --git a/tests/xfs/097.out b/tests/xfs/097.out
index 84f6a70..0eb2085 100644
--- a/tests/xfs/097.out
+++ b/tests/xfs/097.out
@@ -1,15 +1,17 @@
QA output created by 097
-+ create scratch fs
-+ mount fs image
-+ make some files
-+ check fs
-+ corrupt image
-+ mount image
-+ modify files
+create scratch fs
+mount fs image
+make some files
+check fs
+corrupt image
+mount image
+mount: Structure needs cleaning
+modify files
broken: 1
-+ repair fs
-+ mount image (2)
-+ chattr -R -i
-+ modify files (2)
+umount: SCRATCH_DEV: not mounted.
+repair fs
+mount image (2)
+chattr -R -i
+modify files (2)
broken: 0
-+ check fs (2)
+check fs (2)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xfs: update the output of AG metadata corruption checking and repair tests
2018-02-26 8:26 [PATCH 1/1] xfs: update the output of AG metadata corruption checking and repair tests Shan Hai
@ 2018-02-26 22:52 ` Darrick J. Wong
2018-02-27 1:17 ` Shan Hai
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2018-02-26 22:52 UTC (permalink / raw)
To: Shan Hai; +Cc: linux-xfs
On Mon, Feb 26, 2018 at 04:26:13PM +0800, Shan Hai wrote:
> The xfs/087 and xfs/097 fail after the introduction of the
> "xfs: set up per-AG free space reservations" in the kernel code,
> because the filesystem is shutdown by the per-AG metadata reservation
> code on the -EFSCORRUPTED error, the above mentioned tests initiate
> the -EFSCORRUPTED error intentionally but its results checking part is
> out of date and cause the failure of the tests.
Hmm, I think this test (and the other blocktrash fuzzers) need more
surgery than this. Those tests do:
1. format
2. blocktrash
3. mount
4. modify fs
5. unmount
However, in light of Eryu's changes to _scratch_mount to _fail the test
if the mount fails, that needs to become...
if _scratch_mount >> $seqres.full 2>&1; then
# modify fs
_scratch_umount
fi
Note that this also solves the 'structure needs cleaning' lines in the
dirty output. Since there are a lot of blocktrash fuzzers I'll take
care of fixing them all for you. It's been too long since I ran them
anyway.
> Update the output of the tests to match with the current kernel behavior.
>
> Signed-off-by: Shan Hai <shan.hai@oracle.com>
> ---
> tests/xfs/087 | 32 ++++++++++++++++----------------
> tests/xfs/087.out | 26 ++++++++++++++------------
> tests/xfs/097 | 32 ++++++++++++++++----------------
> tests/xfs/097.out | 26 ++++++++++++++------------
> 4 files changed, 60 insertions(+), 56 deletions(-)
>
> diff --git a/tests/xfs/087 b/tests/xfs/087
> index 58ba958..d557c12 100755
> --- a/tests/xfs/087
> +++ b/tests/xfs/087
> @@ -58,14 +58,14 @@ rm -f $seqres.full
> TESTDIR="${SCRATCH_MNT}/scratchdir"
> TESTFILE="${TESTDIR}/testfile"
>
> -echo "+ create scratch fs"
> +echo "create scratch fs"
Why is it necessary to change this part of the golden output?
--D
> _scratch_mkfs_xfs > /dev/null
>
> -echo "+ mount fs image"
> +echo "mount fs image"
> _scratch_mount
> blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
>
> -echo "+ make some files"
> +echo "make some files"
> mkdir -p "${TESTDIR}"
> for x in `seq 1 1024`; do
> touch "${SCRATCH_MNT}/junk.${x}"
> @@ -80,45 +80,45 @@ for x in `seq 2 64`; do
> done
> inode="$(stat -c '%i' "${TESTFILE}.1")"
> agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
> -umount "${SCRATCH_MNT}"
> +_scratch_unmount
>
> -echo "+ check fs"
> +echo "check fs"
> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>
> -echo "+ corrupt image"
> +echo "corrupt image"
> for ag in $(seq 1 $((agcount - 1))) 0; do
> _scratch_xfs_db -x -c "agi ${ag}" -c "agi ${ag}" -c "stack" -c "blocktrash -x 32 -o +64 -y 4096 -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
> done
>
> -echo "+ mount image"
> -_scratch_mount
> +echo "mount image"
> +_try_scratch_mount 2>&1 | _filter_error_mount
>
> -echo "+ modify files"
> +echo "modify files"
> broken=0
> for x in `seq 65 70`; do
> touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
> done
> echo "broken: ${broken}"
> -umount "${SCRATCH_MNT}"
> +_scratch_unmount 2>&1 | _filter_scratch
>
> -echo "+ repair fs"
> +echo "repair fs"
> _scratch_xfs_repair >> $seqres.full 2>&1
>
> -echo "+ mount image (2)"
> +echo "mount image (2)"
> _scratch_mount
>
> -echo "+ chattr -R -i"
> +echo "chattr -R -i"
> $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
>
> -echo "+ modify files (2)"
> +echo "modify files (2)"
> broken=0
> for x in `seq 65 70`; do
> touch "${TESTFILE}.${x}" || broken=1
> done
> echo "broken: ${broken}"
> -umount "${SCRATCH_MNT}"
> +_scratch_unmount
>
> -echo "+ check fs (2)"
> +echo "check fs (2)"
> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>
> status=0
> diff --git a/tests/xfs/087.out b/tests/xfs/087.out
> index 1f6e0b5..c4aee5a 100644
> --- a/tests/xfs/087.out
> +++ b/tests/xfs/087.out
> @@ -1,15 +1,17 @@
> QA output created by 087
> -+ create scratch fs
> -+ mount fs image
> -+ make some files
> -+ check fs
> -+ corrupt image
> -+ mount image
> -+ modify files
> +create scratch fs
> +mount fs image
> +make some files
> +check fs
> +corrupt image
> +mount image
> +mount: Structure needs cleaning
> +modify files
> broken: 1
> -+ repair fs
> -+ mount image (2)
> -+ chattr -R -i
> -+ modify files (2)
> +umount: SCRATCH_DEV: not mounted.
> +repair fs
> +mount image (2)
> +chattr -R -i
> +modify files (2)
> broken: 0
> -+ check fs (2)
> +check fs (2)
> diff --git a/tests/xfs/097 b/tests/xfs/097
> index 303ad04..4d6fda5 100755
> --- a/tests/xfs/097
> +++ b/tests/xfs/097
> @@ -60,15 +60,15 @@ rm -f $seqres.full
> TESTDIR="${SCRATCH_MNT}/scratchdir"
> TESTFILE="${TESTDIR}/testfile"
>
> -echo "+ create scratch fs"
> +echo "create scratch fs"
> _scratch_mkfs_xfs > /dev/null
>
> -echo "+ mount fs image"
> +echo "mount fs image"
> _scratch_mount
> xfs_info "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
> blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
>
> -echo "+ make some files"
> +echo "make some files"
> mkdir -p "${TESTDIR}"
> for x in `seq 1 1024`; do
> touch "${SCRATCH_MNT}/junk.${x}"
> @@ -83,45 +83,45 @@ for x in `seq 2 64`; do
> done
> inode="$(stat -c '%i' "${TESTFILE}.1")"
> agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
> -umount "${SCRATCH_MNT}"
> +_scratch_unmount 2>&1 | _filter_scratch
>
> -echo "+ check fs"
> +echo "check fs"
> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>
> -echo "+ corrupt image"
> +echo "corrupt image"
> for ag in $(seq 1 $((agcount - 1))) 0; do
> _scratch_xfs_db -x -c "agi ${ag}" -c "agi ${ag}" -c "addr free_root" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
> done
>
> -echo "+ mount image"
> -_scratch_mount
> +echo "mount image"
> +_try_scratch_mount 2>&1 | _filter_error_mount
>
> -echo "+ modify files"
> +echo "modify files"
> broken=0
> for x in `seq 65 70`; do
> touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
> done
> echo "broken: ${broken}"
> -umount "${SCRATCH_MNT}"
> +_scratch_unmount 2>&1 | _filter_scratch
>
> -echo "+ repair fs"
> +echo "repair fs"
> _scratch_xfs_repair >> $seqres.full 2>&1
>
> -echo "+ mount image (2)"
> +echo "mount image (2)"
> _scratch_mount
>
> -echo "+ chattr -R -i"
> +echo "chattr -R -i"
> $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
>
> -echo "+ modify files (2)"
> +echo "modify files (2)"
> broken=0
> for x in `seq 65 70`; do
> touch "${TESTFILE}.${x}" || broken=1
> done
> echo "broken: ${broken}"
> -umount "${SCRATCH_MNT}"
> +_scratch_unmount
>
> -echo "+ check fs (2)"
> +echo "check fs (2)"
> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>
> status=0
> diff --git a/tests/xfs/097.out b/tests/xfs/097.out
> index 84f6a70..0eb2085 100644
> --- a/tests/xfs/097.out
> +++ b/tests/xfs/097.out
> @@ -1,15 +1,17 @@
> QA output created by 097
> -+ create scratch fs
> -+ mount fs image
> -+ make some files
> -+ check fs
> -+ corrupt image
> -+ mount image
> -+ modify files
> +create scratch fs
> +mount fs image
> +make some files
> +check fs
> +corrupt image
> +mount image
> +mount: Structure needs cleaning
> +modify files
> broken: 1
> -+ repair fs
> -+ mount image (2)
> -+ chattr -R -i
> -+ modify files (2)
> +umount: SCRATCH_DEV: not mounted.
> +repair fs
> +mount image (2)
> +chattr -R -i
> +modify files (2)
> broken: 0
> -+ check fs (2)
> +check fs (2)
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] xfs: update the output of AG metadata corruption checking and repair tests
2018-02-26 22:52 ` Darrick J. Wong
@ 2018-02-27 1:17 ` Shan Hai
0 siblings, 0 replies; 3+ messages in thread
From: Shan Hai @ 2018-02-27 1:17 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs
On 2018年02月27日 06:52, Darrick J. Wong wrote:
> On Mon, Feb 26, 2018 at 04:26:13PM +0800, Shan Hai wrote:
>> The xfs/087 and xfs/097 fail after the introduction of the
>> "xfs: set up per-AG free space reservations" in the kernel code,
>> because the filesystem is shutdown by the per-AG metadata reservation
>> code on the -EFSCORRUPTED error, the above mentioned tests initiate
>> the -EFSCORRUPTED error intentionally but its results checking part is
>> out of date and cause the failure of the tests.
> Hmm, I think this test (and the other blocktrash fuzzers) need more
> surgery than this. Those tests do:
>
> 1. format
> 2. blocktrash
> 3. mount
> 4. modify fs
> 5. unmount
>
> However, in light of Eryu's changes to _scratch_mount to _fail the test
> if the mount fails, that needs to become...
>
> if _scratch_mount >> $seqres.full 2>&1; then
> # modify fs
> _scratch_umount
> fi
Agreed.
> Note that this also solves the 'structure needs cleaning' lines in the
> dirty output. Since there are a lot of blocktrash fuzzers I'll take
> care of fixing them all for you. It's been too long since I ran them
> anyway.
>
Thanks for your kind help.
>> Update the output of the tests to match with the current kernel behavior.
>>
>> Signed-off-by: Shan Hai <shan.hai@oracle.com>
>> ---
>> tests/xfs/087 | 32 ++++++++++++++++----------------
>> tests/xfs/087.out | 26 ++++++++++++++------------
>> tests/xfs/097 | 32 ++++++++++++++++----------------
>> tests/xfs/097.out | 26 ++++++++++++++------------
>> 4 files changed, 60 insertions(+), 56 deletions(-)
>>
>> diff --git a/tests/xfs/087 b/tests/xfs/087
>> index 58ba958..d557c12 100755
>> --- a/tests/xfs/087
>> +++ b/tests/xfs/087
>> @@ -58,14 +58,14 @@ rm -f $seqres.full
>> TESTDIR="${SCRATCH_MNT}/scratchdir"
>> TESTFILE="${TESTDIR}/testfile"
>>
>> -echo "+ create scratch fs"
>> +echo "create scratch fs"
> Why is it necessary to change this part of the golden output?
In order to make the format consistent in the x.out file, since the
output of the
'_try_scratch_mount 2>&1 | _filter_error_mount' lacks leading '+'.
Thanks
Shan Hai
>
> --D
>
>> _scratch_mkfs_xfs > /dev/null
>>
>> -echo "+ mount fs image"
>> +echo "mount fs image"
>> _scratch_mount
>> blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
>>
>> -echo "+ make some files"
>> +echo "make some files"
>> mkdir -p "${TESTDIR}"
>> for x in `seq 1 1024`; do
>> touch "${SCRATCH_MNT}/junk.${x}"
>> @@ -80,45 +80,45 @@ for x in `seq 2 64`; do
>> done
>> inode="$(stat -c '%i' "${TESTFILE}.1")"
>> agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
>> -umount "${SCRATCH_MNT}"
>> +_scratch_unmount
>>
>> -echo "+ check fs"
>> +echo "check fs"
>> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>>
>> -echo "+ corrupt image"
>> +echo "corrupt image"
>> for ag in $(seq 1 $((agcount - 1))) 0; do
>> _scratch_xfs_db -x -c "agi ${ag}" -c "agi ${ag}" -c "stack" -c "blocktrash -x 32 -o +64 -y 4096 -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
>> done
>>
>> -echo "+ mount image"
>> -_scratch_mount
>> +echo "mount image"
>> +_try_scratch_mount 2>&1 | _filter_error_mount
>>
>> -echo "+ modify files"
>> +echo "modify files"
>> broken=0
>> for x in `seq 65 70`; do
>> touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
>> done
>> echo "broken: ${broken}"
>> -umount "${SCRATCH_MNT}"
>> +_scratch_unmount 2>&1 | _filter_scratch
>>
>> -echo "+ repair fs"
>> +echo "repair fs"
>> _scratch_xfs_repair >> $seqres.full 2>&1
>>
>> -echo "+ mount image (2)"
>> +echo "mount image (2)"
>> _scratch_mount
>>
>> -echo "+ chattr -R -i"
>> +echo "chattr -R -i"
>> $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
>>
>> -echo "+ modify files (2)"
>> +echo "modify files (2)"
>> broken=0
>> for x in `seq 65 70`; do
>> touch "${TESTFILE}.${x}" || broken=1
>> done
>> echo "broken: ${broken}"
>> -umount "${SCRATCH_MNT}"
>> +_scratch_unmount
>>
>> -echo "+ check fs (2)"
>> +echo "check fs (2)"
>> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>>
>> status=0
>> diff --git a/tests/xfs/087.out b/tests/xfs/087.out
>> index 1f6e0b5..c4aee5a 100644
>> --- a/tests/xfs/087.out
>> +++ b/tests/xfs/087.out
>> @@ -1,15 +1,17 @@
>> QA output created by 087
>> -+ create scratch fs
>> -+ mount fs image
>> -+ make some files
>> -+ check fs
>> -+ corrupt image
>> -+ mount image
>> -+ modify files
>> +create scratch fs
>> +mount fs image
>> +make some files
>> +check fs
>> +corrupt image
>> +mount image
>> +mount: Structure needs cleaning
>> +modify files
>> broken: 1
>> -+ repair fs
>> -+ mount image (2)
>> -+ chattr -R -i
>> -+ modify files (2)
>> +umount: SCRATCH_DEV: not mounted.
>> +repair fs
>> +mount image (2)
>> +chattr -R -i
>> +modify files (2)
>> broken: 0
>> -+ check fs (2)
>> +check fs (2)
>> diff --git a/tests/xfs/097 b/tests/xfs/097
>> index 303ad04..4d6fda5 100755
>> --- a/tests/xfs/097
>> +++ b/tests/xfs/097
>> @@ -60,15 +60,15 @@ rm -f $seqres.full
>> TESTDIR="${SCRATCH_MNT}/scratchdir"
>> TESTFILE="${TESTDIR}/testfile"
>>
>> -echo "+ create scratch fs"
>> +echo "create scratch fs"
>> _scratch_mkfs_xfs > /dev/null
>>
>> -echo "+ mount fs image"
>> +echo "mount fs image"
>> _scratch_mount
>> xfs_info "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
>> blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
>>
>> -echo "+ make some files"
>> +echo "make some files"
>> mkdir -p "${TESTDIR}"
>> for x in `seq 1 1024`; do
>> touch "${SCRATCH_MNT}/junk.${x}"
>> @@ -83,45 +83,45 @@ for x in `seq 2 64`; do
>> done
>> inode="$(stat -c '%i' "${TESTFILE}.1")"
>> agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
>> -umount "${SCRATCH_MNT}"
>> +_scratch_unmount 2>&1 | _filter_scratch
>>
>> -echo "+ check fs"
>> +echo "check fs"
>> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>>
>> -echo "+ corrupt image"
>> +echo "corrupt image"
>> for ag in $(seq 1 $((agcount - 1))) 0; do
>> _scratch_xfs_db -x -c "agi ${ag}" -c "agi ${ag}" -c "addr free_root" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full 2>&1
>> done
>>
>> -echo "+ mount image"
>> -_scratch_mount
>> +echo "mount image"
>> +_try_scratch_mount 2>&1 | _filter_error_mount
>>
>> -echo "+ modify files"
>> +echo "modify files"
>> broken=0
>> for x in `seq 65 70`; do
>> touch "${TESTFILE}.${x}" 2> /dev/null || broken=1
>> done
>> echo "broken: ${broken}"
>> -umount "${SCRATCH_MNT}"
>> +_scratch_unmount 2>&1 | _filter_scratch
>>
>> -echo "+ repair fs"
>> +echo "repair fs"
>> _scratch_xfs_repair >> $seqres.full 2>&1
>>
>> -echo "+ mount image (2)"
>> +echo "mount image (2)"
>> _scratch_mount
>>
>> -echo "+ chattr -R -i"
>> +echo "chattr -R -i"
>> $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
>>
>> -echo "+ modify files (2)"
>> +echo "modify files (2)"
>> broken=0
>> for x in `seq 65 70`; do
>> touch "${TESTFILE}.${x}" || broken=1
>> done
>> echo "broken: ${broken}"
>> -umount "${SCRATCH_MNT}"
>> +_scratch_unmount
>>
>> -echo "+ check fs (2)"
>> +echo "check fs (2)"
>> _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
>>
>> status=0
>> diff --git a/tests/xfs/097.out b/tests/xfs/097.out
>> index 84f6a70..0eb2085 100644
>> --- a/tests/xfs/097.out
>> +++ b/tests/xfs/097.out
>> @@ -1,15 +1,17 @@
>> QA output created by 097
>> -+ create scratch fs
>> -+ mount fs image
>> -+ make some files
>> -+ check fs
>> -+ corrupt image
>> -+ mount image
>> -+ modify files
>> +create scratch fs
>> +mount fs image
>> +make some files
>> +check fs
>> +corrupt image
>> +mount image
>> +mount: Structure needs cleaning
>> +modify files
>> broken: 1
>> -+ repair fs
>> -+ mount image (2)
>> -+ chattr -R -i
>> -+ modify files (2)
>> +umount: SCRATCH_DEV: not mounted.
>> +repair fs
>> +mount image (2)
>> +chattr -R -i
>> +modify files (2)
>> broken: 0
>> -+ check fs (2)
>> +check fs (2)
>> --
>> 2.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-27 1:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 8:26 [PATCH 1/1] xfs: update the output of AG metadata corruption checking and repair tests Shan Hai
2018-02-26 22:52 ` Darrick J. Wong
2018-02-27 1:17 ` Shan Hai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).