RFR [6943190] TEST_BUG: java/lang/Runtime/exec/ExecWithInput.java hardcodes path to cat
Ivan Gerasimov
ivan.gerasimov at oracle.com
Thu Mar 20 18:18:28 UTC 2014
Thank you Alan!
>>
>> I think we can assume that none of the tests which need UnixCommands
>> are for Windows, so I added explicit checking for that.
>> Having made sure the OS is a Unix (i.e. not Windows), the absence of
>> a required command now causes an exception to be thrown.
>>
>> Would you please take a look at the updated webrev?
>>
>> http://cr.openjdk.java.net/~igerasim/6943190/6/webrev/
> This looks okay to me. An alternative would be for findCommand to
> throw an exception when the command is not found and that would allow
> most of the ensureCommandAvailables(...) usages to be removed and
> saves searching for them twice.
>
I think it is informative to have the prerequisites checking at the
beginning of the test.
And the results of the search are cached in UnixCommands.nameToCommand
map, so they're searched for only once.
Sincerely yours,
Ivan
More information about the core-libs-dev
mailing list