RFR: JDK-8313670: Simplify shared lib name handling code in some tests
Serguei Spitsyn
sspitsyn at openjdk.org
Fri Aug 4 20:59:27 UTC 2023
On Fri, 4 Aug 2023 18:34:52 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> There is coding e.g. in
>> https://github.com/openjdk/jdk/blob/master/test/jdk/jdk/jfr/event/runtime/TestNativeLibrariesEvent.java#L72
>> that deals with shared lib naming on different OS.
>> This code should be simplified.
>
> 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15151#discussion_r1284840135
More information about the serviceability-dev
mailing list