Fix qa test 033 - if we have to retry mkfs with a different inode size,
[xfstests-dev.git] / 033
diff --git a/033 b/033
index 3f8a0fa1d4e33d093c4d3f8279209ebe415bf7d0..ec6276a0276899b8396852f598b6a4df2757af88 100755 (executable)
--- a/033
+++ b/033
@@ -5,7 +5,7 @@
 # exercise xfs_repair repairing broken filesystems (root inodes)
 #
 #-----------------------------------------------------------------------
-# Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -74,8 +74,12 @@ _check_root_inos()
 # real QA test starts here
 _require_scratch
 
-# devzero blows away 512byte blocks, so make 512byte inodes
-mkfs -t xfs -f -i size=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+# devzero blows away 512byte blocks, so make 512byte inodes (at least)
+mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+source $tmp.mkfs
+[ $isize -lt 512 ] && \
+       mkfs_xfs -isize=512 $SCRATCH_DEV | _filter_mkfs >/dev/null 2>&1
+
 `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
        sed -e 's/ //g' -e 's/^/export /'`