From 49fef369ffa7d66608b14640b485c16e725a9714 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 1 Mar 2016 18:44:56 +0100 Subject: [PATCH] btrfs-progs: tests: fix misc/005-long-device-name-for-ssd We use a device mapper device on top of a loop device, the change in rotational status does not always propagate if change it at the loop device sysfs node. Signed-off-by: David Sterba --- tests/mkfs-tests/005-long-device-name-for-ssd/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh b/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh index c89ee0e1..cff495e6 100755 --- a/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh +++ b/tests/mkfs-tests/005-long-device-name-for-ssd/test.sh @@ -21,7 +21,8 @@ run_check truncate -s2g img loopdev=`run_check_stdout $SUDO_HELPER losetup --find --show img` run_check $SUDO_HELPER dmsetup create $dmname --table "0 1048576 linear $loopdev 0" -base=`basename "$loopdev"` +dmbase=`readlink -f $dmdev` +base=`basename "$dmbase"` rot=/sys/class/block/$base/queue/rotational # switch rotational