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

8273774: CDSPluginTest should only expect classes_nocoops.jsa exists on supported 64-bit platforms #5519

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
@@ -29,6 +29,8 @@

import tests.Helper;

import jtreg.SkippedException;

/* @test
* @bug 8264322
* @summary Test the --generate-cds-archive plugin
@@ -49,6 +51,9 @@ public class CDSPluginTest {

public static void main(String[] args) throws Throwable {

if (!Platform.isDefaultCDSArchiveSupported())
throw new SkippedException("not a supported platform");

Helper helper = Helper.newHelper();
if (helper == null) {
System.err.println("Test not run");
@@ -69,8 +74,14 @@ public static void main(String[] args) throws Throwable {
subDir = "lib" + sep;
}
subDir += "server" + sep;
helper.checkImage(image, module, null, null,
new String[] { subDir + "classes.jsa", subDir + "classes_nocoops.jsa" });

if (Platform.isAArch64() || Platform.isX64()) {
helper.checkImage(image, module, null, null,
new String[] { subDir + "classes.jsa", subDir + "classes_nocoops.jsa" });
} else {
helper.checkImage(image, module, null, null,
new String[] { subDir + "classes.jsa" });
}
Copy link
Member

@mlchung mlchung Sep 17, 2021

Choose a reason for hiding this comment

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

The above change checking 64-bit platform should not be needed. On an unknown platform, isDefaultCDSArchiveSupported should return false. It only returns true on 64-bit supported platforms. Can you verfiy?

Copy link
Contributor Author

@1996scarlet 1996scarlet Sep 17, 2021

Choose a reason for hiding this comment

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

I just try it on LoongArch64 and mips64el.

The Platform.isDefaultCDSArchiveSupported() returns true.
So the above checking can not be removed.

Also, I just forgot add import jtreg.SkippedException.


// Simulate different platforms between current runtime and target image.
if (Platform.isLinux()) {