RFR: JDK-8327071: [Testbug] g-tests for cgroup leave files in /tmp on linux

Thomas Stuefe stuefe at openjdk.org
Mon Mar 4 08:31:54 UTC 2024


On Mon, 4 Mar 2024 08:07:14 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> looks like a couple of other gtests use the tmp dir too
> 
> ```
> grep -nH -r get_temp_directory  *
> logging/logTestFixture.cpp:40:                         os::get_temp_directory(), os::file_separator(), os::current_process_id(),
> logging/logTestUtils.inline.hpp:93:static const char* tmp_dir = os::get_temp_directory();
> logging/test_logFileOutput.cpp:173:  ss.print("%s%s%s%d", os::get_temp_directory(), os::file_separator(), "tmplogdir", os::current_process_id());
> os/linux/test_cgroupSubsystem_linux.cpp:45:  path.print_raw(os::get_temp_directory());
> ```
> 
> but seems the others at least clean up the created files as far as I can see.

Okay, if it is established practice, let's do it here too. When in Rome...

What I like most about the current-directory solution is the ability to keep files with -retain, for post-test analysis. But if we change this, we should change it for all tests, and that is beyond the scope of this RFR.

Cheers, Thomas

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

PR Comment: https://git.openjdk.org/jdk/pull/18077#issuecomment-1975994439


More information about the hotspot-dev mailing list