[crac] RFR: Draft: Move more FD tracking to java layer

Radim Vansa duke at openjdk.org
Fri Jun 9 09:30:12 UTC 2023

On Thu, 8 Jun 2023 16:48:39 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> test/jdk/jdk/crac/fileDescriptors/OpenFileDetectionTest.java line 51:
>>> 49:     @Override
>>> 50:     public void exec() throws Exception {
>>> 51:         try (var file = new RandomAccessFile("/etc/passwd", "r")) {
>> What would happen with the FileReader? It would be better to not remove test for particular case, but add one for RandomAccessFile.
> FileReader was never claiming own file descriptor, it was a mistake in the original version of the test. Now test matches RandomAccessFile, that does claiming.

That was not a mistake; the point of the test was to show that user *gets informed* that it was the `/etc/passwd` file what the FD was pointing to. The point of claiming, as I understand it, is to provide additional info.


PR Review Comment: https://git.openjdk.org/crac/pull/79#discussion_r1224074917

More information about the crac-dev mailing list