Change in vdsm[ovirt-3.5]: takset: fix taskset and tests on python 2.6

fromani at redhat.com fromani at redhat.com
Mon Oct 12 07:41:11 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: takset: fix taskset and tests on python 2.6
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/47013/3/lib/vdsm/taskset.py
File lib/vdsm/taskset.py:

Line 87: 
Line 88: 
Line 89: # stolen with minimal changes from
Line 90: # https://docs.python.org/2/library/stdtypes.html#int.bit_length
Line 91: def _bit_length(n):
> Please add simple test for this.
Done
Line 92:     s = bin(n)           # binary representation:  bin(-37) --> '-0b100101'
Line 93:     s = s.lstrip('-0b')  # remove leading zeros and minus sign


https://gerrit.ovirt.org/#/c/47013/3/tests/tasksetTests.py
File tests/tasksetTests.py:

Line 53:     def test_get(self):
Line 54: 
Line 55:         self.proc = multiprocessing.Process(target=self._run_child)
Line 56:         self.proc.start()
Line 57:         self.running.wait()
> No timeout?
(silly) rebase mistake. Fixed.
Line 58:         if not self.running.is_set():
Line 59:             raise RuntimeError("helper child process not running!")
Line 60: 
Line 61:         self.assertEqual(taskset.get(self.proc.pid),


-- 
To view, visit https://gerrit.ovirt.org/47013
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7621a1443367bfead7b953df5218dea24bf8095a
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list