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>
_cleanup()
{
- cd /
- rm -f $tmp.*
+ cd /
+ rm -f $tmp.*
}
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