summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2009-04-27 06:22:30 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2009-04-27 06:22:30 +0000
commita63a88619864c9236e595fb70cd3b880e4c51de4 (patch)
tree7419e1d6ba90ff69831b034fb0253e7c4774720e
parent42795e737f9b8df92399309e29ded61b9b1a79d8 (diff)
It turns out that sockpair /does/ work with AF_UNIX, SOCK_DGRAM, just not
AF_INET, which is not terribly surprising now that I think about it. However, ZPending() still returns -1, and I don't know how to debug why at the moment.
-rw-r--r--lib/zephyr_tests.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/zephyr_tests.txt b/lib/zephyr_tests.txt
index d7679fa..b9d2a03 100644
--- a/lib/zephyr_tests.txt
+++ b/lib/zephyr_tests.txt
@@ -250,7 +250,10 @@ tests". In the meantime, a faster and more local test that
synthesizes packets and feeds them through the queuing mechanism will
get us some more coverage.
- >>> read_end, write_end = os.pipe()
+ >>> from socket import AF_UNIX, SOCK_DGRAM, socketpair
+ >>> read_end_sock, write_end_sock = socketpair(AF_UNIX, SOCK_DGRAM)
+ >>> read_end = read_end_sock.fileno()
+ >>> write_end = write_end_sock.fileno()
>>> assert _z.ZSetFD(read_end) == 0
>>> assert _z.ZPending() == 0