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

8295424: adjust timeout for another JLI GetObjectSizeIntrinsicsTest.java subtest #11278

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@
* -Xbatch -XX:TieredStopAtLevel=1
* -javaagent:basicAgent.jar GetObjectSizeIntrinsicsTest GetObjectSizeIntrinsicsTest large
*
* @run main/othervm -Xmx8g
* @run main/othervm/timeout=180 -Xmx8g
* -XX:+UnlockDiagnosticVMOptions -XX:+AbortVMOnCompilationFailure -XX:+WhiteBoxAPI -Xbootclasspath/a:.
* -Xbatch -XX:-TieredCompilation
* -javaagent:basicAgent.jar GetObjectSizeIntrinsicsTest GetObjectSizeIntrinsicsTest large
7 changes: 7 additions & 0 deletions test/jdk/jdk/internal/vm/Continuation/Fuzz.java
Original file line number Diff line number Diff line change
@@ -72,6 +72,9 @@
import jdk.test.lib.Utils;
import jdk.test.whitebox.WhiteBox;

import jdk.test.lib.Platform;
import jtreg.SkippedException;

public class Fuzz implements Runnable {
static final boolean VERIFY_STACK = true; // could add significant time
static final boolean FILE = true;
@@ -84,6 +87,10 @@ public class Fuzz implements Runnable {
static final Path TEST_DIR = Path.of(System.getProperty("test.src", "."));

public static void main(String[] args) {
if (Platform.isSlowDebugBuild() && Platform.isOSX() && Platform.isAArch64()) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the idea of skipping the unstable test using SkippedException. Wouldn't be better to add problemlist for slowdebug? So anyone could easy identify test bugs in slowdebug mode. Really it would be better to support bits configurations in standard problem lists like os/arch but it is a separate issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I know, the ProblemList does not support bits config so there's no way
to specify an entry for 'release' or 'fastdebug' or 'slowdebug' or...

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it is needed to make a separate problem list for this and use it in your testing.

The SkippedException and '@requires' are used to filter out the test when it is not applicable for this configuration, not when there is a bug that reproduced only with this configuration. Adding '@requires' usually means that we are not planning to run.
If you want to add them as exception might be it makes sense to add a corresponding comment.

throw new SkippedException("Test is unstable with slowdebug bits "
+ "on macosx-aarch64");
}
warmup();
for (int compileLevel : new int[]{4}) {
for (boolean compileRun : new boolean[]{true}) {
Original file line number Diff line number Diff line change
@@ -26,11 +26,14 @@
* @bug 8190312
* @summary test redirected URLs for -link
* @library /tools/lib ../../lib
* @library /test/lib
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.javadoc/jdk.javadoc.internal.api
* jdk.javadoc/jdk.javadoc.internal.tool
* @build toolbox.ToolBox toolbox.JavacTask javadoc.tester.*
* @build jtreg.SkippedException
* @build jdk.test.lib.Platform
* @run main TestRedirectLinks
*/

@@ -66,12 +69,18 @@
import toolbox.JavacTask;
import toolbox.ToolBox;

import jdk.test.lib.Platform;
import jtreg.SkippedException;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: the order of imports on 72-73 needs to be swapped.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why? 'jdk' comes before 'jtreg' and 'Platform' comes before 'SkippedException'.
What am I missing here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Mild grumble: langtools tests do not rely on jdk test libraries

Copy link
Member Author

Choose a reason for hiding this comment

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

Does langtools have its own test libraries that I can use to ask the same questions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I was not clear.
The Fuzz.java has this order:

+import jdk.test.lib.Platform;
+import jtreg.SkippedException;

I thought, you ordered imports by names. Then it is better to keep this order unified.
It is really minor though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry I'm still confused. As far as I can see, I've added the imports the
same way in both Fuzz.java and TestRedirectLinks.java.

And the imports are in sort order:
'jdk' comes before 'jtreg' and 'Platform' comes before 'SkippedException'.

Copy link
Contributor

@sspitsyn sspitsyn Dec 6, 2022

Choose a reason for hiding this comment

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

Sorry, copied fragment from a wrong file.
This file has imports out of order:
test/langtools/jdk/javadoc/doclet/testLinkOption/TestRedirectLinks.java

+ * @build jtreg.SkippedException
+ * @build jdk.test.lib.Platform


public class TestRedirectLinks extends JavadocTester {
/**
* The entry point of the test.
* @param args the array of command line arguments.
*/
public static void main(String... args) throws Exception {
if (Platform.isSlowDebugBuild()) {
throw new SkippedException("Test is unstable with slowdebug bits");
}
TestRedirectLinks tester = new TestRedirectLinks();
tester.runTests();
}