[jdk8u-dev] RFR: 8294863: Enable partial tier1 testing in GHA for JDK8 [v2]
zzambers
duke at openjdk.org
Mon Oct 17 16:31:52 UTC 2022
On Fri, 14 Oct 2022 20:31:25 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:
> Hmm, just seen this. I'm not keen on how much this is diverging from the other JDKs. We'll likely need to revert some of this when backporting bundle support.
Sorry if I was interfering with something, you are working on. Just wanted to have tier1 testing enabled in GHA as it makes backporting much more convenient. If you do some backports, making JDK8 closer to newer JDKs, feel free to revert (update) parts of my changes concerning this matter.
> Do we not need a test bundle for running the tests? I had a feeling that was the case, as 8u doesn't have GTest, but wasn't 100%
When it comes to test bundle/image support, I am not sure there is currently use for this in JDK8 (tests in their current form). As far as I understand it, test image is mostly for tests, which make use of JNI. Native test libraries in newer JDKs are then built by build system and path to built libraries is then passed to jtreg using -nativepath argument [1]. Test image allows to (pre)build these, so they don't have to be built at test time.
However from what I can tell, JDK8 does not (yet) use this approach (building native test libraries by built system in makefiles). Instead tests which make use of JNI are implemented as shell tests and they build native libraries as part of test run. [2] (Other tests using JNI mostly follow similar boilerplate, with some modifications)
When testing GHA is concerned, I don't think, tests using JNI are causing any big problems. You just need working C/C++ compiler at test time. This is not really an issue especially when all tests using JNI seem excluded on Windows [3]. Only problem I have seen was multilib configuration (32-bit JDK on 64-bit linux). While some tests can handle this case correctly using appropriate C/C++ compiler arguments [4], few have a problem of building 64bit JNI library for 32bit JDK and fail. There are only 3 tests affected by this in tier1 (concretely in hotspot_tier1) and they should be easy enough to fix.
compiler/criticalnatives/argumentcorruption/Test8167409.sh
runtime/jni/CallWithJNIWeak/test.sh
runtime/jni/ReturnJNIWeak/test.sh
So while newer JDK probably use cleaner approach for building native test libraries, I don't see it as a high priority in JDK8 (At least when it comes to GHA).
[1] https://github.com/openjdk/jdk/blob/ae60599e2ba75d80c3b4279903137b2c549f8066/make/RunTests.gmk#L801
[2] https://github.com/openjdk/jdk8u-dev/blob/5b5e548fba1073a1f87df3c71f0d09b63e033ced/hotspot/test/runtime/jni/CallWithJNIWeak/test.sh#L71
[3] https://github.com/openjdk/jdk8u-dev/blob/5b5e548fba1073a1f87df3c71f0d09b63e033ced/hotspot/test/runtime/jni/CallWithJNIWeak/test.sh#L60
[4] https://github.com/openjdk/jdk8u-dev/blob/5b5e548fba1073a1f87df3c71f0d09b63e033ced/hotspot/test/runtime/6929067/Test6929067.sh#L42
-------------
PR: https://git.openjdk.org/jdk8u-dev/pull/131
More information about the jdk8u-dev
mailing list