RFR: JDK-8313670: Simplify shared lib name handling code in some tests
David Holmes
dholmes at openjdk.org
Mon Aug 7 06:45:32 UTC 2023
On Fri, 4 Aug 2023 20:55:25 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> test/lib/jdk/test/lib/Platform.java line 376:
>>
>>> 374: }
>>> 375: }
>>> 376:
>>
>> The following tests could leverage this new API. Just look for calls to `Platform.sharedLibraryExt()`:
>>
>> test/hotspot/jtreg/runtime/signal/SigTestDriver.java
>> test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeLibraryCopier.java
>> test/jdk/com/sun/tools/attach/warnings/DynamicLoadWarningTest.java
>>
>> Perhaps a `Platform.buildSharedLibraryName()` API is worth considering.
>
> The fix looks good in general.
> But I like the suggestion from Chris above
Agreed, I'd like to see `Platform.buildSharedLibraryName()` in addition to the other methods (the latter are needed if you want to decompose a filename to get the library name (though we could also provide a function just to do that).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15151#discussion_r1285438334
More information about the serviceability-dev
mailing list