linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfstests: don't use TEST_DIR before initialized in generic/313
@ 2014-01-28 23:06 Brian Foster
  2014-01-29 11:58 ` Jeff Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Foster @ 2014-01-28 23:06 UTC (permalink / raw)
  To: xfs

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@redhat.com>
---
 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
-- 
1.8.1.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfstests: don't use TEST_DIR before initialized in generic/313
  2014-01-28 23:06 [PATCH] xfstests: don't use TEST_DIR before initialized in generic/313 Brian Foster
@ 2014-01-29 11:58 ` Jeff Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Liu @ 2014-01-29 11:58 UTC (permalink / raw)
  To: Brian Foster, xfs


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@redhat.com>
> ---
>  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@oracle.com>

Thanks,
-Jeff

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-29 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28 23:06 [PATCH] xfstests: don't use TEST_DIR before initialized in generic/313 Brian Foster
2014-01-29 11:58 ` Jeff Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).