JDK-8216265 : [testbug] Introduce Platform.sharedLibraryPathVariableName() and adapt all tests.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: test
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-07
  • Updated: 2022-05-03
  • Resolved: 2019-01-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.16Fixed 13 b04Fixed
Related Reports
Relates :  
Relates :  
Description
Different operating systems use different names for the environment variable that contains the search paths for native libraries.  This path is used in a row of tests. A switch over all OSes is needed to find out the proper variable name in each test using it. 

This change introduces a central function 
Platform.sharedLibraryPathVariableName()
that returns "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH", "PATH" or "LIBPATH" depending on the current OS.

This change also adapts all usages of these variables in the tests to call this functions.

A similar pattern appears in a lot of shell tests. This change does not fix the
issue with those tests. This issue will be fixed once the tests are converted to Java.

The change also replaces local checking for path separators by File.pathSeparator in jdk/com/sun/jdi/PrivateTransportTest.java.


Comments
Fix request [11u] We see test/jdk/com/sun/jdi/PrivateTransportTest.java failing on macOS 12. See also JDK-8279326. I will backport this change and then close 8279326. Parts of this change were already backported in JDK-8238225. No risk, only a test change. I had to resolve a row of files, see PR. SAP nightly testing passed.
02-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1061 Date: 2022-04-29 07:40:28 +0000
29-04-2022

Git URL: https://github.com/openjdk/jdk/commit/084f0b75bdb77fbfcc8d78583adebecddd26eab0
29-04-2022

URL: http://hg.openjdk.java.net/jdk/jdk/rev/bbc79e0ec9ee User: goetz Date: 2019-01-14 15:27:49 +0000
14-01-2019