FSTests Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] fstests: common/btrfs: use complete sub command
@ 2020-02-11  0:45 Anand Jain
  2020-02-11  1:11 ` Marcos Paulo de Souza
  0 siblings, 1 reply; 2+ messages in thread
From: Anand Jain @ 2020-02-11  0:45 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, mpdesouza

Search for 'subvolume' in the file common/btrfs failed to find all of
them, leading to a wrong inference for a moment.

Make sure we use the full subcommand name in the btrfs command.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Marcos Paulo de Souza <mpdesouza@suse.com>
---
v2: Update commit log.

 common/btrfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/btrfs b/common/btrfs
index 19ac7cc4b18c..33ad7e3b41cc 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -7,7 +7,7 @@ _btrfs_get_subvolid()
 	mnt=$1
 	name=$2
 
-	$BTRFS_UTIL_PROG sub list $mnt | grep $name | awk '{ print $2 }'
+	$BTRFS_UTIL_PROG subvolume list $mnt | grep $name | awk '{ print $2 }'
 }
 
 # _require_btrfs_command <command> [<subcommand>|<option>]
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] fstests: common/btrfs: use complete sub command
  2020-02-11  0:45 [PATCH v2] fstests: common/btrfs: use complete sub command Anand Jain
@ 2020-02-11  1:11 ` Marcos Paulo de Souza
  0 siblings, 0 replies; 2+ messages in thread
From: Marcos Paulo de Souza @ 2020-02-11  1:11 UTC (permalink / raw)
  To: Anand Jain, fstests; +Cc: linux-btrfs, mpdesouza

On Tue, 2020-02-11 at 08:45 +0800, Anand Jain wrote:
> Search for 'subvolume' in the file common/btrfs failed to find all of
> them, leading to a wrong inference for a moment.
> 
> Make sure we use the full subcommand name in the btrfs command.

Hum, in my tests realted to subvol delete by id[1], this function
successfully got the subvolid for subvol names like subvol[123].. Do
you have a case where it fails? 

> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> Marcos Paulo de Souza <mpdesouza@suse.com>

Here you meant I reviewed the first version of the patch?

Thanks,
  Marcos

[1]: 
https://lore.kernel.org/linux-btrfs/20200207131951.15859-3-marcos.souza.org@gmail.com/

> ---
> v2: Update commit log.
> 
>  common/btrfs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/btrfs b/common/btrfs
> index 19ac7cc4b18c..33ad7e3b41cc 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -7,7 +7,7 @@ _btrfs_get_subvolid()
>  	mnt=$1
>  	name=$2
>  
> -	$BTRFS_UTIL_PROG sub list $mnt | grep $name | awk '{ print $2
> }'
> +	$BTRFS_UTIL_PROG subvolume list $mnt | grep $name | awk '{
> print $2 }'
>  }
>  
>  # _require_btrfs_command <command> [<subcommand>|<option>]


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11  0:45 [PATCH v2] fstests: common/btrfs: use complete sub command Anand Jain
2020-02-11  1:11 ` Marcos Paulo de Souza

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/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 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


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