Skip the epoll test if epoll() does not work

This commit is contained in:
Neal Norwitz 2008-03-23 04:43:09 +00:00
parent 162d719113
commit 3bda069c5a
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ from test import test_support
if not hasattr(select, "epoll"): if not hasattr(select, "epoll"):
raise test_support.TestSkipped("test works only on Linux 2.6") raise test_support.TestSkipped("test works only on Linux 2.6")
try:
select.epoll()
except IOError, e:
if e.errno == errno.ENOSYS:
raise test_support.TestSkipped("kernel doesn't support epoll()")
class TestEPoll(unittest.TestCase): class TestEPoll(unittest.TestCase):
def setUp(self): def setUp(self):