def _set_flag(self, flag): efd = eventfd.EventFD(flags=flag) tools.assert_equals( 0, eventfd.EFD_CLOEXEC & fcntl.fcntl(efd, fcntl.F_GETFD)) return efd
def test_close(self): efd = eventfd.EventFD() efd.close() tools.assert_equals(efd.fileno(), -1)
def test_write(self): value = 10 efd = eventfd.EventFD() efd.write(value) tools.assert_equals(efd.read(), value)
def test_create(self): efd = eventfd.EventFD() tools.assert_not_equals(efd, None)