]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
generic/027: discard mkdir error message
authorEryu Guan <eguan@redhat.com>
Wed, 18 Mar 2015 03:57:49 +0000 (14:57 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 18 Mar 2015 03:57:49 +0000 (14:57 +1100)
mkdir fails due to ENOSPC occasionally and will fail the whole test.
Redirect stdout and stderr to /dev/null.

Also fix the code style in _cleanup to use single tab.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/generic/027

index 8dab117c8b4cb9e7c19a26f9578b23587f2fc806..d2e59d641f03e34e38a205e1496d06b0b3f001dc 100755 (executable)
@@ -36,8 +36,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
-    cd /
-    rm -f $tmp.*
+       cd /
+       rm -f $tmp.*
 }
 
 create_file()
@@ -46,7 +46,7 @@ create_file()
        local direct=$2
        local i=0
 
-       mkdir -p $dir
+       mkdir -p $dir >/dev/null 2>&1
        while $XFS_IO_PROG -f $direct -c "pwrite 0 1k" $dir/file_$i >/dev/null 2>&1; do
                let i=$i+1
        done