Re: [PATCH 2/2] btrfs-progs: fix misc-test/029 provide device for mount

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

 



On Wed, Mar 25, 2020 at 04:32:09PM +0800, Anand Jain wrote:
> The mount fails with 'file exists' error. Fix it by providing the device
> name.

Can you be more specific about the environment where it fails? The test
passes for me.

> 
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
> ---
>  tests/misc-tests/029-send-p-different-mountpoints/test.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/misc-tests/029-send-p-different-mountpoints/test.sh b/tests/misc-tests/029-send-p-different-mountpoints/test.sh
> index a478b3d26495..e34402d9ec06 100755
> --- a/tests/misc-tests/029-send-p-different-mountpoints/test.sh
> +++ b/tests/misc-tests/029-send-p-different-mountpoints/test.sh
> @@ -19,8 +19,10 @@ run_mayfail $SUDO_HELPER mkdir -p "$SUBVOL_MNT" ||
>  run_check_mkfs_test_dev
>  run_check_mount_test_dev
>  
> +# The sed part is to replace double forward-slash with single forward-slash
> +lodev=$(losetup  | grep $(echo $TEST_DEV | sed 's/\/\//\//') | awk '{print $1}')

There's a simpler way to canonicalize a path, eg using readlink or
realpath.

And I don't see why would two slashes appear in a path. IIRC a path
starting with two slashes is standardized as a network path and
recognized by VFS but why this is a concern for the testsuite?



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

  Powered by Linux