Re: Review request: JDK-8172870 test/tools/jmod/JmodTest.java fails on windows with AccessDeniedException

2017-01-18 Thread Mandy Chung

> On Jan 18, 2017, at 1:25 AM, Chris Hegarty  wrote:
> 
> 
>> On 18 Jan 2017, at 07:38, Alan Bateman  wrote:
>> 
>> On 17/01/2017 21:23, Mandy Chung wrote:
>> 
>>> This test case attempts to verify that the temp file created by jmod is 
>>> cleaned up and removed if jmod create command fails.  It first cleans up 
>>> any temp files matching the prefix and suffix created for this test case.  
>>> The test fails because the fix for JDK-8160286 that creates the jmod temp 
>>> file in the tmp directory and it was updated to use Files.walk that may 
>>> fail to read the file attributes if the user doesn’t have access.
>>> 
>>> The patch fixes the test to call Files.list and find only the writeable 
>>> files matching the prefix and suffix.
>>> 
>>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8172870/webrev.00/
> 
> When this test was added originally jmod was creating the tmp file in 
> the current working directory. 
> 
> To avoid interference you could run with test with java.io.tmpdir set
> to the current working directory, “testng/othervm -Djava.io.tmpdir=. …"

Good suggestion.  I updated JmodTest.java on top of the patch:

* @run testng/othervm -Djava.io.tmpdir=. JmodTest

Mandy



Re: Review request: JDK-8172870 test/tools/jmod/JmodTest.java fails on windows with AccessDeniedException

2017-01-18 Thread Chris Hegarty

> On 18 Jan 2017, at 07:38, Alan Bateman  wrote:
> 
> On 17/01/2017 21:23, Mandy Chung wrote:
> 
>> This test case attempts to verify that the temp file created by jmod is 
>> cleaned up and removed if jmod create command fails.  It first cleans up any 
>> temp files matching the prefix and suffix created for this test case.  The 
>> test fails because the fix for JDK-8160286 that creates the jmod temp file 
>> in the tmp directory and it was updated to use Files.walk that may fail to 
>> read the file attributes if the user doesn’t have access.
>> 
>> The patch fixes the test to call Files.list and find only the writeable 
>> files matching the prefix and suffix.
>> 
>> http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8172870/webrev.00/

When this test was added originally jmod was creating the tmp file in 
the current working directory. 

To avoid interference you could run with test with java.io.tmpdir set
to the current working directory, “testng/othervm -Djava.io.tmpdir=. ..."

-Chris.



Re: Review request: JDK-8172870 test/tools/jmod/JmodTest.java fails on windows with AccessDeniedException

2017-01-17 Thread Alan Bateman

On 17/01/2017 21:23, Mandy Chung wrote:


This test case attempts to verify that the temp file created by jmod is cleaned 
up and removed if jmod create command fails.  It first cleans up any temp files 
matching the prefix and suffix created for this test case.  The test fails 
because the fix for JDK-8160286 that creates the jmod temp file in the tmp 
directory and it was updated to use Files.walk that may fail to read the file 
attributes if the user doesn’t have access.

The patch fixes the test to call Files.list and find only the writeable files 
matching the prefix and suffix.

http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8172870/webrev.00/


This looks okay (somewhat odd test but okay).

-Alan


Review request: JDK-8172870 test/tools/jmod/JmodTest.java fails on windows with AccessDeniedException

2017-01-17 Thread Mandy Chung
This test case attempts to verify that the temp file created by jmod is cleaned 
up and removed if jmod create command fails.  It first cleans up any temp files 
matching the prefix and suffix created for this test case.  The test fails 
because the fix for JDK-8160286 that creates the jmod temp file in the tmp 
directory and it was updated to use Files.walk that may fail to read the file 
attributes if the user doesn’t have access.

The patch fixes the test to call Files.list and find only the writeable files 
matching the prefix and suffix.

http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8172870/webrev.00/

Mandy