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