public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common/rc: Fix _require_batched_discard to skip test correctly
@ 2022-05-31  7:12 Liu Yiding
  2022-06-01  7:49 ` David Disseldorp
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Yiding @ 2022-05-31  7:12 UTC (permalink / raw)
  To: fstests; +Cc: Liu Yiding

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>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 70a15f9c..eae9afc6 100644
--- a/common/rc
+++ b/common/rc
@@ -4008,7 +4008,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"
-- 
2.31.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-01  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-31  7:12 [PATCH] common/rc: Fix _require_batched_discard to skip test correctly Liu Yiding
2022-06-01  7:49 ` David Disseldorp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox