Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8279970: two AppCDS tests fail after JDK-8261455 #7070

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -123,6 +123,10 @@ public class TestAutoCreateSharedArchive extends DynamicArchiveTestBase {
private static int currentCDSVersion = CDSArchiveUtils.getCurrentCDSArchiveVersion();

public static void main(String[] args) throws Exception {
if (isUseSharedSpacesDisabled()) {
System.out.println("This test is not applicable when JTREG tests are executed with -Xshare:off, or if the JDK doesn't have a default archive.");
return;
Copy link
Member

@calvinccheung calvinccheung Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: throw a SkippedException instead of System.out.println.

}
if (args.length != 1 || (!args[0].equals("verifySharedSpacesOff") && !args[0].equals("verifySharedSpacesOn"))) {
throw new RuntimeException("Must run with verifySharedSpacesOff or verifySharedSpacesOn");
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -103,6 +103,11 @@ public class DynamicLoaderConstraintsTest extends DynamicArchiveTestBase {
static boolean useZGC;

public static void main(String[] args) throws Exception {
if (isUseSharedSpacesDisabled()) {
System.out.println("This test is not applicable when JTREG tests are executed with -Xshare:off, or if the JDK doesn't have a default archive.");
return;
Copy link
Member

@calvinccheung calvinccheung Jan 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as above.

}

useCustomLoader = (args.length != 0);
useZGC = (args.length != 0 && args[0].equals("custom-zgc"));
runTest(DynamicLoaderConstraintsTest::doTest);
@@ -130,7 +135,7 @@ static void doTest() throws Exception {
static void doTest(boolean errorInDump) throws Exception {
for (int i = 1; i <= 3; i++) {
System.out.println("========================================");
System.out.println("errorInDump: " + errorInDump + ", useCustomLoader: " + useCustomLoader + ", case: " + i);
System.out.println("errorInDump: " + errorInDump + ", useCustomLoader: " + useCustomLoader + ", useZGC: " + useZGC + ", case: " + i);
System.out.println("========================================");
String topArchiveName = getNewArchiveName();
String testCase = Integer.toString(i);