Change in vdsm[master]: tests: Skip test if mounting loop device failed

nsoffer at redhat.com nsoffer at redhat.com
Tue Oct 13 19:18:36 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: tests: Skip test if mounting loop device failed
......................................................................

tests: Skip test if mounting loop device failed

Most of the mount loop device error are eliminated now, but
mkimage.mkIsoFs still fail randomly in the CI.

Since this is not a test failure but error in setting up the test, there
is no point in failing the build randomly, annoying developers working
on unrelated changes.

We will have to dive into this error later to understand why it happens
and what is the real fix to avoid it.

Change-Id: Ibb1041580f9e7b79d7d885c99f16e774daf7a6ec
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M tests/mkimageTests.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/47301/1

diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py
index 892ad25..59683fd 100644
--- a/tests/mkimageTests.py
+++ b/tests/mkimageTests.py
@@ -189,7 +189,10 @@
         iso_img = mkimage.mkIsoFs("vmId_iso", self.files, label)
         self.assertTrue(os.path.exists(iso_img))
         m = storage.mount.Mount(iso_img, self.workdir)
-        m.mount(mntOpts='loop')
+        try:
+            m.mount(mntOpts='loop')
+        except mount.MountError as e:
+            raise SkipTest("Error mounting iso image: %s" % e)
         try:
             self._check_content()
             self._check_label(iso_img, label)


-- 
To view, visit https://gerrit.ovirt.org/47301
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb1041580f9e7b79d7d885c99f16e774daf7a6ec
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list