public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function
@ 2017-01-16  6:40 Xiao Yang
  2017-01-16  7:23 ` Eryu Guan
  0 siblings, 1 reply; 6+ messages in thread
From: Xiao Yang @ 2017-01-16  6:40 UTC (permalink / raw)
  To: fstests; +Cc: Xiao Yang

generic/401 failed on RHEL6.8GA because output option is not
supported by df.  So we use $FSTYP and $SCRATCH_DEV instead of
df --output to fix it.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 common/rc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/rc b/common/rc
index 892c46e..90ad496 100644
--- a/common/rc
+++ b/common/rc
@@ -268,14 +268,12 @@ _supports_filetype()
 {
 	local dir=$1
 
-	local fstyp=$(df --output=fstype $dir | tail -1)
-	case "$fstyp" in
+	case $FSTYP in
 	xfs)
 		xfs_info $dir | grep -q "ftype=1"
 		;;
 	ext2|ext3|ext4)
-		tune2fs -l $(df --output=source $dir | tail -1) | \
-		   grep -q filetype
+		tune2fs -l $SCRATCH_DEV | grep -q filetype
 		;;
 	*)
 		local testfile=$dir/$$.ftype
-- 
1.8.3.1




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

end of thread, other threads:[~2017-01-16  8:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-16  6:40 [PATCH] common/rc: use $FSTYP and $SCRATCH_DEV in _supports_filetype function Xiao Yang
2017-01-16  7:23 ` Eryu Guan
2017-01-16  8:04   ` Xiao Yang
2017-01-16  8:07   ` [PATCH v2] common/rc: Fix " Xiao Yang
2017-01-16  8:20     ` Eryu Guan
2017-01-16  8:24       ` Xiao Yang

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