RFR: 8017463: [TEST_BUG] 2 tests from tools/pack200/ remain about 1 GB of data in work directory after execution

Kumar Srinivasan kumar.x.srinivasan at oracle.com
Mon Jul 1 23:12:10 UTC 2013


On 7/1/2013 2:45 PM, Mandy Chung wrote:
>
> On 7/1/2013 2:11 PM, Kumar Srinivasan wrote:
>>> In Utils.cleanup, it will delete the files with certain extensions 
>>> in the current directory.  I skimmed on the tests and look to me 
>>> that those files can be altered with a different path and not 
>>> necessary in the current directory.  Just wonder if you want to make 
>>> cleanup to take a path parameter instead of hardcoding the cwd. 
>>> Otherwise, this change looks fine with me.
>>
>> AFAICT all the test files are in "." which is the scratch directory 
>> that jtreg provides,
>> some tests may/could  obtain the absolute path to this.
>>
>> Can you please point me to the place where you found the doubt ?
>
> Your fix is fine as all the test files follow the convention to
> put under ".".
>
> My question was led by these methods in the Utils class:
>
>  static void pack(JarFile jarFile, File packFile)
>  static void unpackj(File inFile, JarOutputStream jarStream)
>
> For example Pack200Test calls these methods by passing a File object
> and JarOutputStream and the test itself uses the basename that
> makes sure that the file is in ".".  Is the cleanup() trying to
> delete the files created during pack and unpack in the test?
Yes. and other temporary/transient  files that might turn up.

Thanks for reviewing Mandy.

Kumar

> That's what my comment is about.
>
> Mandy
>




More information about the core-libs-dev mailing list