8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests

Reviewed-by: sgehwolf, stuefe, mdoerr
This commit is contained in:
Matthias Baesken 2024-02-16 13:13:11 +00:00
parent 0aaec97527
commit 9f4ec21f47

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2024, 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
@ -60,6 +60,9 @@ public class DockerRunOptions {
this.command = javaCmd;
this.classToRun = classToRun;
this.addJavaOpts(javaOpts);
// always print hserr to stderr in the docker tests to avoid
// trouble accessing it after a crash in the container
this.addJavaOpts("-XX:+ErrorFileToStderr");
}
public DockerRunOptions addDockerOpts(String... opts) {