xfstest commit
ee264b3f ("common/rc: Modify _require_batched_discard to
improve test coverage") changed the way of determing if discard is
supported by checking whether fstrim output contains "not supported"
keywords.
On RHEL, fstrim output below info when discard is not supported
"fstrim: /mnt/share0/: FITRIM ioctl failed: Function not implemented"
Supplyment unsupported keywords to _require_batched_discard.
Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
fi
_require_fstrim
- grep -q "not supported" <($FSTRIM_PROG $1 2>&1)
+ grep -q -E "not supported|not implemented" <($FSTRIM_PROG $1 2>&1)
if [ "$?" = "0" ]
then
_notrun "FITRIM not supported on $1"