JDK-8306946 : jdk/test/lib/process/ProcessToolsStartProcessTest.java fails with "wrong number of lines in OutputAnalyzer output"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: test
  • Affected Version: 21
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows
  • CPU: x86_64,aarch64
  • Submitted: 2023-04-26
  • Updated: 2024-06-05
  • Resolved: 2023-05-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 21
17.0.13Fixed 21 b22Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK21 CI:

jdk/test/lib/process/ProcessToolsStartProcessTest.java

Here's a snippet from the log file:

FAILED: wrong number of lines in OutputAnalyzer output
DEBUG: OutputAnalyzer output: got 12 lines, expected 50. Output follows:
A line on stdout 0
A line on stdout 1
A line on stdout 2
A line on stdout 3
A line on stdout 4
A line on stdout 5
A line on stdout 6
A line on stdout 7
A line on stdout 8
A line on stdout 9
A line on stdout 10
A line on stdout 11
DEBUG: done with OutputAnalyzer stdout.
Test ERROR
----------System.err:(16/1058)----------
java.lang.RuntimeException: One or more tests failed. See output for details.
	at ProcessToolsStartProcessTest.main(ProcessToolsStartProcessTest.java:109)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1592)
java.lang.RuntimeException: One or more tests failed. See output for details.
	at ProcessToolsStartProcessTest.main(ProcessToolsStartProcessTest.java:109)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1592)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: One or more tests failed. See output for details.

This is a new test that came with the fix for:

JDK-8233725 ProcessTools.startProcess() has output issues when using an OutputAnalyzer at the same time
Comments
[jdk17u-fix-request] Approval Request from Elif Aslan “Clean backport. This backport is to address jdk/test/lib/process ProcessToolsStartProcessTest.java fails with "wrong number of lines in OutputAnalyzer output. GHA tested and JspawnhelperWarnings test passes with this change added.
29-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2456 Date: 2024-05-09 16:32:05 +0000
29-05-2024

Changeset: 64ac9a05 Author: Leonid Mesnik <lmesnik@openjdk.org> Date: 2023-05-04 01:10:54 +0000 URL: https://git.openjdk.org/jdk/commit/64ac9a05e85020d24e33ba55cffa1bd9b269218a
04-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13683 Date: 2023-04-27 01:06:23 +0000
27-04-2023

[~lmesnik] - Please take a look at this failure in the new test.
26-04-2023