Hi Paru,
Thanks for writing this test. It will make figuring out JDK-8187143 a lot easier. Overall the test looks good. My main concern is the lack of comments. It makes it hard for the reader to understand the flow of the test and to understand some of the less obvious actions being performed. That is especially true for this test, which is doing some really bizarre stuff. Some of this you cover in our RFR summary below, but that info really needs to be in the test itself, along with additional comments. For example, what does pauseAtDebugger() do? It looks to me like it sets a breakpoint on the _javascript_ debugger that has a class name that ends with ScriptRuntime and the method name is DEBUGGER(). But I only figured that out after staring at the code for a while, and recalling a conversation we had a few weeks ago. It's also not described why this is being done. Here's another example: 126 while (!vmDisconnected) { 127 try { 128 Thread.sleep(100); 129 } catch (InterruptedException ee) { 130 } 131 } I seem to also recall us discussing the need for this, but can no longer recall the reason Another example is findScriptFrame(). What is the significance of the frame whose class name starts with jdk.nashorn.internal.scripts.Script$? I think I understand (it's the generated java method for the _javascript_ you setup in ScriptDebuggee.doit()), but I can only figure this out based on earlier conversations we had and your RFR comments below. I'd expect the uninformed reader to spend a long time coming the same conclusion. The following are just a few minor things I noticed: Copyright should only have 2018. 57 } catch (Exception npe) { Probably best to call it "ex" instead of "npe". 85 NashornPopFrameTest bbcT = new NashornPopFrameTest(args); It's unclear to me where the name "bbcT" comes from. 134 if (failReason != null) { 135 failure(failReason); 136 } You have two classes that declare "String failReason" which makes it a bit confusing to track which one the reader is dealing with. Also, the NashornPopFrameTest version is initialized to non-null, so doesn't that make the test always fail when the above code is executed? Is there a reason why ScriptDebuggee doesn't just put everything in main() and not have a doit() method? thanks, Chris On 2/7/18 12:25 PM, serguei.spit...@oracle.com wrote:
|
- RFR 8193150: Create a jtreg version of the test... Paru Somashekar
- Re: RFR 8193150: Create a jtreg version of... serguei.spit...@oracle.com
- Re: RFR 8193150: Create a jtreg versio... Chris Plummer
- Re: RFR 8193150: Create a jtreg ve... Paru Somashekar
- Re: RFR 8193150: Create a jtre... Chris Plummer
- Re: RFR 8193150: Create a... serguei.spit...@oracle.com
- Re: RFR 8193150: Crea... Chris Plummer
- Re: RFR 8193150: ... serguei.spit...@oracle.com
- Re: RFR 8193150: ... Paru Somashekar
- Re: RFR 8193150: ... Paru Somashekar
- Re: RFR 8193150: ... Chris Plummer
- Re: RFR 8193150: ... serguei.spit...@oracle.com
- Re: RFR 8193150: ... Paru Somashekar