From 530e49496c121edfc777a61e3c08da53f05bd345 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 17 Aug 2023 12:21:46 +0200 Subject: [PATCH] smoketest: fix shenandoah and zgc feature check on linux-riscv (#3456) Linux-RISCV comes with support for Shenandoah and ZGC, and it's been merged in Java 19 and backported to Java 17 (starting with 17.0.9) --- .../src/net/adoptium/test/FeatureTests.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/functional/buildAndPackage/src/net/adoptium/test/FeatureTests.java b/test/functional/buildAndPackage/src/net/adoptium/test/FeatureTests.java index d6a0ede25..4360b6882 100644 --- a/test/functional/buildAndPackage/src/net/adoptium/test/FeatureTests.java +++ b/test/functional/buildAndPackage/src/net/adoptium/test/FeatureTests.java @@ -74,6 +74,11 @@ public void testShenandoahAvailable() { if (jdkVersion.isNewerOrEqual(17) && jdkPlatform.runsOn(OperatingSystem.LINUX, Architecture.PPC64LE)) { shouldBePresent = true; } + if (jdkVersion.isNewerOrEqual(19) || jdkVersion.isNewerOrEqualSameFeature(17, 0, 9)) { + if (jdkPlatform.runsOn(OperatingSystem.LINUX, Architecture.RISCV64)) { + shouldBePresent = true; + } + } LOGGER.info(String.format("Detected %s on %s, expect Shenandoah to be present: %s", jdkVersion, jdkPlatform, shouldBePresent)); @@ -130,6 +135,11 @@ public void testZGCAvailable() { shouldBePresent = true; } } + if (jdkVersion.isNewerOrEqual(19) || jdkVersion.isNewerOrEqualSameFeature(17, 0, 9)) { + if (jdkPlatform.runsOn(OperatingSystem.LINUX, Architecture.RISCV64)) { + shouldBePresent = true; + } + } LOGGER.info(String.format("Detected %s on %s, expect ZGC to be present: %s", jdkVersion, jdkPlatform, shouldBePresent));