[PATCH 3/3] generic/009: get the correct dev name when testing ext4

Eryu Guan eguan at redhat.com
Wed Apr 16 23:16:54 CDT 2014


If TEST_DEV is a symlink(usually a lvm), we get the wrong DEV
name. Follow link and get the correct dev name.

Signed-off-by: Eryu Guan <eguan at redhat.com>
---
 tests/generic/009 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/009 b/tests/generic/009
index 1e487b4..7675c69 100644
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -51,7 +51,7 @@ testfile=$TEST_DIR/009.$$
 
 # Disable extent zeroing for ext4 as that change where holes are created
 if [ "$FSTYP" = "ext4" ]; then
-	DEV=`basename $TEST_DEV`
+	DEV=`basename $(readlink -f $TEST_DEV)`
 	echo 0 >/sys/fs/ext4/$DEV/extent_max_zeroout_kb
 fi
 
-- 
1.9.0



More information about the xfs mailing list