xfs
[Top] [All Lists]

Re: [PATCH] xfstests: don't use TEST_DIR before initialized in generic/3

To: Brian Foster <bfoster@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: [PATCH] xfstests: don't use TEST_DIR before initialized in generic/313
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Wed, 29 Jan 2014 19:58:21 +0800
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1390950403-19755-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1390950403-19755-1-git-send-email-bfoster@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
On 01/29 2014 07:06 AM, Brian Foster wrote:
> The 'testfile' environment variable is initialized before the
> xfstests environment is included into generic/313. TEST_DIR is not
> defined at this point and causes the test to operate on the root.
> Move the testfile initialization down after the general environment
> is sourced.
> 
> Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
> ---
>  tests/generic/313 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/generic/313 b/tests/generic/313
> index 1237ded..623c777 100755
> --- a/tests/generic/313
> +++ b/tests/generic/313
> @@ -29,7 +29,6 @@ seqres=$RESULT_DIR/$seq
>  echo "QA output created by $seq"
>  
>  here=`pwd`
> -testfile=$TEST_DIR/testfile.$seq
>  status=1     # failure is the default!
>  trap "_cleanup; exit \$status" 0 1 2 3 15
>  
> @@ -47,6 +46,8 @@ _cleanup()
>  _supported_fs generic
>  _supported_os IRIX Linux
>  
> +testfile=$TEST_DIR/testfile.$seq
> +
>  echo "Silence is golden"
>  
>  $here/src/t_truncate_cmtime $testfile 2>&1

Reviewed-by: Jie Liu <jeff.liu@xxxxxxxxxx>

Thanks,
-Jeff

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