Proposal for adding O_DIRECT support into JDK 9

Lu, Yingqi at
Mon Aug 28 20:46:33 UTC 2017

Currently, if the library is not there, the test would fail. The example I followed is from test/java/nio/channels/spi/SelectorProvider/inheritedChannel. It uses pre-built library.

I will upload webrev.06 this afternoon for review. It has all the other comments addressed. We can wait for Alan to comment on this issue at the meantime.

Thank you!

From: Brian Burkhalter [mailto:brian.burkhalter at]
Sent: Monday, August 28, 2017 1:29 PM
To: Lu, Yingqi < at>
Cc: Alan Bateman <Alan.Bateman at>; Markle, Seth <smarkle at>; nio-dev at
Subject: Re: Proposal for adding O_DIRECT support into JDK 9

Hi Lucy,

I am unsure of the best way to get the native code to build as part of the test build. One example however of where this is done is in <JDK_REPO>/jdk/test/java/awt/JAWT but the test is a shell test and we are trying to move away from those. I do not know exactly what Alan intends by his comment. There are other tests which have pre-compiled shared libraries checked into the SCM. If there is a problem with the native library itself or in locating it, then I would think the test should fail and we would be alerted that there is a problem.



On Aug 28, 2017, at 12:46 PM, Lu, Yingqi < at< at>> wrote:

Regarding to the native test, the easiest way I can think of is to call the "make" command from the Java test file ( Please let me know if this is good enough or you have a better suggestion.

On Aug 28, 2017, at 5:49 AM, Alan Bateman <Alan.Bateman at<mailto:Alan.Bateman at>> wrote:

[...] one question on DirectIO is whether you place to convert that into a native test that is compiled in the build. It may otherwise get forgotten.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nio-dev mailing list