RFR: 8259446: runtime/jni/checked/TestCheckedReleaseArrayElements.java fails with stderr not empty

Daniel D.Daugherty dcubed at openjdk.java.net
Fri Jan 8 15:09:58 UTC 2021


On Fri, 8 Jan 2021 10:33:39 GMT, David Holmes <dholmes at openjdk.org> wrote:

> The test checks stderr is empty.
> The test is run in our tier3 CI testing.
> Tier3 (and some other tiers) has a configuration that includes the -showversion flag which outputs the version string to stderr.
> 
> => ergo the test fails because stderr is not empty!
> 
> Fix: exec the secondary VM without including the jtreg test VM arguments.
> 
> I think this is really a bug in our test job definitions and we've been very lucky to not encounter problems with using `-showversion`, but as a quick fix this suffices, and we don't expect any other JVM flags to have any impact here.
> 
> Tested by running jtreg with/without -showversion being passed to JVM under test.
> Tier3 test run in progress too.
> Thanks.

Changes requested by dcubed (Reviewer).

test/hotspot/jtreg/runtime/jni/checked/TestCheckedReleaseArrayElements.java line 51:

> 49:                                                       "-Djava.library.path=" + Utils.TEST_NATIVE_PATH,
> 50:                                                       "TestCheckedReleaseArrayElements");
> 51:             OutputAnalyzer output = ProcessTools.executeProcess(pb);

I would add a comment above L51:
// Uses executeProcess() instead of executeTestJvm() to avoid passing options
// that might generate output on stderr (which should be empty for this test).

-------------

PR: https://git.openjdk.java.net/jdk/pull/2001


More information about the hotspot-runtime-dev mailing list