Review request: 7123679 Update regression tests that use os.name to work on MacOSX
Kurchi Hazra
kurchi.subhra.hazra at oracle.com
Thu Jan 5 12:11:42 PST 2012
On 1/5/2012 4:51 AM, Alan Bateman wrote:
> On 05/01/2012 00:28, Kurchi Hazra wrote:
>> Hi,
>>
>> Some test files in jdk/test have behavior defined by what the os.name
>> property of the system evaluates to.
>> These changes adds Mac OS X as a recognized OS in a bunch of such
>> test files.
>>
>> In addition, since many tests are failing with the
>> sun.nio.ch.KQueueSelectorProvider,
>> the changes also include using sun.nio.ch.PollSelectorProvider as the
>> DefaultSelector for now
>> until the kqueue selector is fixed.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~khazra/7123679/webrev.00/
> Thanks for following on the tests that use os.name. A couple of comments:
>
> test/java/nio/channels/DatagramChannel/Refused.java
> - the method is onSolarisOrLinux so a bit strange for it to return
> true when on Mac :-) I think you can get rid of this method as ICMP
> port unreachable has been reported as a PortUnreachableException on
> Windows for some times (we no longer support the old editions of
> Windows where this was an issue).
Hi Alan,
Thanks for the review. By method here, did you mean the
onSolarisOrLinux() method?
The updated webrev is at
http://cr.openjdk.java.net/~khazra/7123679/webrev.01/
I changed osName.equals("Mac OS X") to osName.startsWith("Mac OS") to
make these tests valid across versions (Thanks to Sandeep for pointing
that out).
Thanks,
Kurchi
>
> test/java/nio/channels/FileChannel/Size.java (same thing in
> Transfer.java)
> - I suspect the comments here are stale (jdk1.4 era) but okay for now.
>
> test/java/nio/channels/FileChannel/Write.java
> - this test was originally a Solaris 64-bit only test. I would suggest
> ignoring it for now. For some of these older tests we need to remove
> the os.name checking as they should run on other platforms too.
>
> test/java/nio/file/Path/PathOps.java
> - I think the simplest thing for this test is to remove the check for
> SunOS/Linux and invoke doUnixTests when not on Windows.
>
> test/java/util/zip/ZipFile/ManyZipFiles.java
> - looks like this is a Windows only test so might be best to just
> return if os.name doesn't start with "Windows".
>
> src/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java.
> - I think we should should get rid of the Mac specific
> java.nio.preferSelect property as the standard way to specify it via
> the java.nio.channels.spi.SelectorProvider property. So I would
> suggest changing the create method to:
>
> public static SelectorProvider create() {
> return new PollSelectorProvider();
> }
>
> Once the kqueue Selector is passing all tests then we can change it.
>
> That's all I have,
>
> Alan.
>
>
>
>
>
>
>
>
--
-Kurchi
More information about the macosx-port-dev
mailing list