[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: 8325532: serviceability/dcmd/compiler/PerfMapTest.java leaves created files in the /tmp dir
From: Kevin Walls <kevinw () openjdk ! org>
Date: 2024-02-29 17:23:52
Message-ID: NfJBoqPwpBtF3oIn7yBlxrg2JNE8KVlzjzhS_IZK4qU=.87e5bad6-e328-40c2-af05-ddcf8d5aa1e0 () github ! com
[Download RAW message or body]
On Fri, 23 Feb 2024 21:55:15 GMT, Chris Plummer <cjplummer@openjdk.org> wrote:
> PerfMapTest.java issues the Compiler.perfmap jcmd with a filename argument to write \
> the perfmap to. It does this in 3 different modes. 2 of the modes result in a \
> perfmap file being left in the tmp directory that is not removed after the test \
> executes (and should be removed). The 3rd mode creates the perfmap file in the \
> directory specified by the test.dir property, and is ok to leave the file there. \
> I've added code to delete the /tmp files that are created.
> I did a bit of extra testing by hand. I created `/tmp/perf-<pid>.map` as root. As \
> expected the Files.deleteIfExists() call threw an exception due to the lack of \
> permissions to delete the file. However, I then realized the file had a size of 0, \
> which means the test was not even doing a proper job of testing that the perfrmap \
> jcmd was working. In other words, the test should have failed long before getting \
> to the Files.deleteIfExists(), so I added a size check to make sure it fails when \
> the file is not written to.
sorry, that's right the PidJcmdExecutor can't help get the error from the perfmap \
command, but it does capture some output, the jcmd confirmation. So it behaves \
differently, and will fail here as it checks the outputs are empty...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17992#issuecomment-1971608154
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic