[sheepdog] [PATCH] fix functional test script to detach loop device
Robin Dong
robin.k.dong at gmail.com
Mon Dec 16 08:11:37 CET 2013
From: Robin Dong <sanbai at taobao.com>
When I run test case 054 and 057, there will be error like:
057 Last Used:11s. Test md hot-plug and hot-unplug - output mismatch (see 057.out.bad)
--- 057.out 2013-11-20 11:04:05.405938952 +0800
+++ 057.out.bad 2013-12-16 14:54:07.045241449 +0800
@@ -1,30 +1,33 @@
QA output created by 057
+mount: could not find any free loop device
+mount: could not find any free loop device
+mount: could not find any free loop device
using backend plain store
The reason is _cleanup_devices only umount but not detach loop devices. So
I add these detach operations.
Signed-off-by: Robin Dong <sanbai at taobao.com>
---
tests/functional/common.rc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index eadedf7..221d760 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -402,6 +402,10 @@ _cleanup_devices()
umount -l $d
rm -f $d.img
done
+
+ for d in `find /dev/ -name "loop*"`; do
+ losetup -d $d &> /dev/null
+ done
}
_list_data_obj()
--
1.7.12.4
More information about the sheepdog
mailing list