Skip to contentSkip to conversation

xfstests generic/285: find the correct block device name

PATCH New Eryu Guan 1 participant 1 message Jun 27, 2013

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 xfstests generic/285: find the correct block device name

If $TEST_DEV is a symlink to a device, most likely a lvm, generic/285 fails with the following error

+./tests/generic/285: line 53: /sys/fs/ext4/testvg-testlv1/extent_max_zeroout_kb: No such file or directory

Here TEST_DEV is /dev/mapper/testvg-testlv1

Fix it by following the link to find the correct device name.

---
 tests/generic/285 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/generic/285 +1 -1
index 8078b1c..be31852 100755
@@ -48,7 +48,7 @@ BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
 
 # 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
 
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs