Skip to content
Permalink
Browse files
8272335: runtime/cds/appcds/MoveJDKTest.java doesn't check exit codes
Reviewed-by: iklam
  • Loading branch information
iignatev committed Aug 11, 2021
1 parent 9ba8a12 commit 75a06421e596b0e0006120a13836ec65a3ab9d46
Showing 1 changed file with 8 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
@@ -54,7 +54,8 @@ public static void main(String[] args) throws Exception {
String jsaOpt = "-XX:SharedArchiveFile=" + jsaFile;
{
ProcessBuilder pb = makeBuilder(java_home_src + "/bin/java", "-Xshare:dump", jsaOpt);
TestCommon.executeAndLog(pb, "dump");
TestCommon.executeAndLog(pb, "dump")
.shouldHaveExitValue(0);
}
{
ProcessBuilder pb = makeBuilder(java_home_src + "/bin/java",
@@ -63,6 +64,7 @@ public static void main(String[] args) throws Exception {
"-Xlog:class+path=info",
"-version");
OutputAnalyzer out = TestCommon.executeAndLog(pb, "exec-src");
out.shouldHaveExitValue(0);
out.shouldNotContain("shared class paths mismatch");
out.shouldNotContain("BOOT classpath mismatch");
}
@@ -78,6 +80,7 @@ public static void main(String[] args) throws Exception {
"-Xlog:class+path=info",
"-version");
OutputAnalyzer out = TestCommon.executeAndLog(pb, "exec-dst");
out.shouldHaveExitValue(0);
out.shouldNotContain("shared class paths mismatch");
out.shouldNotContain("BOOT classpath mismatch");
}
@@ -91,7 +94,8 @@ public static void main(String[] args) throws Exception {
"-Xshare:dump",
dumptimeBootAppendOpt,
jsaOpt);
TestCommon.executeAndLog(pb, "dump");
TestCommon.executeAndLog(pb, "dump")
.shouldHaveExitValue(0);
}
{
String runtimeBootAppendOpt = dumptimeBootAppendOpt + System.getProperty("path.separator") + helloJar;
@@ -102,6 +106,7 @@ public static void main(String[] args) throws Exception {
"-Xlog:class+path=info",
"-version");
OutputAnalyzer out = TestCommon.executeAndLog(pb, "exec-dst");
out.shouldHaveExitValue(0);
out.shouldNotContain("shared class paths mismatch");
out.shouldNotContain("BOOT classpath mismatch");
}

1 comment on commit 75a0642

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 75a0642 Aug 11, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.