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

8272291: mark hotspot runtime/logging tests which ignore external VM flags #5075

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
/*
* @test ClassInitializationTest
* @bug 8142976
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @compile BadMap50.jasm
@@ -25,7 +25,7 @@
/*
* @test ClassLoadUnloadTest
* @bug 8142506
* @requires vm.opt.final.ClassUnloading
Copy link
Member

@dholmes-ora dholmes-ora Aug 17, 2021

Choose a reason for hiding this comment

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

The new requirement is weaker than the old. If ClassUnloading were not enabled by default then this test would now run when it should not.

Copy link
Member Author

@iignatev iignatev Aug 17, 2021

Choose a reason for hiding this comment

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

nice catch, I guess I assumed that the test makes sure its child JVMs are run in the correct setting (as CompressedOopsTest.java does). I'll update the test to pass -XX:+ClassUnloading in ClassLoadUnloadTest::exec.

Copy link
Member

@dholmes-ora dholmes-ora Aug 17, 2021

Choose a reason for hiding this comment

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

They are not exactly equivalent conditions, but when combined with vm.flagless this change seems okay.

* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @library classes
@@ -78,6 +78,7 @@ static ProcessBuilder exec(String... args) throws Exception {
Collections.addAll(argsList, args);
Collections.addAll(argsList, "-Xmn8m");
Collections.addAll(argsList, "-Dtest.class.path=" + System.getProperty("test.class.path", "."));
Collections.addAll(argsList, "-XX:+ClassUnloading");
Collections.addAll(argsList, ClassUnloadTestMain.class.getName());
return ProcessTools.createJavaProcessBuilder(argsList);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -25,6 +25,7 @@
/*
* @test ClassResolutionTest
* @bug 8144874
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @run driver ClassResolutionTest
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -24,7 +24,8 @@
/*
* @test
* @bug 8149991
* @requires vm.bits == 64 & vm.opt.final.UseCompressedOops == true
* @requires vm.bits == 64
* @requires vm.flagless
Copy link
Member

@dholmes-ora dholmes-ora Aug 17, 2021

Choose a reason for hiding this comment

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

Similar comment here, you have weakened the condition that enables the test.

Copy link
Member Author

@iignatev iignatev Aug 17, 2021

Choose a reason for hiding this comment

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

this test explicitly passes -XX:+UseCompressedOops to a child JVM, so the condition hasn't been weakened, if anything this change increases the coverage for JVMs where UseCompressedOops isn't true by default as now the test will be included in out-of-box runs.

Copy link
Member

@dholmes-ora dholmes-ora Aug 17, 2021

Choose a reason for hiding this comment

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

Okay. Thinking more about this case I think the old condition was to stop this test from being run when compressed oops was actually disabled, because it was going to enable them anyway. But now vm.flagless takes care of that case.

* @summary -Xlog:gc+heap+coops=info should have output from the code
* @library /test/lib
* @modules java.base/jdk.internal.misc
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021, 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
@@ -24,6 +24,7 @@
/*
* @test
* @summary Test -Xlog:methodhandles with a test that contains both a condy and indy.
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @compile CondyIndyMathOperation.jasm
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8139564 8203960
* @summary defaultmethods=debug should have logging from each of the statements in the code
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8141211 8147477
* @summary exceptions=info output should have an exception message for interpreter methods
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -27,6 +27,7 @@
* @summary itables=trace should have logging from each of the statements
* in the code
* @requires vm.debug
* @requires vm.flagless
* @library /test/lib
* @compile ClassB.java
* ItablesVtableTest.java
@@ -25,6 +25,7 @@
/*
* @test LoaderConstraintsTest
* @bug 8149996
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib classes
* @build test.Empty
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -24,6 +24,7 @@
/*
* @test
* @summary -Xlog:module should emit logging output
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8133885
* @summary monitorinflation=trace should have logging from each of the statements in the code
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -25,6 +25,7 @@
/*
* @test MonitorMismatchTest
* @bug 8150084
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @compile MonitorMismatchHelper.jasm
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8151939
* @summary os+cpu output should contain some os,cpu information
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -24,6 +24,7 @@
/*
* @test ProtectionDomainVerificationTest
* @bug 8149064
* @requires vm.flagless
* @modules java.base/jdk.internal.misc
* @library /test/lib
* @run driver ProtectionDomainVerificationTest
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8149991
* @summary safepoint+cleanup=info should have output from the code
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8140348
* @summary safepoint=trace should have output from each log statement in the code
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -26,6 +26,7 @@
* @test StackWalkTest
* @bug 8160064
* @summary -Xlog:stackwalk should produce logging from the source code
* @requires vm.flagless
* @library /test/lib
* @run driver StackWalkTest
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8148630
* @summary -Xlog:startuptime should produce logging from the source code
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -26,6 +26,7 @@
* @test
* @bug 8149036 8150619
* @summary os+thread output should contain logging calls for thread start stop attaches detaches
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8143157
* @summary vmoperation=debug should have logging output
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -25,6 +25,7 @@
* @test
* @bug 8150083 8234656
* @summary test enabling and disabling verification logging and verification log levels
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, 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
@@ -27,6 +27,7 @@
* @summary vtables=trace should have logging from each of the statements in the code
* @library /test/lib
* @requires vm.debug
* @requires vm.flagless
* @compile ClassB.java
* p1/A.java
* p2/B.jcod
@@ -25,6 +25,7 @@
* @test
* @bug 8187305
* @summary Tests logging of shared library loads and unloads.
* @requires vm.flagless
* @library /test/lib
* @build sun.hotspot.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller sun.hotspot.WhiteBox