summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan.RCS <lihainong@huawei.com>2016-12-21 07:44:21 +0000
committerRyan.RCS <lihainong@huawei.com>2016-12-21 07:59:36 +0000
commitb8e82dfe4e5c25682add934f8327fa1516bc3995 (patch)
treea762a8042bb59bf2dc0c11be6df38c9119df95ea
parentcd34d540ce1d5da5ba5df0a2d169013b5b222418 (diff)
restore the yardstick-img-modify cleanup() func
There is a result failed again after last update. So i restore the clean() function to its original codes and avoid CI failed. But i'm not sure something about the clean() function, and I will check this failed clearly in future. Change-Id: I8f49533788c7ccb2016e7a484368a72028579fa8 JIRA: YARDSTICK-502 Signed-off-by: Ryan.RCS <lihainong@huawei.com>
-rwxr-xr-xtools/yardstick-img-modify8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify
index 1743d908a..68ce6e223 100755
--- a/tools/yardstick-img-modify
+++ b/tools/yardstick-img-modify
@@ -154,9 +154,11 @@ cleanup() {
mount | grep "/mnt/vivid" && umount "/mnt/vivid"
if [ -f $raw_imgfile ]; then
- if [ -z "$(kpartx -l $raw_imgfile | grep 'loop deleted')" ]; then
- kpartx -dv $raw_imgfile
- fi
+ #kpartx -dv $raw_imgfile sometimes failed, we should checked it agein.
+ #if [ -z "$(kpartx -l $raw_imgfile | grep 'loop deleted')" ]; then
+ # kpartx -dv $raw_imgfile
+ #fi
+ kpartx -dv $raw_imgfile || true
fi
rm -f $raw_imgfile