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

Arno Zeller azeller at openjdk.org
Mon Mar 4 07:30:52 UTC 2024


On Sat, 2 Mar 2024 08:28:31 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> After each run of the g-tests for cgroups on Linux there are three new files left in /tmp.
>> 
>> cgroups-test-jdk.pid<pid>.cgroupTest.SubSystemFileLineContentsSingleLine
>> cgroups-test-jdk.pid<pid>.cgroupTest.SubSystemFileLineContentsMultipleLinesSuccessCases
>> cgroups-test-jdk.pid<pid>.cgroupTest.SubSystemFileLineContentsMultipleLinesErrorCases
>
> Hi @ArnoZeller, I wonder why these files have to live in tmp. Why can't they not live in the current directory, that way if we run gtest via jtreg tests, they would be cleaned automatically, and be subject to `-retain` if needed. @jdksjolen do you know why ?
> 
> Other than that, if they have to live in temp, the patch is of course fine.

Hi @tstuefe,
I must admit that I do not know what is normally expected from GTests.
- Should they cleanup in case of no error? (I guess yes)
- Where should GTests normally write temporary files?
- Does everybody run GTests only with JTReg or are they normally executed manually? (I myself always use JTReg, but only because I am used to JTReg).
Probably we could move the test to write to the current directory but I am not sure if this is a good idea when the test is not executed by JTReg. Perhaps someone with more GTests knowledge could assist here?

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

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


More information about the hotspot-dev mailing list