On Fri, 16 Oct 2026 02:36:32 GMT, yaqsun <[email protected]> wrote:

>> Make the test skip when the OpenSSL legacy provider is unavailable, and      
>>                                                                              
>>                                                                              
>>   
>>    locate the modules dir via `openssl info -modulesdir`.                    
>>                                                                              
>>                                                                              
>>      
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> yaqsun has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   8394613: update Platform.isLinux()

test/lib/jdk/test/lib/security/OpensslArtifactFetcher.java line 146:

> 144:         String dir;
> 145:         try {
> 146:             dir = ProcessTools.executeCommand(opensslPath, "info", 
> "-modulesdir")

The `info -modulesdir` command uses a build-time value:


INSTALLTOP=/foo/bar/build
LIBDIR=lib
libdir=$(INSTALLTOP)/$(LIBDIR)
MODULESDIR=$(libdir)/ossl-modules


The issue I am seeing is that the downloaded bundle was built and "installed" 
to one directory (maybe a completely different computer) and then downloaded to 
a tmp directory location on a test machine. So the `info -modulesdir` command 
returns a path, however it may not be a path that exists on the computer that 
is executing the test.

I don't know what a good solution to this would be. It's a little naive but 
maybe making one check for the existence of 
`<openssl>/bin/../lib{64}/ossl-modules` before trying the `info` command?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33380#discussion_r4314562221

Reply via email to