]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/xfs: fix unexpected failure on real 4k sector device
authorZorro Lang <zlang@redhat.com>
Mon, 27 Feb 2017 08:23:03 +0000 (16:23 +0800)
committerEryu Guan <eguan@redhat.com>
Mon, 27 Feb 2017 08:39:28 +0000 (16:39 +0800)
_xfs_mkfs_validation_check() run "$cmd -s size=2s" to be sure if
xfsprogs support stricter input checks. But there's an unexpected
failure on 4k sector device:

  # blockdev --getbsz --getpbsz --getss $dev
  4096
  4096
  4096
  # mkfs.xfs -f -N -d file,name=$tmpfile,size=1g -s size=2s
  illegal sector size 1024; hw sector is 4096
  ....

So change the sector size from '2s' to '8s' to keep away this
failure.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/xfs

index 767a481564b85ad8fbf38612b44add72aebe45a3..4bd8465bd318971012f446e10bb53bc307a665e7 100644 (file)
@@ -542,7 +542,7 @@ _xfs_mkfs_validation_check()
        local tmpfile=`mktemp`
        local cmd="$MKFS_XFS_PROG -f -N -d file,name=$tmpfile,size=1g"
 
-       $cmd -s size=2s >/dev/null 2>&1
+       $cmd -s size=8s >/dev/null 2>&1
        local sum=$?
 
        $cmd -l version=2,su=260k >/dev/null 2>&1