diff mbox

[2/4] generic/027: discard mkdir error message

Message ID 1426072534-12246-3-git-send-email-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan March 11, 2015, 11:15 a.m. UTC
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>
---
 tests/generic/027 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Eric Sandeen March 11, 2015, 2:08 p.m. UTC | #1
On 3/11/15 7:15 AM, Eryu Guan wrote:
> 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>

> ---
>  tests/generic/027 | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/generic/027 b/tests/generic/027
> index 8dab117..d2e59d6 100755
> --- a/tests/generic/027
> +++ b/tests/generic/027
> @@ -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
> 

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/generic/027 b/tests/generic/027
index 8dab117..d2e59d6 100755
--- a/tests/generic/027
+++ b/tests/generic/027
@@ -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