linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Nikolay Borisov <nborisov@suse.com>, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, josef@toxicpanda.com, guaneryu@gmail.com
Subject: Re: [PATCH v2] fstests: btrfs test if show_devname returns sprout device
Date: Mon, 13 Jul 2020 19:32:57 +0800	[thread overview]
Message-ID: <c334d1b4-5d68-f1ce-44b2-2c7501760f53@oracle.com> (raw)
In-Reply-To: <f8d76542-f7bb-5207-267e-82dae31e49af@suse.com>




>> +# check if the show_devname() returns the sprout device instead of seed device.
>> +cat /proc/self/mounts | grep $SCRATCH_MNT | awk '{print $1}' | \
>> +							_filter_devs $sprout
> 
> Why does this have to be so complicated - 4 chained program executions,
> 1 additional function...
> 

For example:
  /dev/sdb /btrfs btrfs 
ro,relatime,noacl,space_cache,subvolid=5,subvol=/ 0 0

  $1 to $3 remain constant, but $4 options might vary. So to avoid
  unnecessary breakage of test case due to kernel updates or mount
  options, I just used $1.

> dev=$(grep $SCRATCH_MOUNT /proc/mounts | awk '{printf $1}')
> 
> if [ $sprout != $dev ]; then
>   _fail "Unexpected device"
> fi
  fstests prefers use of .out file to look for the expected string.
  Will wait for Eryu comments.

Thanks, Anand

  reply	other threads:[~2020-07-13 11:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10  6:37 [PATCH] btrfs_show_devname don't traverse into the seed fsid Anand Jain
2020-07-10 14:32 ` Josef Bacik
2020-07-10 15:16   ` Anand Jain
2020-07-10 15:54 ` Martin K. Petersen
2020-07-13  5:48 ` [PATCH] fstests: btrfs test if show_devname returns sprout device Anand Jain
2020-07-13  7:03   ` Nikolay Borisov
2020-07-13 11:00     ` [PATCH v2] " Anand Jain
2020-07-13 11:15       ` Nikolay Borisov
2020-07-13 11:32         ` Anand Jain [this message]
2020-07-19 15:19           ` Eryu Guan
2020-07-20  3:55             ` [PATCH v3] " Anand Jain
2020-07-13 14:04 ` [PATCH] btrfs_show_devname don't traverse into the seed fsid Nikolay Borisov
2020-07-15 10:21 ` David Sterba

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=c334d1b4-5d68-f1ce-44b2-2c7501760f53@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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;
as well as URLs for NNTP newsgroup(s).