Change in vdsm[master]: add simple VM creation functional test

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Thu Aug 23 02:36:29 UTC 2012


Zhou Zheng Sheng has posted comments on this change.

Change subject: add simple VM creation functional test
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File tests/functional/vmTests.py
Line 40:         kernelPath = "/boot/vmlinuz-" + kernelVer
Line 41:         initramfsPath = "/boot/initramfs-%s.img" % kernelVer
Line 42:         vmid = str(uuid.uuid4())
Line 43:         conf = {'acpiEnable': 'True',
Line 44:                 'display': 'vnc',
I removed the "display" parameter and gets an exception. "display" is a mandatory parameter of "VM.create()" in API.py. So in the next patch set I will keep this parameter.
Line 45:                 'initrd': initramfsPath,
Line 46:                 'kernel': kernelPath,
Line 47:                 # Fedora uses dracut to create initramfs. The following
Line 48:                 # arguments will be interpreted by init scripts created by


Line 72:                 time.sleep(1)
Line 73:         except Exception:
Line 74:             raise
Line 75:         finally:
Line 76:             assertVdsOK(self.s.destroy(vmid))
I plan to do automatic functional tests in Jenkins. If we run several functional tests automatically, even if there are any exceptions, the resources allocated by VM creation operation must be released. If the VM runs successfully, we must assert that it is destroyed properly, if the VM is not started properly, raise an exception and destroy it anyway without assert.

I will submit a new patch set.
Line 77: 
Line 78:     def isVMUp(self, vmid):
Line 79:         vmList = assertVdsOK(self.s.list())['vmList']
Line 80:         for vm in vmList:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb0d86ce20a547ef809d5407fe12d6ade474c4d2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list