Skip to content

Commit

Permalink
smoketest: fix shenandoah and zgc feature check on linux-riscv (adopt…
Browse files Browse the repository at this point in the history
…ium#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)
  • Loading branch information
luhenry authored Aug 17, 2023
1 parent 84ccfe1 commit 530e494
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 530e494

Please sign in to comment.