Re: [PATCH xfstests v3] fstests: Add path $here before src/<file>

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Mon, Oct 21, 2019 at 09:35:46PM +0800, Zhihao Cheng wrote:
> Calling src/<file> without path '$here' may cause the problem that the
> file cannot be found.
> For example, 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
>   _supports_filetype					common/rc
>   _overlay_mount					common/overlay
>   _overlay_test_mount					common/overlay
>   _test_mount						common/rc
>   _test_cycle_mount					generic/192
> 
> 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@xxxxxxxxxx>

Thanks a lot for the work!

I found that some tests started to fail after applying this patch, they
are

generic/093 generic/125 generic/462

as these tests run the test binary as a regular user (either via su or
_user_do helper), and "$here" may contain path component that a regular
user can't access, e.g. /root. So I skip adding $here prefix in above
tests and add comments accordingly.

Thanks,
Eryu



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux