Change in vdsm[master]: infra: Introduce EventFD support

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Mon Mar 2 15:23:55 UTC 2015


Piotr Kliczewski has posted comments on this change.

Change subject: infra: Introduce EventFD support
......................................................................


Patch Set 5:

(3 comments)

https://gerrit.ovirt.org/#/c/37051/5/lib/vdsm/infra/eventfd/__init__.py
File lib/vdsm/infra/eventfd/__init__.py:

Line 37: 
Line 38: libc = ctypes.CDLL("libc.so.6", use_errno=True)
Line 39: 
Line 40: EFD_SEMAPHORE = 00000001,
Line 41: EFD_CLOEXEC = 02000000,
> please use modern octal literals 0o02000000 etc
Done
Line 42: EFD_NONBLOCK = 00004000
Line 43: 
Line 44: 
Line 45: class EventFD(object):


Line 120: o
> for symmetry: why is fd opened by libc, and closed by os.close(2)?
Good point will make it symmetric.


https://gerrit.ovirt.org/#/c/37051/5/lib/vdsm/infra/eventfd/tests.py
File lib/vdsm/infra/eventfd/tests.py:

Line 37:     efd = eventfd.EventFD(value)
Line 38:     tools.assert_equals(efd.read(), value)
Line 39: 
Line 40: 
Line 41: def test_write():
> Only the default flags=0 is being tested here.
Will add more tests.
Line 42:     value = 10
Line 43:     efd = eventfd.EventFD()
Line 44:     efd.write(value)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6035d4a8dc13ce11cf0425e4945bbf0c19bd92a7
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list