Change in vdsm[master]: Add ut to supervdsmServer zombie reaper

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Wed Nov 21 10:23:33 UTC 2012


Royce Lv has posted comments on this change.

Change subject: Add ut to supervdsmServer zombie reaper
......................................................................


Patch Set 1: (3 inline comments)

....................................................
File tests/superVdsmTests.py
Line 16:         # temporary values to run temporary svdsm
Line 17:         self.pidfd, pidfile = tempfile.mkstemp()
Line 18:         self.timefd, timestamp = tempfile.mkstemp()
Line 19:         self.addfd, address = tempfile.mkstemp()
Line 20:         self.pidfile = pidfile
It's a stupid mistake forgot to clean:(
Line 21: 
Line 22:         self._proxy.setIPCPaths(pidfile, timestamp, address)
Line 23:         self._proxy.ping()
Line 24:         self.assertTrue(self._proxy.isRunning())


Line 19:         self.addfd, address = tempfile.mkstemp()
Line 20:         self.pidfile = pidfile
Line 21: 
Line 22:         self._proxy.setIPCPaths(pidfile, timestamp, address)
Line 23:         self._proxy.ping()
I moved them here because every test needs to check whether svdsm works right.But at a second thought I think you're right, maybe we may have test to not start supervdsm and see what vdsm would act in future.
Line 24:         self.assertTrue(self._proxy.isRunning())
Line 25: 
Line 26:     def tearDown(self):
Line 27:         for fd in (self.pidfd, self.timefd, self.addfd):


....................................................
File vdsm/supervdsmServer.py
Line 89: 
Line 90: class _SuperVdsm(object):
Line 91: 
Line 92:     @logDecorator
Line 93:     def ping(self, *args, **kwargs):
I guess maintainers won't like two test functions in supervdsm so I stole your function. I'll figure out another way.
Line 94:         # This method exists for testing purposes
Line 95:         res = self._runAs(DISKIMAGE_USER, (DISKIMAGE_GROUP,), os.getpid)
Line 96:         return res
Line 97: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7fb8f3dcd575266febe11967e3f8df7d3588acb8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list