Skip to content

Commit

Permalink
8259446: runtime/jni/checked/TestCheckedReleaseArrayElements.java fai…
Browse files Browse the repository at this point in the history
…ls with stderr not empty

Reviewed-by: dcubed
  • Loading branch information
David Holmes committed Jan 8, 2021
1 parent 628c546 commit 7e6677b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ public static void main(String[] args) throws Throwable {
if (args == null || args.length == 0) {
test();
} else {
OutputAnalyzer output =
ProcessTools.executeTestJvm("-Xcheck:jni",
"-Djava.library.path=" + Utils.TEST_NATIVE_PATH,
"TestCheckedReleaseArrayElements");
// Uses executeProcess() instead of executeTestJvm() to avoid passing options
// that might generate output on stderr (which should be empty for this test).
ProcessBuilder pb =
ProcessTools.createJavaProcessBuilder("-Xcheck:jni",
"-Djava.library.path=" + Utils.TEST_NATIVE_PATH,
"TestCheckedReleaseArrayElements");
OutputAnalyzer output = ProcessTools.executeProcess(pb);
output.shouldHaveExitValue(0);
output.stderrShouldBeEmpty();
output.stdoutShouldNotBeEmpty();
Expand Down

1 comment on commit 7e6677b

@openjdk-notifier
Copy link

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.