Le vendredi 12 septembre 2008 à 11:06 +0200, Paolo Bonzini a écrit : > >>> I tried updating the poll module with your patch, but it's not > >>> compiling: > >> Thanks. > > > > Thanks for the update, tried it, it compile, but poll() will immediatly > > fail with "Invalid argument" on non connected socket. > > Have you included the other patch too? The updated poll expects file > descriptors, not socket descriptors (and the other patch ensures that it > gets the right kind).
I included the module, although the code need to be updated to include <fcntl.h> in order to compile. > > I didn't tried tracing the problem yet, but if you could provide a > > complete unit-test along with the module, it would make the testing on > > different platform much easier! > > You're right, there are no tests, because it's hard to write this kind > of unit test in a portable way. Still (and unfortunately) that would > probably help for small incremental changes, but for a rewrite it is > possible that something very basic is screwed up. I think a few simple case would not be particularly hard to write: - non connected socket - socket data detection That would help a lot in testing and reporting problem for your new Win32 module. I'm testing under wine, and the condition really are suboptimal. BTW your current module disable select() emulation on WIN32 platform, which prevent me from compiling the application I'm using for testing - so an unit test would really be welcome. -- Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies Tel: +33 (0)8 70 70 21 58 Fax: +33(0)4 78 42 21 58 http://www.prelude-ids.com
