Issue 16952: test_kqueue failure on NetBSD/OpenBSD (original) (raw)

test_kqueue fails on both NetBSD and OpenBSD: http://buildbot.python.org/all/builders/AMD64 NetBSD 5.1.2 [SB] 2.7/builds/206/steps/test/logs/stdio http://buildbot.python.org/all/builders/x86 OpenBSD 5.1 [SB] 2.7/builds/153/steps/test/logs/stdio

"""

FAIL: test_queue_event (test.test_kqueue.TestKQueue)

Traceback (most recent call last): File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_kqueue.py", line 129, in test_queue_event (server.fileno(), select.KQ_FILTER_WRITE, flags)]) AssertionError: Lists differ: [(10L, 1, 5L), (11L, 1, 5L)] != [(10, 1, 0), (11, 1, 0)]

First differing element 0: (10L, 1, 5L) (10, 1, 0)

"""

The test assumes that the input flags (EV_ADD, EV_ENABLE...) will be returned in the output events. It's apparently not the case on OpenBSD and NetBSD (and probably on OS-X neither, because this check is disabled on this platform), and I can't see anything in the kqueue man pages hinting to this behavior (only specific flags will be set on output, like EV_ERROR). Knowing which flag was specified is not really useful actually.

The patch attached just removes this check (we keep checking the file descriptors and filter, of course).