public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guaneryu@gmail.com>
To: Zhihao Cheng <chengzhihao1@huawei.com>
Cc: darrick.wong@oracle.com, ebiggers@google.com,
	yi.zhang@huawei.com, fstests@vger.kernel.org
Subject: Re: [PATCH xfstests v2] common/rc: Add path $here before src/t_dir_type
Date: Thu, 17 Oct 2019 17:19:03 +0800	[thread overview]
Message-ID: <20191017091856.GI2622@desktop> (raw)
In-Reply-To: <1571188500-82985-1-git-send-email-chengzhihao1@huawei.com>

On Wed, Oct 16, 2019 at 09:15:00AM +0800, Zhihao Cheng wrote:
> Running generic/192 with overlayfs(Let ubifs as base fs) yields the
> following output:
> 
>   generic/192 - output mismatch
>      QA output created by 192
>      sleep for 5 seconds
>      test
>     +./common/rc: line 316: src/t_dir_type: No such file or directory
>      delta1 is in range
>      delta2 is in range
>     ...
> 
> When the use case fails, the call stack in generic/192 is:
> 
>   local unknowns=$(src/t_dir_type $dir u | wc -l)	common/rc:316
>   _supports_filetype					common/rc:299
>   _overlay_mount					common/overlay:52
>   _overlay_test_mount					common/overlay:93
>   _test_mount						common/rc:407
>   _test_cycle_mount					generic/192:50
> 
> Before _test_cycle_mount() being invoked, generic/192 executed 'cd /'
> to change work dir from 'xfstests-dev' to '/', so src/t_dir_type was not
> found.
> 
> Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>

Thanks for the patch! But I think it's better to fix all similar issues
in the whole fstests tree, I can see there're a lot more tests use
src/<file> without the $here prefix.

Thanks!

Eryu

> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index cfaabf10..28c27975 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -313,7 +313,7 @@ _supports_filetype()
>  		local testfile=$dir/$$.ftype
>  		touch $testfile
>  		# look for DT_UNKNOWN files
> -		local unknowns=$(src/t_dir_type $dir u | wc -l)
> +		local unknowns=$($here/src/t_dir_type $dir u | wc -l)
>  		rm $testfile
>  		# 0 unknowns is success
>  		return $unknowns
> -- 
> 2.13.6
> 

      reply	other threads:[~2019-10-17  9:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16  1:15 [PATCH xfstests v2] common/rc: Add path $here before src/t_dir_type Zhihao Cheng
2019-10-17  9:19 ` Eryu Guan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191017091856.GI2622@desktop \
    --to=guaneryu@gmail.com \
    --cc=chengzhihao1@huawei.com \
    --cc=darrick.wong@oracle.com \
    --cc=ebiggers@google.com \
    --cc=fstests@vger.kernel.org \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox