Bugfixed:run command: "yardstick-img-modify" fail! 01/25701/3
authorRyan.RCS <lihainong@huawei.com>
Fri, 9 Dec 2016 03:06:41 +0000 (03:06 +0000)
committerRyan.RCS <lihainong@huawei.com>
Thu, 15 Dec 2016 02:10:56 +0000 (02:10 +0000)
Avoid incorrect deletion of $raw_imgfile when the command:
"kpartx -dv $raw_imgfile" execute failed.

JIRA: YARDSTICK-424

Change-Id: I34dac60bda6c028c4b0f0bfd9ad077e2d5dbb0ff
Signed-off-by: Ryan.RCS <lihainong@huawei.com>
tools/yardstick-img-modify

index c28e2ad..0033383 100755 (executable)
@@ -153,7 +153,7 @@ cleanup() {
     mount | grep $mountdir && umount $mountdir
     mount | grep "/mnt/vivid" && umount "/mnt/vivid"
     if [ -f $raw_imgfile ]; then
-        kpartx -dv $raw_imgfile || true
+        kpartx -dv $raw_imgfile
     fi
     rm -f $raw_imgfile
     rm -rf $mountdir