From a63a88619864c9236e595fb70cd3b880e4c51de4 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Mon, 27 Apr 2009 06:22:30 +0000 Subject: 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. --- lib/zephyr_tests.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/zephyr_tests.txt') 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 -- cgit v1.2.3