]> granicus.if.org Git - python/commitdiff
Skip the epoll test if epoll() does not work
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 23 Mar 2008 04:43:09 +0000 (04:43 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 23 Mar 2008 04:43:09 +0000 (04:43 +0000)
Lib/test/test_epoll.py

index f56d74f095f75ec890a4a84d4859db3503ae064c..ab1756cde5088e724737141657e791f2ff6c7e2f 100644 (file)
@@ -33,6 +33,12 @@ from test import test_support
 if not hasattr(select, "epoll"):
     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):
 
     def setUp(self):