Mark Wu has uploaded a new change for review.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
tests: Fix parted_utils_tests break on fedora 18
parted 3.1 improves its support for loopback devices. The 'model' string returned by libparted is updated to 'Loopback device'. For more information, please see the parted commit 3e35b655.
Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com --- M tests/parted_utils_tests.py 1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/10843/1
diff --git a/tests/parted_utils_tests.py b/tests/parted_utils_tests.py index 808d748..bb6bc8c 100644 --- a/tests/parted_utils_tests.py +++ b/tests/parted_utils_tests.py @@ -20,6 +20,7 @@
import tempfile import os +import rpm import time
import testValidation @@ -39,6 +40,15 @@ 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' +ts = rpm.TransactionSet() +parted_version = float(list(ts.dbMatch('name', 'parted'))[0]['version']) +if parted_version >= 3.1: + LOOP_DEVICE_MODEL = 'Loopback device' +else: + LOOP_DEVICE_MODEL = ''
class PartedUtilsTests(TestCaseBase): @@ -79,7 +89,7 @@
def _blank_dev_test(self): info = putils.getDevicePartedInfo(self.devPath) - self.assertFalse(info['model']) + self.assertEquals(info['model'], LOOP_DEVICE_MODEL) self.assertTrue(info['sectorSize'] >= 0) self.assertFalse(info['type']) self.assertFalse(info['partitions']) @@ -99,7 +109,7 @@ time.sleep(1) # wait for syncing
info = putils.getDevicePartedInfo(self.devPath) - self.assertFalse(info['model']) + self.assertEquals(info['model'], LOOP_DEVICE_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/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/656/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/621/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/621/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/656/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 1: Verified
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Bala.FA has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File tests/parted_utils_tests.py Line 43: Line 44: # parted 3.1 improves its support for loopback devices. The 'model' string Line 45: # returned by libparted is updated to 'Loopback device' Line 46: ts = rpm.TransactionSet() Line 47: parted_version = float(list(ts.dbMatch('name', 'parted'))[0]['version']) Please use parted.version() than getting from rpmdb. Line 48: if parted_version >= 3.1: Line 49: LOOP_DEVICE_MODEL = 'Loopback device' Line 50: else: Line 51: LOOP_DEVICE_MODEL = ''
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File tests/parted_utils_tests.py Line 43: Line 44: # parted 3.1 improves its support for loopback devices. The 'model' string Line 45: # returned by libparted is updated to 'Loopback device' Line 46: ts = rpm.TransactionSet() Line 47: parted_version = float(list(ts.dbMatch('name', 'parted'))[0]['version']) Cool! Thanks for pointing out that. I will update it in next patch Line 48: if parted_version >= 3.1: Line 49: LOOP_DEVICE_MODEL = 'Loopback device' Line 50: else: Line 51: LOOP_DEVICE_MODEL = ''
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/632/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/667/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 2: Verified
Verified on F17 and F18
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/632/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/667/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Bala.FA has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... Commit Message Line 7: tests: Fix parted_utils_tests break on fedora 18 Line 8: Line 9: parted 3.1 improves its support for loopback devices. The 'model' string Line 10: returned by libparted is updated to 'Loopback device'. For more information, Line 11: please see the parted commit 3e35b655. How about providing patch/bug url of the commit id if available? Line 12: Line 13: Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File tests/parted_utils_tests.py Line 41: PART_END_SIZE = 47 * ONE_MB_IN_BYTES Line 42: Line 43: # parted 3.1 improves its support for loopback devices. The 'model' string Line 44: # returned by libparted is updated to 'Loopback device' Line 45: parted_version = float(putils.parted.version()['libparted']) Would you use distutils.version.StrictVersion instead of float? floats have bad reputation about precision and about handling 3.0.1 bugfix version. Line 46: if parted_version >= 3.1: Line 47: LOOP_DEVICE_MODEL = 'Loopback device' Line 48: else: Line 49: LOOP_DEVICE_MODEL = ''
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/676/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/641/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 3: Verified
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/641/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/676/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
tests: Fix parted_utils_tests break on fedora 18
parted 3.1 improves its support for loopback devices. The 'model' string returned by libparted is updated to 'Loopback device'. For more information, please see: http://anonscm.debian.org/gitweb/?p=parted/parted.git;a=commit;h=3e35b6
Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com --- M tests/parted_utils_tests.py 1 file changed, 11 insertions(+), 2 deletions(-)
Approvals: Mark Wu: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: tests: Fix parted_utils_tests break on fedora 18 ......................................................................
Patch Set 3: Looks good to me, approved
Thanks!
Would you please backport this to the ovirt-3.2 branch (which must build well on f18)?
-- To view, visit http://gerrit.ovirt.org/10843 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I1accc7eb6fc6c64b5e27fb27d9e675ad523725b0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Bala.FA barumuga@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org