xfs/270: use _scratch_xfs_set_metadata_field to fuzz rocompat bits
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 5 Oct 2018 00:19:33 +0000 (17:19 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 14 Oct 2018 15:10:20 +0000 (23:10 +0800)
Use the helper to set the metadata field so that we can bypass write
verifier checks.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/270

index da66bc3392df4d713b45162c1dd06b3cea246a6b..fb72ba7c735495ebb00d9a2fc4e06fa4a5cc3d7d 100755 (executable)
@@ -44,8 +44,8 @@ _scratch_mkfs_xfs >>$seqres.full 2>&1
 # set the highest bit of features_ro_compat, use it as an unknown
 # feature bit. If one day this bit become known feature, please
 # change this case.
-$XFS_DB_PROG -x -c "sb 0" -c "write -d features_ro_compat $((2**31))" \
-       $SCRATCH_DEV | grep -v "Allowing write of corrupted data"
+_scratch_xfs_set_metadata_field "features_ro_compat" "$((2**31))" "sb 0" | \
+       grep 'features_ro_compat'
 
 # rw mount with unknown ro-compat feature should fail
 echo "rw mount test"