RFR: 8279022: JCmdTestFileSafety.java should check file time stamp for test result

Yumin Qi minqi at openjdk.java.net
Tue Dec 21 16:31:17 UTC 2021


On Tue, 21 Dec 2021 05:21:39 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> When test finished, the created archive file should be checked after  the first run for existence, and checked for time stamp after second run.  Since the file name is same, this method is more accurate than the existing checking, only checking the existence of the file. Since jcmd can do repeat dynamic dump to same java process now, removed unnecessary restart process code.
>> 
>> Tests: tier1, jtreg on local linux-x64.
>> 
>> Thanks
>> Yumin
>
> test/hotspot/jtreg/runtime/cds/appcds/jcmd/JCmdTestFileSafety.java line 104:
> 
>> 102:             fileLocal.delete();
>> 103:         }
>> 104:         outputDirFile.setWritable(true);
> 
> Since you've added the `setWritable(true)` here, do you still need the existing one at line 116?

It can be removed, but better keep it --- the testing result of last step is deleted just in case it could affect next test. I would like remove the result file anyway. Since the file name keep changing, I will update with a function with the file name (String) to delete the file. Thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6904


More information about the hotspot-runtime-dev mailing list