Re: [PATCH v2] fstests: btrfs test if show_devname returns sprout device

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






+# 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



[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