From c2a47befa4e2f794a7d7a6607eaf9b5f88d0128a Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Mon, 14 Aug 2023 07:10:57 +0000 Subject: [PATCH] smoketest: fix shenandoah and zgc feature check on linux-riscv 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 8113b2c73..872c261bb 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));