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

8272168: some hotspot runtime/logging tests don't check exit code #5062

Closed
wants to merge 2 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
@@ -45,6 +45,7 @@ public static void main(String... args) throws Exception {
"-Xmx128m",
"BadMap50");
OutputAnalyzer out = new OutputAnalyzer(pb.start());
out.shouldNotHaveExitValue(0);
out.shouldContain("Start class verification for:");
out.shouldContain("End class verification for:");
out.shouldContain("Initializing");
@@ -69,6 +70,7 @@ public static void main(String... args) throws Exception {
"-Xmx128m",
"BadMap50");
out = new OutputAnalyzer(pb.start());
out.shouldNotHaveExitValue(0);
out.shouldNotContain("[class,init]");
out.shouldNotContain("Fail over class verification to old verifier for: BadMap50");

@@ -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
@@ -62,6 +62,7 @@ public static void main(String... args) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+resolve=debug",
ClassResolutionTestMain.class.getName());
OutputAnalyzer o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldContain("[class,resolve] ClassResolutionTest$ClassResolutionTestMain$Thing1Handler ClassResolutionTest$ClassResolutionTestMain$Thing1");
o.shouldContain("[class,resolve] resolve JVM_CONSTANT_MethodHandle");

@@ -70,6 +71,7 @@ public static void main(String... args) throws Exception {
"-Xlog:class+resolve=off",
ClassResolutionTestMain.class.getName());
o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldNotContain("[class,resolve]");
};

@@ -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
@@ -42,6 +42,7 @@ public static void main(String... args) throws Exception {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:methodhandles",
"CondyIndy");
OutputAnalyzer o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldContain("[info][methodhandles");
o.shouldNotContain("[debug][methodhandles,indy");
o.shouldNotContain("[debug][methodhandles,condy");
@@ -50,6 +51,7 @@ public static void main(String... args) throws Exception {
pb = ProcessTools.createJavaProcessBuilder("-Xlog:methodhandles+condy=debug",
"CondyIndy");
o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldNotContain("[info ][methodhandles");
o.shouldNotContain("[debug][methodhandles,indy");
o.shouldContain("[debug][methodhandles,condy");
@@ -58,6 +60,7 @@ public static void main(String... args) throws Exception {
pb = ProcessTools.createJavaProcessBuilder("-Xlog:methodhandles+indy=debug",
"CondyIndy");
o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldNotContain("[info ][methodhandles");
o.shouldContain("[debug][methodhandles,indy");
o.shouldNotContain("[debug][methodhandles,condy");
@@ -68,6 +71,7 @@ public static void main(String... args) throws Exception {
"-Xlog:methodhandles+indy=debug",
"CondyIndy");
o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldContain("[info ][methodhandles");
o.shouldContain("[debug][methodhandles,indy");
o.shouldContain("[debug][methodhandles,condy");
@@ -69,11 +69,13 @@ public static void main(String... args) throws Exception {
// -Xlog:class+loader+constraints=info
pb = exec("-Xlog:class+loader+constraints=info");
out = new OutputAnalyzer(pb.start());
out.shouldHaveExitValue(0);
out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: 'app', loader[1]: 'bootstrap'");

// -Xlog:class+loader+constraints=off
pb = exec("-Xlog:class+loader+constraints=off");
out = new OutputAnalyzer(pb.start());
out.shouldHaveExitValue(0);
out.shouldNotContain("[class,loader,constraints]");

}
@@ -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
@@ -44,6 +44,7 @@ public static void main(String... args) throws Exception {
"-Xlog:monitormismatch=info",
"MonitorMismatchHelper");
OutputAnalyzer o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldContain("[monitormismatch] Monitor mismatch in method");

// monitormismatch should turn off.
@@ -52,6 +53,7 @@ public static void main(String... args) throws Exception {
"-Xlog:monitormismatch=off",
"MonitorMismatchHelper");
o = new OutputAnalyzer(pb.start());
o.shouldHaveExitValue(0);
o.shouldNotContain("[monitormismatch]");
};