xfs
[Top] [All Lists]

Re: [PATCH] xfstests: fix wrong return check for case 022

To: Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: fix wrong return check for case 022
From: Tsutomu Itoh <t-itoh@xxxxxxxxxxxxxx>
Date: Mon, 06 Jan 2014 17:23:14 +0900
Cc: xfs@xxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, Josef Bacik <jbacik@xxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1388995737-3480-1-git-send-email-wangsl.fnst@xxxxxxxxxxxxxx>
References: <1388995737-3480-1-git-send-email-wangsl.fnst@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
On 2014/01/06 17:08, Wang Shilong wrote:
> Here we expect 0 as return value, fix it.
> 
> Signed-off-by: Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx>
> Cc: Josef Bacik <jbacik@xxxxxx>
> ---
>   tests/btrfs/022 | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>   mode change 100644 => 100755 tests/btrfs/022
> 
> diff --git a/tests/btrfs/022 b/tests/btrfs/022
> old mode 100644
> new mode 100755
> index 5b18643..142aaf9
> --- a/tests/btrfs/022
> +++ b/tests/btrfs/022
> @@ -106,7 +106,7 @@ _limit_test()
>       [ $? -ne 0 ] || _fail "quota should have limited us"
>       dd if=/dev/urandom of=$SCRATCH_MNT/a/file bs=4M count=1 >> \
>               $seqres.full 2>&1
> -     [ $? -eq 0 ] || _fail "should have been allowed to write"
> +     [ $? -ne 0 ] || _fail "should have been allowed to write"

from "man bash",
       An OR list has the form
              command1 || command2
       command2 is executed if and only if command1 returns a non-zero exit
       status.

So, original code is OK, I think.

Thanks,
Tsutomu

>   }
>   
>   _scratch_mkfs > /dev/null 2>&1
> 


<Prev in Thread] Current Thread [Next in Thread>