classification
Title: test_kqueue failure on NetBSD/OpenBSD
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Broken test_kqueue.py on OpenBSD
View: 6419
Assigned To: Nosy List: neologix, skrah
Priority: normal Keywords: needs review, patch

Created on 2013-01-13 14:24 by neologix, last changed 2013-01-17 17:24 by neologix. This issue is now closed.

Files
File name Uploaded Description Edit
kqueue_flags.diff neologix, 2013-01-13 14:24 review
Messages (2)
msg179877 - (view) Author: Charles-Fran├žois Natali (neologix) * (Python committer) Date: 2013-01-13 14:24
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)

- [(10L, 1, 5L), (11L, 1, 5L)]
?     -     ^^      -     ^^

+ [(10, 1, 0), (11, 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).
msg180128 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2013-01-17 12:49
Could we merge this with #6419?
History
Date User Action Args
2013-01-17 17:24:26neologixsetstatus: open -> closed
superseder: Broken test_kqueue.py on OpenBSD
resolution: duplicate
stage: patch review -> resolved
2013-01-17 12:49:36skrahsetnosy: + skrah
messages: + msg180128
2013-01-13 14:24:57neologixcreate