This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Michael, >> P.S. I was trying to get natSelectorImplWin32 to work and wrote a cool >> test (no, not a Mauve one yet - I have my fingers in my ears already) >> which unconvered issues with selectors, etc. Do you want: >> >> - me to investigate this? >> - me to give you the test and you investigate this? >> - both? >> >> Let me know. > >I take door B (send me the test please). Its surely possible that there >are some bugs in the java part of NIO. I can fix them first and then >we/you can implement/submit/commit the native methods for Win32. Here it is. This is the networking test I distribute with my MinGW build, cleaned up, refactored and with additional tests for selectors which tests interruptions, timeouts, combinations thereof, etc. I'm quite pleased with it. This line: if (strInternalName.indexOf("Channels") == -1) continue; ...makes it so that only the channels tests run. The tar archive contains the output of JREs on both Windows (1.4.2) and Linux (1.4.1), which diff identically. With gcj on Linux and Windows, the test segfaults, though I suspect it's something relatively simple to fix. One other thing: in order to get deterministic output despite the multithreaded nature of these tests, all output from each test is buffered and output only on successful completion of the test. This means that nothing is output if the test crashes. To remedy this (with output going immediately to standard out and interleaved amongst all the threads), change this method: protected final PrintStream out() { return m_strm; // return System.out; } ( If you're interested in further differences between the JRE and gcj w.r.t. networking (datagram sockets and sockets), you can remove the above two lines and compare the gcj output against the JRE output. Actually, rather than removing the above two lines, you'll need to change them to: if (strInternalName.indexOf("!Sun") == -1) continue; ...because the !Sun tests block under Sun's JRE on both OSes and also under Windows gcj. ) I've coded up an interruptible select() implementation, but it will be challenging to follow through on this until the mainline works and someone approves this: http://gcc.gnu.org/ml/java-patches/2003-q4/msg00438.html -- Mohan http://www.thisiscool.com/ http://www.animalsong.org/
Attachment:
NetTest.tar.bz2
Description: application/bzip2
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |