]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: fix test 259
authorChristoph Hellwig <hch@lst.de>
Mon, 26 Sep 2011 11:44:58 +0000 (11:44 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 27 Sep 2011 04:01:23 +0000 (23:01 -0500)
Move the assignment of testfile after the sourcing of the common.* files to
make sure TEST_DIR is already defined - without this we end up creating
the file on the root filesystem, which may not support large enough files.

Also add a sync after the mkfs.xfs invocation, as losetup -d might fail
the loop device deletion with -EBUSY otherwise.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
259

diff --git a/259 b/259
index a010667c825adae4eb7cee5f62dcae4e4de2f700..6a91cba2ddc68d1e1c62a46c46c9c4297038a186 100644 (file)
--- a/259
+++ b/259
@@ -29,8 +29,6 @@ echo "QA output created by $seq"
 
 status=1       # failure is the default!
 
-testfile=$TEST_DIR/259.image
-
 _cleanup()
 {
     rm -f "$testfile"
@@ -45,6 +43,8 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 _supported_fs xfs
 _supported_os Linux
 
+testfile=$TEST_DIR/259.image
+
 # Test various sizes slightly less than 4 TB
 # 4398046511103 = 2^42 - 1
 # 4398046510592 = 2^42 - 512
@@ -63,6 +63,7 @@ do
        lofile=$(losetup -f)
        losetup $lofile "$testfile"
        "$MKFS_XFS_PROG" -b size=512 $lofile >/dev/null || echo "mkfs failed!"
+       sync
        losetup -d $lofile
 done