Integrated: 8297302: gtest/AsyncLogGtest.java fails AsyncLogTest.stdoutOutput_vm
Xin Liu
xliu at openjdk.org
Thu Apr 20 17:05:53 UTC 2023
On Wed, 19 Apr 2023 06:32:51 GMT, Xin Liu <xliu at openjdk.org> wrote:
> This patch tries to resolve the intermittent failures. gtest uses mktemp and dup/dup2 to implement CapturedStream.
> The mechanism may fail in temp file or the current process happens to run out of file descriptor. It's possible that
> GetCapturedStream() returns an empty string and it confuses write_to_file().
>
> This patch strengthens write_to_file() in the following 2 ways. The test skips content check if write_to_file()
> returtn false.
> 1. at least see a non-empty string from stdout/stderr. we write a string "header" to stdout/stderr.
> 2. flush all streams before calling GetCapturedStream()
This pull request has now been integrated.
Changeset: 9412c0a2
Author: Xin Liu <xliu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9412c0a2caf7d1c279f933e1f767eb3689a2a1ca
Stats: 24 lines in 1 file changed: 8 ins; 2 del; 14 mod
8297302: gtest/AsyncLogGtest.java fails AsyncLogTest.stdoutOutput_vm
Reviewed-by: dholmes, shade
-------------
PR: https://git.openjdk.org/jdk/pull/13524
More information about the hotspot-runtime-dev
mailing list