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

danken at redhat.com danken at redhat.com
Tue Aug 28 19:59:08 UTC 2012


Dan Kenigsberg has posted comments on this change.

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


Patch Set 5: (4 inline comments)

Zhou, I'm anxiously waiting for this kind of test implemented and run continuously. Using the host's kernel is a simple and great idea!

As you have probably noticed, this test is not very different in nature from my own http://gerrit.ovirt.org/5788 . Would you agree to build your test on top of my old patch?

....................................................
File tests/functional/vmTests.py
Line 28: from vdsm import vdscli
Line 29: from vdsm.config import config
Line 30: 
Line 31: 
Line 32: def assertVdsOK(vdsResult):
Please take a look into unittest.case.assertTrue as an example of a standard assert method. I like conformism.
Line 33:     # code == 0 means OK
Line 34:     if vdsResult['status']['code']:
Line 35:         raise Exception(vdsResult['status']['message'])
Line 36:     return vdsResult


Line 35:         raise Exception(vdsResult['status']['message'])
Line 36:     return vdsResult
Line 37: 
Line 38: 
Line 39: class vmTests(TestCaseBase):
ClassName starts with UpperCase
Line 40:     @testValidation.ValidateRunningAsRoot
Line 41:     def setUp(self):
Line 42:         if not config.getboolean('vars', 'xmlrpc_enable'):
Line 43:             raise SkipTest("XML-RPC Bindings are disabled")


Line 54:                 'kernel': kernelPath,
Line 55:                 # Fedora uses dracut to create initramfs. The following
Line 56:                 # arguments will be interpreted by init scripts created by
Line 57:                 # dracut.
Line 58:                 'kernelArgs': 'rd.break=cmdline rd.shell rd.skipfsck',
I would like the test to pass flawlessly on el6, too. could you make this happen?
otherwise, could you add a @brokentest decorator for that case?
Line 59:                 'kvmEnable': 'true',
Line 60:                 'memSize': '256',
Line 61:                 'vmId': vmid,
Line 62:                 'vmName': 'vdsm_testVM',


Line 72:             guestUp = False
Line 73:             while True:
Line 74:                 vmUp = self.isVMUp(vmid)
Line 75:                 if vmUp:
Line 76:                     guestUp = self.isGuestUp(vmid)
would you explain how you get the guest agent into the guest?
Line 77:                 if guestUp:
Line 78:                     break
Line 79:                 now = time.time()
Line 80:                 if now - start > timeout:


--
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: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>
Gerrit-Reviewer: Gal Hammer <ghammer at redhat.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: ShaoHe Feng <shaohef 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