RFR (M) 8229036: Remove the testing against NSK_TRUE from tests
Jean Christophe Beyler
jcbeyler at google.com
Tue Aug 6 15:49:55 UTC 2019
Thanks Chris!
Could I get a second review please? :)
Jc
On Fri, Aug 2, 2019 at 4:20 PM Chris Plummer <chris.plummer at oracle.com>
wrote:
> Ok. I think the changes are fine as is.
>
> thanks,
>
> Chris
>
> On 8/2/19 3:00 PM, Jean Christophe Beyler wrote:
>
> Hi Chris,
>
> I only did it when there were repercussions to the change of if (.* ==
> NSK_TRUE).
>
> For example:
>
> http://cr.openjdk.java.net/~jcbeyler/8229036/webrev.00/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTime/gettime001/gettime001.cpp.udiff.html
>
> I wanted to move:
>
> - if (success != NSK_TRUE) {
> + if (!success) {
>
> But really I was thinking that success should be a bool then. However,
> success was assigned also by:
>
> success = checkTime(jvmti, &time, &prevTime, "VM_DEATH callback");
>
> So I went to transform checkTime to return a boolean, and that rippled into changing the NSK_FALSE to false as well.
>
> I can reduce the scope of this webrev to only being the if statement if you prefer, I was just working on getting the various elements to bool instead of int and NSK_TRUE/NSK_FALSE.
>
> Another solution would be to maybe augment the scope of the bug item to : Move NSK_TRUE/NSK_FALSE to true/false; and this webrev as a side-effect covers all the "if (.* NSK_TRUE)" cases.
>
> What do you think?
>
> Jc
>
>
>
> On Fri, Aug 2, 2019 at 2:40 PM Chris Plummer <chris.plummer at oracle.com>
> wrote:
>
>> Hi JC,
>>
>> Why does this webrev also remove references NSK_FALSE, and the previous
>> one references to NSK_TRUE?
>>
>> thanks,
>>
>> Chris
>>
>> On 8/2/19 2:21 PM, Jean Christophe Beyler wrote:
>>
>> Hi all,
>>
>> Here is the webrev that does the removal of if (.* == NSK_TRUE) and
>> replaces them with if (.*).
>>
>> Webrev: http://cr.openjdk.java.net/~jcbeyler/8229036/webrev.00/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8229036
>>
>> This was tested by running the tests changed on my dev machine, I'll push
>> it to the submit repo after review :-)
>>
>> Thanks and have a great day & weekend!,
>> Jc
>>
>>
>>
>
> --
>
> Thanks,
> Jc
>
>
>
--
Thanks,
Jc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190806/451c0dd7/attachment.html>
More information about the serviceability-dev
mailing list