RFR: JDK-8265078: jpackage tests on Windows leave large temp files

2021-04-13 Thread Andy Herrick
two changes: One to jpackage, when recursively removing directory, when IOException occurs, record it and continue (deleting as much as possible) before throwing the exception. The other to tests, when running jpackage via ProcessBuilder.execute(), set the "TMP" environment variable to the curre

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files

2021-04-13 Thread Alexey Semenyuk
On Tue, 13 Apr 2021 18:57:20 GMT, Andy Herrick wrote: > two changes: > One to jpackage, when recursively removing directory, when IOException > occurs, record it and continue (deleting as much as possible) before throwing > the exception. > The other to tests, when running jpackage via ProcessB

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files

2021-04-13 Thread Andy Herrick
On Tue, 13 Apr 2021 19:48:24 GMT, Alexey Semenyuk wrote: >> two changes: >> One to jpackage, when recursively removing directory, when IOException >> occurs, record it and continue (deleting as much as possible) before >> throwing the exception. >> The other to tests, when running jpackage via

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files

2021-04-13 Thread Andy Herrick
On Tue, 13 Apr 2021 20:26:56 GMT, Andy Herrick wrote: >> src/jdk.jpackage/share/classes/jdk/jpackage/internal/IOUtils.java line 59: >> >>> 57: >>> 58: public static void deleteRecursive(Path directory) throws >>> IOException { >>> 59: final IOException [] exception = { (IOException

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files

2021-04-13 Thread Andy Herrick
On Tue, 13 Apr 2021 20:31:38 GMT, Andy Herrick wrote: >> That seems like overkill. walkFileTree must call visitFile, >> preVisitDirectory, and postVisitDirectory synchronously, because their >> return value tells walkFileTree where to go next. > > I can use AtomicReference instead of Array to

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v2]

2021-04-13 Thread Andy Herrick
> two changes: > One to jpackage, when recursively removing directory, when IOException > occurs, record it and continue (deleting as much as possible) before throwing > the exception. > The other to tests, when running jpackage via ProcessBuilder.execute(), set > the "TMP" environment variable

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v2]

2021-04-13 Thread Kevin Rushforth
On Tue, 13 Apr 2021 21:05:26 GMT, Andy Herrick wrote: >> two changes: >> One to jpackage, when recursively removing directory, when IOException >> occurs, record it and continue (deleting as much as possible) before >> throwing the exception. >> The other to tests, when running jpackage via Pro

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v3]

2021-04-13 Thread Andy Herrick
> two changes: > One to jpackage, when recursively removing directory, when IOException > occurs, record it and continue (deleting as much as possible) before throwing > the exception. > The other to tests, when running jpackage via ProcessBuilder.execute(), set > the "TMP" environment variable

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v3]

2021-04-13 Thread Kevin Rushforth
On Tue, 13 Apr 2021 22:50:12 GMT, Andy Herrick wrote: >> two changes: >> One to jpackage, when recursively removing directory, when IOException >> occurs, record it and continue (deleting as much as possible) before >> throwing the exception. >> The other to tests, when running jpackage via Pro

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v3]

2021-04-14 Thread Andy Herrick
On Tue, 13 Apr 2021 22:50:12 GMT, Andy Herrick wrote: >> two changes: >> One to jpackage, when recursively removing directory, when IOException >> occurs, record it and continue (deleting as much as possible) before >> throwing the exception. >> The other to tests, when running jpackage via Pro

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v3]

2021-04-14 Thread Alexey Semenyuk
On Tue, 13 Apr 2021 22:50:12 GMT, Andy Herrick wrote: >> two changes: >> One to jpackage, when recursively removing directory, when IOException >> occurs, record it and continue (deleting as much as possible) before >> throwing the exception. >> The other to tests, when running jpackage via Pro

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v2]

2021-04-14 Thread Alexey Semenyuk
On Tue, 13 Apr 2021 21:10:56 GMT, Kevin Rushforth wrote: > Are you sure you need an `AtomicReference` to set the exception? I don't see > any use of multiple threads, but I might be missing something. If you do need > it, you need to fix the order of arguments. `postVisitDirectory()` and `visi

Re: RFR: JDK-8265078: jpackage tests on Windows leave large temp files [v2]

2021-04-14 Thread Kevin Rushforth
On Wed, 14 Apr 2021 17:36:21 GMT, Alexey Semenyuk wrote: > postVisitDirectory() and visitFile() methods can be potentially called > concurrently by walkFileTree() I don't think they can. > Javadoc ... doesn't say anything about synchronization, so I think it is fair > to assume it is not guar