RFR (M) 8229036: Remove the testing against NSK_TRUE from tests
Jean Christophe Beyler
jcbeyler at google.com
Fri Aug 2 22:00:08 UTC 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190802/2057a68e/attachment-0001.html>
More information about the serviceability-dev
mailing list