Zhou Zheng Sheng has uploaded a new change for review.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
extract a method for booting a test VM through kernel boot
Hide the kernel boot and initramfs details into a method, then just call the metthod with ordinary VM configurations
Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com --- M tests/functional/xmlrpcTests.py 1 file changed, 23 insertions(+), 19 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/8414/1
diff --git a/tests/functional/xmlrpcTests.py b/tests/functional/xmlrpcTests.py index 2968061..91376ed 100644 --- a/tests/functional/xmlrpcTests.py +++ b/tests/functional/xmlrpcTests.py @@ -190,32 +190,36 @@ def testStartSmallVM(self): self.skipNoKVM()
- def assertVMAndGuestUp(): - self.assertVmUp(VMID) - self.assertGuestUp(VMID) + conf = {'display': 'vnc', + 'kvmEnable': 'true', + 'memSize': '256', + 'vmId': '77777777-ffff-3333-bbbb-222222222222', + 'vmName': 'vdsm_testSmallVM', + 'vmType': 'kvm'}
- VMID = '77777777-ffff-3333-bbbb-222222222222' + self._runVMKernelBoot(conf) + + def _runVMKernelBoot(self, vmDef): + vmid = vmDef['vmId'] + + def assertVMAndGuestUp(): + self.assertVmUp(vmid) + self.assertGuestUp(vmid)
with kernelBootImages() as (kernelPath, initramfsPath): - conf = {'display': 'vnc', - 'kernel': kernelPath, - 'initrd': initramfsPath, - # The initramfs is generated by dracut. The following - # arguments will be interpreted by init scripts created by - # dracut. - 'kernelArgs': 'rd.break=cmdline rd.shell rd.skipfsck', - 'kvmEnable': 'true', - 'memSize': '256', - 'vmId': VMID, - 'vmName': 'vdsm_testSmallVM', - 'vmType': 'kvm'} - + vmDef.update( + {'kernel': kernelPath, + 'initrd': initramfsPath, + # The initramfs is generated by dracut. The following + # arguments will be interpreted by init scripts created + # by dracut. + 'kernelArgs': 'rd.break=cmdline rd.shell rd.skipfsck'}) try: - self.assertVdsOK(self.s.create(conf)) + self.assertVdsOK(self.s.create(vmDef)) # wait 65 seconds for VM to come up until timeout self.retryAssert(assertVMAndGuestUp, 65, 1) finally: - destroyResult = self.s.destroy(VMID) + destroyResult = self.s.destroy(vmid)
self.assertVdsOK(destroyResult)
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Royce Lv has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File tests/functional/xmlrpcTests.py Line 212: 'initrd': initramfsPath, Line 213: # The initramfs is generated by dracut. The following Line 214: # arguments will be interpreted by init scripts created Line 215: # by dracut. Line 216: 'kernelArgs': 'rd.break=cmdline rd.shell rd.skipfsck'}) Can we abstract function for default conf generate such as: paramToChange = {'memsize':1024} kenelBoottemplate(paramToChange):this function will generate default conf except 'memsize', it will also generate a random name and vmId I like separation, but the dynamic config construction you mentioned which saggi used last week maybe even better, and we may steal from him;)Just my suggestion Line 217: try: Line 218: self.assertVdsOK(self.s.create(vmDef)) Line 219: # wait 65 seconds for VM to come up until timeout Line 220: self.retryAssert(assertVMAndGuestUp, 65, 1)
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File tests/functional/xmlrpcTests.py Line 212: 'initrd': initramfsPath, Line 213: # The initramfs is generated by dracut. The following Line 214: # arguments will be interpreted by init scripts created Line 215: # by dracut. Line 216: 'kernelArgs': 'rd.break=cmdline rd.shell rd.skipfsck'}) Nice idea, we can build a template configure dictionary in kenelBootTemplate method, and caller can make customizations, then we can update the dict. Line 217: try: Line 218: self.assertVdsOK(self.s.create(vmDef)) Line 219: # wait 65 seconds for VM to come up until timeout Line 220: self.retryAssert(assertVMAndGuestUp, 65, 1)
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 2: Verified
How to verify 1. Build and install vdsm rpms 2. su 3. cd /usr/share/vdsm/tests 4. ./run_tests.sh functional/xmlrpcTests.py
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 3: Verified
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 3:
Thanks Royce, I've updated the kernel boot patch, do you have time to review?
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Hunt Xu has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 3: I would prefer that you didn't submit this
(2 inline comments)
.................................................... Commit Message Line 6: Line 7: extract a method for booting a test VM through kernel boot Line 8: Line 9: Hide the kernel boot and initramfs details into a method and provide a Line 10: template configuration, then just call the metthod with custom VM typo 'metthod' should be fixed here Line 11: configurations Line 12: Line 13: Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c
.................................................... File tests/functional/xmlrpcTests.py Line 179: 'vmName': 'vdsm_testSmallVM'} Line 180: Line 181: self._runVMKernelBootTemplate(customization) Line 182: Line 183: def _runVMKernelBootTemplate(self, vmDef): what about def _runVMKernelBootTemplate(self, vmDef={}) to allow the use of the template configuration below Line 184: template = {'vmId': '11111111-abcd-2222-ffff-333333333333', Line 185: 'vmName': 'vdsmKernelBootVM', Line 186: 'display': 'vnc', Line 187: 'kvmEnable': 'true',
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 3: (2 inline comments)
Thanks Xu.
.................................................... Commit Message Line 6: Line 7: extract a method for booting a test VM through kernel boot Line 8: Line 9: Hide the kernel boot and initramfs details into a method and provide a Line 10: template configuration, then just call the metthod with custom VM Done Line 11: configurations Line 12: Line 13: Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c
.................................................... File tests/functional/xmlrpcTests.py Line 179: 'vmName': 'vdsm_testSmallVM'} Line 180: Line 181: self._runVMKernelBootTemplate(customization) Line 182: Line 183: def _runVMKernelBootTemplate(self, vmDef): Done Line 184: template = {'vmId': '11111111-abcd-2222-ffff-333333333333', Line 185: 'vmName': 'vdsmKernelBootVM', Line 186: 'display': 'vnc', Line 187: 'kvmEnable': 'true',
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 4: Verified
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Royce Lv has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 4: Looks good to me, but someone else must approve
I really hope this can be merged soon, so that we can write more testcases about running features
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 5: Verified
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Adam Litke has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 5: I would prefer that you didn't submit this
(2 inline comments)
It's not ok to change the permissions of a file that your package does not own.
.................................................... File tests/functional/xmlrpcTests.py Line 54: kernelVer) Line 55: Line 56: if os.path.isfile(initramfsPath): Line 57: # There is an initramfs shipped with the distro, use it Line 58: os.chmod(initramfsPath, 0644) You cannot do this. It is not okay to change the permissions of system files just so we can use them. Perhaps the system administrator did not want you to have access to that file. Line 59: try: Line 60: yield (kernelPath, initramfsPath) Line 61: finally: Line 62: pass
Line 167: 'initrd': initramfsPath, Line 168: # The initramfs is generated by dracut. The following Line 169: # arguments will be interpreted by init scripts created Line 170: # by dracut. Line 171: 'kernelArgs': 'rd.break=cmdline rd.shell rd.skipfsck'}) You've added some distro-specific things here. You should consider breaking them out so that on other distributions the args would be easy to override. Line 172: try: Line 173: self.assertVdsOK(self.s.create(template)) Line 174: # wait 65 seconds for VM to come up until timeout Line 175: retry(assertVMAndGuestUp, timeout=65)
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 5: No score
(1 inline comment)
I will update the patch according to Adam's suggestions.
.................................................... File tests/functional/xmlrpcTests.py Line 54: kernelVer) Line 55: Line 56: if os.path.isfile(initramfsPath): Line 57: # There is an initramfs shipped with the distro, use it Line 58: os.chmod(initramfsPath, 0644) Thanks Adam.
After I install kernel 3.6 rpm, the initramfs is not readable to qemu by default, so I add chmod operation. Now I think it can check the permission and skip if it is not readable to qemu and print a message. Then the admin can modify the permission himself if he wants to run the test actually. Line 59: try: Line 60: yield (kernelPath, initramfsPath) Line 61: finally: Line 62: pass
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Hunt Xu has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 6: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File tests/functional/xmlrpcTests.py Line 57: if not os.path.isfile(kernelPath): Line 58: raise SkipTest("Can not locate kernel image for release %s" % Line 59: kernelVer) Line 60: if not readableBy(kernelPath, QEMU_PROCESS_USER): Line 61: raise SkipTest("qemu process can not read the file " % kernelPath) missing a '%s' in the string? Line 62: Line 63: if os.path.isfile(initramfsPath): Line 64: # There is an initramfs shipped with the distro, try use it Line 65: if not readableBy(initramfsPath, QEMU_PROCESS_USER):
Line 166: template.update(vmDef) Line 167: vmid = template['vmId'] Line 168: Line 169: kernelArgsDistro = {'Fedora': 'rd.break=cmdline rd.shell rd.skipfsck'} Line 170: self.myAssertIn(distro, kernelArgsDistro) I would prefer to also put 'kernelArgs' in the template, and then we could easily override the default value with our customized parameters. Line 171: Line 172: def assertVMAndGuestUp(): Line 173: self.assertVmUp(vmid) Line 174: self.assertGuestUp(vmid)
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 6: (2 inline comments)
Thanks Hunt Xu , you suggestions are very wise.
.................................................... File tests/functional/xmlrpcTests.py Line 57: if not os.path.isfile(kernelPath): Line 58: raise SkipTest("Can not locate kernel image for release %s" % Line 59: kernelVer) Line 60: if not readableBy(kernelPath, QEMU_PROCESS_USER): Line 61: raise SkipTest("qemu process can not read the file " % kernelPath) Done Line 62: Line 63: if os.path.isfile(initramfsPath): Line 64: # There is an initramfs shipped with the distro, try use it Line 65: if not readableBy(initramfsPath, QEMU_PROCESS_USER):
Line 166: template.update(vmDef) Line 167: vmid = template['vmId'] Line 168: Line 169: kernelArgsDistro = {'Fedora': 'rd.break=cmdline rd.shell rd.skipfsck'} Line 170: self.myAssertIn(distro, kernelArgsDistro) Done Line 171: Line 172: def assertVMAndGuestUp(): Line 173: self.assertVmUp(vmid) Line 174: self.assertGuestUp(vmid)
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: Verified
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Hunt Xu has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Vinzenz Feenstra has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
ShaoHe Feng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: (1 inline comment)
.................................................... File tests/functional/xmlrpcTests.py Line 161: # Fedora: The initramfs is generated by dracut. The following Line 162: # arguments will be interpreted by init scripts created by Line 163: # dracut. Line 164: 'Fedora': 'rd.break=cmdline rd.shell rd.skipfsck'} Line 165: self.myAssertIn(distro, kernelArgsDistro) does this means that the distro must be 'Fedora'? there is only one item in kernelArgsDistro now, will more items be added to it? Line 166: Line 167: template = {'vmId': '11111111-abcd-2222-ffff-333333333333', Line 168: 'vmName': 'vdsmKernelBootVM', Line 169: 'display': 'vnc',
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: (1 inline comment)
.................................................... File tests/functional/xmlrpcTests.py Line 161: # Fedora: The initramfs is generated by dracut. The following Line 162: # arguments will be interpreted by init scripts created by Line 163: # dracut. Line 164: 'Fedora': 'rd.break=cmdline rd.shell rd.skipfsck'} Line 165: self.myAssertIn(distro, kernelArgsDistro) As far as I test, RHEL also works. More items can be added in future patches. Line 166: Line 167: template = {'vmId': '11111111-abcd-2222-ffff-333333333333', Line 168: 'vmName': 'vdsmKernelBootVM', Line 169: 'display': 'vnc',
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
ShaoHe Feng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: (1 inline comment)
.................................................... File tests/functional/xmlrpcTests.py Line 161: # Fedora: The initramfs is generated by dracut. The following Line 162: # arguments will be interpreted by init scripts created by Line 163: # dracut. Line 164: 'Fedora': 'rd.break=cmdline rd.shell rd.skipfsck'} Line 165: self.myAssertIn(distro, kernelArgsDistro) skip or assert, which is better, if distro is not in the support dict? Line 166: Line 167: template = {'vmId': '11111111-abcd-2222-ffff-333333333333', Line 168: 'vmName': 'vdsmKernelBootVM', Line 169: 'display': 'vnc',
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 7: (1 inline comment)
.................................................... File tests/functional/xmlrpcTests.py Line 161: # Fedora: The initramfs is generated by dracut. The following Line 162: # arguments will be interpreted by init scripts created by Line 163: # dracut. Line 164: 'Fedora': 'rd.break=cmdline rd.shell rd.skipfsck'} Line 165: self.myAssertIn(distro, kernelArgsDistro) Done Line 166: Line 167: template = {'vmId': '11111111-abcd-2222-ffff-333333333333', Line 168: 'vmName': 'vdsmKernelBootVM', Line 169: 'display': 'vnc',
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
ShaoHe Feng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 8: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 8: Verified
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Vinzenz Feenstra has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 8: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
Patch Set 8: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: extract a method for booting a test VM through kernel boot ......................................................................
extract a method for booting a test VM through kernel boot
Hide the kernel boot and initramfs details into a method and provide a template configuration, then just call the method with custom VM configurations
Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com --- M tests/functional/xmlrpcTests.py 1 file changed, 42 insertions(+), 19 deletions(-)
Approvals: ShaoHe Feng: Looks good to me, but someone else must approve Vinzenz Feenstra: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Zhou Zheng Sheng: Verified
-- To view, visit http://gerrit.ovirt.org/8414 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I6f2e94651d0279b19b1ce6849fb6f0c1b530a10c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Hunt Xu mhuntxu@gmail.com Gerrit-Reviewer: Michal Skrivanek michal.skrivanek@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Vinzenz Feenstra vfeenstr@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
vdsm-patches@lists.fedorahosted.org