From: Liu Yiding Date: Tue, 31 May 2022 07:12:52 +0000 (+0800) Subject: common/rc: Fix _require_batched_discard to skip test correctly X-Git-Tag: v2022.06.05~12 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bc0373ef244eb3d3d47f0877cc62fe65315d8c0a;p=xfstests-dev.git common/rc: Fix _require_batched_discard to skip test correctly 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 Reviewed-by: David Disseldorp Signed-off-by: Zorro Lang --- diff --git a/common/rc b/common/rc index 2f31ca46..08e36452 100644 --- a/common/rc +++ b/common/rc @@ -3961,7 +3961,7 @@ _require_batched_discard() 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"