On Tue, 8 Oct 2024 17:05:22 GMT, Phil Race <p...@openjdk.org> wrote: >>> It is perfectly fine. We do this in many tests. >> >> OK, thanks for the clarification. >> >>> OTOH I don't think it necessary to print the absolute path. >> >>> Doing what I suggested is the way to go. >> >> Just to be clear then -- the test should continue to save the images to disk >> on failure, but should not include the file path in the error message, >> correct? I can update the PR if that's the case. > > Right. > And actually the best thing when saving the file would be to to get the dir > path to save to from using > something like this > String dir = System.getProperty("test.classes", "."); > String filename = dir + java.io.File.separator + basename + ".png"; > This ensures it is saved the same place as jtreg puts the class files and if > that is not defined (ie you are running it outside jtreg), then in the > current dir. > But no need to "print" that path.
Great, I've updated the PR accordingly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20993#discussion_r1792267478