xfs
[Top] [All Lists]

Re: [PATCH 2/2] Make test 306 use null and zero device nodes on SCRATCH_

To: Jan Kara <jack@xxxxxxx>
Subject: Re: [PATCH 2/2] Make test 306 use null and zero device nodes on SCRATCH_MNT
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 07 May 2013 19:25:03 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1367964573-29620-2-git-send-email-jack@xxxxxxx>
References: <1367964573-29620-1-git-send-email-jack@xxxxxxx> <1367964573-29620-2-git-send-email-jack@xxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
On 5/7/13 5:09 PM, Jan Kara wrote:
> In one place of test 306, we mistakenly used /dev/null and /dev/zero
> instead of equivalent devices created on tested filesystem. So we were
> not really testing the functionality we intended.
> 
> Signed-off-by: Jan Kara <jack@xxxxxxx>

Ugh.  A fine mistake on my part.  Thanks for catching that, cripes!

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  tests/generic/306 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/generic/306 b/tests/generic/306
> index e8e0fc0..f45d142 100644
> --- a/tests/generic/306
> +++ b/tests/generic/306
> @@ -73,9 +73,9 @@ _scratch_mount -o ro || _fail "Could not mount scratch 
> readonly"
>  echo "== try to create new file"
>  touch $SCRATCH_MNT/this_should_fail 2>&1 | _filter_scratch
>  echo "== pwrite to null device"
> -$XFS_IO_PROG -F -c "pwrite 0 512" /dev/null | _filter_xfs_io
> +$XFS_IO_PROG -F -c "pwrite 0 512" $DEVNULL | _filter_xfs_io
>  echo "== pread from zero device"
> -$XFS_IO_PROG -F -c "pread 0 512" /dev/zero | _filter_xfs_io
> +$XFS_IO_PROG -F -c "pread 0 512" $DEVZERO | _filter_xfs_io
>  
>  echo "== truncating write to null device"
>  echo foo > $DEVNULL 2>&1 | _filter_scratch
> 

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