diff options
author | yang xu <xuyang.jy@cn.fujitsu.com> | 2017-12-01 18:05:36 +0800 |
---|---|---|
committer | Eryu Guan <eguan@redhat.com> | 2017-12-04 11:29:38 +0800 |
commit | bfef1cdccf6b399b01b3818784a61594249d2b73 (patch) | |
tree | 398620c11146da33ff6f6b9415c77947313ac1cb | |
parent | 88231c0c0b9d36384c859e9076ed4dd51b41cbae (diff) | |
download | xfstests-bfef1cdccf6b399b01b3818784a61594249d2b73.tar.gz |
generic/459: Fix check for ro-remount in extN
Currently ,freeze failure caused by the lack of space can not
guarantee to remount extN filesystem in read-only mode, and test
failed due to "ro" mount option not found. We can add a touch to
trigger the action which aborts journal and ro-remounts the fs.
[eguan: update commit log and comments a bit]
Signed-off-by: yang xu <xuyang.jy@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
-rwxr-xr-x | tests/generic/459 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/generic/459 b/tests/generic/459 index eb05fb80e5..e755cf7f1d 100755 --- a/tests/generic/459 +++ b/tests/generic/459 @@ -125,16 +125,19 @@ $LVM_PROG lvextend -L $newpsize $vgname/$poolname >>$seqres.full 2>&1 wait $freezeid ret=$? - # Different filesystems will handle the lack of real space in different ways, # some will remount the filesystem in read-only mode, some will not. These tests # will check if: # - The filesystem turns into Read-Only and reject further writes # - The filesystem stays in Read-Write mode, but can be frozen/thawed # without getting stuck. -ISRO=$(_fs_options /dev/mapper/$vgname-$snapname | grep -w "ro") - if [ $ret -ne 0 ]; then + # fsfreeze failed, filesystem should reject further writes and remount + # as readonly. Sometimes the previous write process won't trigger + # ro-remount, e.g. on ext3/4, do additional touch here to make sure + # filesystems see the metadata I/O error. + touch $SCRATCH_MNT/newfile >/dev/null 2>&1 + ISRO=$(_fs_options /dev/mapper/$vgname-$snapname | grep -w "ro") if [ -n "$ISRO" ]; then echo "Test OK" else |