From: Brian Foster Date: Sun, 2 Feb 2014 23:06:42 +0000 (+1100) Subject: generic/313: initialise TEST_DIR before use X-Git-Tag: v2022.05.01~3264 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=710281f2606f75ee1b3090fe2c46f20878362712;p=users%2Fhch%2Fxfstests-dev.git generic/313: initialise TEST_DIR before use 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 Reviewed-by: Jie Liu Signed-off-by: Dave Chinner --- diff --git a/tests/generic/313 b/tests/generic/313 index 1237dedcc..623c777f6 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