Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs-progs: fix misc-test/029 provide device for mount
Date: Thu, 26 Mar 2020 16:46:09 +0100
Message-ID: <20200326154609.GH5920@twin.jikos.cz> (raw)
In-Reply-To: <1585125129-11224-2-git-send-email-anand.jain@oracle.com>

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

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  8:32 [PATCH 1/2] btrfs-progs: fix fsck-test/037 skip corrupt FREE_SPACE_BITMAP Anand Jain
2020-03-25  8:32 ` [PATCH 2/2] btrfs-progs: fix misc-test/029 provide device for mount Anand Jain
2020-03-26 15:46   ` David Sterba [this message]
2020-03-27  4:15     ` Anand Jain
2020-04-01 18:35       ` David Sterba
2020-04-01  3:47   ` [PATCH 2/2 v2] " Anand Jain

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=20200326154609.GH5920@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git