]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs/033: source mkfs output again if isize less than 512
authorZorro Lang <zlang@redhat.com>
Sun, 21 Aug 2016 14:47:39 +0000 (22:47 +0800)
committerEryu Guan <eguan@redhat.com>
Fri, 26 Aug 2016 07:29:49 +0000 (15:29 +0800)
When blocksize is 512b, xfs/033 will run mkfs.xfs again to make sure
inode size is 512b. As below:

  # devzero blows away 512byte blocks, so make 512byte inodes (at least)
  _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
  . $tmp.mkfs
  [ $isize -lt 512 ] && \
          _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1

But after "566ebd5 mkfs: default to CRC enabled filesystems",
xfsprogs enable CRC as default. If MKFS_OPTIONS is "-b size=512 -m
crc=0", the first "_scratch_mkfs_xfs" will make crc=0, but the
second will change "crc" to "1", because it'll waive the "-b
size=512 -m crc=0" options.

xfs/033 need to check xfs's sb_features, to use different .out
files. So we should import the mkfs output($tmp.mkfs file) again, if
we mkfs again.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/033
tests/xfs/033.out.crc.linux
tests/xfs/033.out.irix
tests/xfs/033.out.linux

index 9342f0c9ff08e1369db622978ae94fcdbe3266aa..45caf081b8a6e0b8fa6a6a1ac6510661118da9ac 100755 (executable)
@@ -78,10 +78,12 @@ _require_scratch
 _require_no_large_scratch_dev
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
-[ $isize -lt 512 ] && \
-       _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
+if [ $isize -lt 512 ]; then
+       _scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null
+       . $tmp.mkfs
+fi
 
 # link correct .out file
 FEATURES=$(_get_os_name)
index a6e86b9c8a28da74a0579fb6df88027b50ce59e9..2ab4c4323c3d86ab4f2bbbbb84a5ea09000ebccd 100644 (file)
@@ -1,10 +1,4 @@
 QA output created by 033
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
 Corrupting root inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
 Phase 1 - find and verify superblock...
index 1a2d9c3fcdb58ad0560f6bca4998b90b1cff6fbb..59601179c6fe18aa1ffde9bb856826943110856b 100644 (file)
@@ -1,10 +1,4 @@
 QA output created by 033
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
 Corrupting root inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
 Phase 1 - find and verify superblock...
index d79ce2a5551bb30efbc9d006074dd398b37619a5..68bc781058fb4fa7bc5fda75947979d96b0336c6 100644 (file)
@@ -1,10 +1,4 @@
 QA output created by 033
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
 Corrupting root inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
 Phase 1 - find and verify superblock...