]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/540: use _scratch_xfs_set_metadata_field api
authorYang Xu <xuyang2018.jy@fujitsu.com>
Thu, 30 Sep 2021 10:08:00 +0000 (18:08 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 10 Oct 2021 13:35:04 +0000 (21:35 +0800)
With older xfsprogs, xfs_db write subcmd doesn't -d option. So this
case fails.  Use _scratch_xfs_set_metadata_field api to avoid this.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/540

index b00b9bcc9372144f79d0c1849e160b1769347bf8..55484dd3310cde1e7b26e01d0e6b97e492e14fb5 100755 (executable)
@@ -41,11 +41,11 @@ _scratch_unmount
 
 echo "Misconfigure the root directory"
 rtextsz_blks=$((rtextsz / dbsize))
-_scratch_xfs_db -x -c "inode $rootino" \
-       -c "write -d core.extsize $((rtextsz_blks + 1))" \
-       -c 'write -d core.rtinherit 1' \
-       -c 'write -d core.extszinherit 1' \
-       -c 'print' >> $seqres.full
+
+_scratch_xfs_set_metadata_field core.extsize $((rtextsz_blks + 1)) "inode $rootino" >> $seqres.full
+_scratch_xfs_set_metadata_field core.rtinherit 1 "inode $rootino" >> $seqres.full
+_scratch_xfs_set_metadata_field core.extszinherit 1 "inode $rootino" >> $seqres.full
+_scratch_xfs_db -x -c "inode $rootino" -c 'print' >> $seqres.full
 
 echo "Detect misconfigured directory"
 _scratch_xfs_repair -n >> $seqres.full 2>&1 && \