From: Ryan.RCS Date: Wed, 21 Dec 2016 07:44:21 +0000 (+0000) Subject: restore the yardstick-img-modify cleanup() func X-Git-Tag: danube.1.0~162 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F26357%2F2;p=yardstick.git 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 --- 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