'/native' option conveys two different meanings:
1) a test can be run only if -nativepath was provided;
2) native library should be added to system property by jtreg
as of now, '/native' option can be used only by actions of 'main' type, as it's the main type where both meanings make sense, there are however cases when one wants to use '/native' in its 1st meaning, to get a meaningful error message when running w/o nativepath, for 'driver' actions. one of the examples would be runtime/jni/CalleeSavedRegisters/FPRegs.java (https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java) where FPRegs doesn't need a native library as it just creates another process which uses files from nativepath.
1) a test can be run only if -nativepath was provided;
2) native library should be added to system property by jtreg
as of now, '/native' option can be used only by actions of 'main' type, as it's the main type where both meanings make sense, there are however cases when one wants to use '/native' in its 1st meaning, to get a meaningful error message when running w/o nativepath, for 'driver' actions. one of the examples would be runtime/jni/CalleeSavedRegisters/FPRegs.java (https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java) where FPRegs doesn't need a native library as it just creates another process which uses files from nativepath.
- relates to
-
JDK-8268591 a few runtime/jni tests don't need `/othervm`
-
- Resolved
-