Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
Nir Soffer has uploaded a new change for review. Change subject: tests: Add tests for Drive.getNextVolumeSize .. tests: Add tests for Drive.getNextVolumeSize This function mixes sizes in different units, resulting in failure to limit the volume size to Drive.truesize. Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Signed-off-by: Nir Soffer --- M tests/vmStorageTests.py 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/37725/1 diff --git a/tests/vmStorageTests.py b/tests/vmStorageTests.py index cb10b8b..925d52d 100644 --- a/tests/vmStorageTests.py +++ b/tests/vmStorageTests.py @@ -19,10 +19,12 @@ # from monkeypatch import MonkeyPatch +from testValidation import brokentest from testlib import VdsmTestCase from testlib import XMLTestCase from testlib import permutations, expandPermutations +from vdsm import constants from vdsm import utils from virt.vmdevices.storage import Drive @@ -242,6 +244,28 @@ self.assertEqual(drive.chunked, chunked) +class GetNextVolumeSizeTests(VdsmTestCase): + +def test_first_extend(self): +drive = self.chunked_drive(1024, 8192) +apparentsize_mb = drive.apparentsize / constants.MEGAB +size_mb = apparentsize_mb + drive.volExtensionChunk +self.assertEqual(drive.getNextVolumeSize(drive.apparentsize), size_mb) + +@brokentest() +def test_truesize_limit(self): +drive = self.chunked_drive(8191, 8192) +self.assertEqual(drive.getNextVolumeSize(drive.apparentsize), 8192) + +def chunked_drive(self, size_mb, maxsize_mb): +conf = drive_config( +apparentsize=str(size_mb * constants.MEGAB), +format='cow', +truesize=str(maxsize_mb * constants.MEGAB), +) +return Drive({}, self.log, **conf) + + def drive_config(**kw): """ Reutrn drive configuration updated from **kw """ conf = { -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
oVirt Jenkins CI Server has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 1: Build Failed http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15588/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/14786/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/15757/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/564/ : FAILURE -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
Nir Soffer has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 1: Verified+1 -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
Francesco Romani has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 1: Code-Review+1 nice addition. -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
oVirt Jenkins CI Server has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 2: Build Failed http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15637/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/14835/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/15806/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/613/ : FAILURE -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
Nir Soffer has abandoned this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Abandoned Merged into http://gerrit.ovirt.org/37726 -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 1: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 2: * Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: tests: Add tests for Drive.getNextVolumeSize
automat...@ovirt.org has posted comments on this change. Change subject: tests: Add tests for Drive.getNextVolumeSize .. Patch Set 2: * Update tracker::IGNORE, no Bug-Url found -- To view, visit http://gerrit.ovirt.org/37725 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2140af915f39c48803546ca7e44e07ae05872843 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Federico Simoncelli Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches