Change in vdsm[master]: Revert "tests: Fix parted_utils_tests break on fedora 18"

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Thu Jan 17 08:32:09 UTC 2013


Mark Wu has uploaded a new change for review.

Change subject: Revert "tests: Fix parted_utils_tests break on fedora 18"
......................................................................

Revert "tests: Fix parted_utils_tests break on fedora 18"

The commit 51d76e caused a break on rhel6 host because of a bug
in parted.version(). Please see:
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=700383
It's fixed in Fedora 14, but not backported to RHEL6. So we have to
find a workaround for the break on Fedora18.

This reverts commit 51d76e04727c2d41371eb207f02a0f84de74a140.

Change-Id: I723edbeb1fc18c0160f4cfd7d1d808fd92acf125
Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
M tests/parted_utils_tests.py
1 file changed, 2 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/11136/1

diff --git a/tests/parted_utils_tests.py b/tests/parted_utils_tests.py
index b796077..808d748 100644
--- a/tests/parted_utils_tests.py
+++ b/tests/parted_utils_tests.py
@@ -21,7 +21,6 @@
 import tempfile
 import os
 import time
-from distutils.version import StrictVersion
 
 import testValidation
 from testrunner import VdsmTestCase as TestCaseBase
@@ -40,14 +39,6 @@
 PART_SIZE_MB = 50
 FREE_SIZE = 50 * ONE_MB_IN_BYTES
 PART_END_SIZE = 47 * ONE_MB_IN_BYTES
-
-# parted 3.1 improves its support for loopback devices. The 'model' string
-# returned by libparted is updated to 'Loopback device'
-parted_version = StrictVersion(putils.parted.version()['libparted'])
-if parted_version >= StrictVersion('3.1'):
-    LOOP_DEVICE_MODEL = 'Loopback device'
-else:
-    LOOP_DEVICE_MODEL = ''
 
 
 class PartedUtilsTests(TestCaseBase):
@@ -88,7 +79,7 @@
 
     def _blank_dev_test(self):
         info = putils.getDevicePartedInfo(self.devPath)
-        self.assertEquals(info['model'], LOOP_DEVICE_MODEL)
+        self.assertFalse(info['model'])
         self.assertTrue(info['sectorSize'] >= 0)
         self.assertFalse(info['type'])
         self.assertFalse(info['partitions'])
@@ -108,7 +99,7 @@
         time.sleep(1)  # wait for syncing
 
         info = putils.getDevicePartedInfo(self.devPath)
-        self.assertEquals(info['model'], LOOP_DEVICE_MODEL)
+        self.assertFalse(info['model'])
         self.assertTrue(info['sectorSize'] >= 0)
         self.assertEquals(info['type'], 'gpt')
         self.assertTrue(info['freeSpaceRegions'][0][3] >= FREE_SIZE)


--
To view, visit http://gerrit.ovirt.org/11136
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I723edbeb1fc18c0160f4cfd7d1d808fd92acf125
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list