RFR: 8343020: SecureDirectoryStream not supported on MacOS
David M. Lloyd
duke at openjdk.org
Fri Oct 25 11:23:06 UTC 2024
On Fri, 25 Oct 2024 08:17:04 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> > There is no `noreg-*` label on the issue. Is this change covered by an existing test?
>
> DirectoryStream/SecureDS.java is the test for this API. Right now it only runs on Linux (it used to run on Solaris too). If support is extended to macOS then we'll need to change this test to use `@requires` and drop the existing check in the test main.
OK I'll see if I can figure out how to do this.
> > I'm seeing a build failure on macosx-x64 on both my own machine and in the CI:
> > ```
> > Error occurred during initialization of boot layer
> > java.lang.InternalError: java.base not found
> > ```
>
> Can you see if -Xlog:init=debug to see if it reveals anything?
>
> I have a vague memory of issues futimes not being supported on some versions of macOS or Linux and we had to use futimesat instead. Switching to futimes means testing on a wide range of OS releases to make sure that aren't any issues.
Luckily I still have a x64 mac so I can test this locally too. I think `futimesat` is only supported on Linux and Solaris, at least according to https://www.gnu.org/software/gnulib/manual/html_node/futimesat.html if that can be trusted. So I think what's been happening is that `my_futimesat` has been `null` on most platforms, meaning that AFAICT, SDS is simply not available outside of Linux (and Solaris, I guess).
I can also try and see if `utimensat` works better, or even support `futimesat` if present and otherwise fallback to `futimes` and see how that goes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21696#issuecomment-2437529269
More information about the nio-dev
mailing list