On Fri, 19 Aug 2022 22:41:00 GMT, Alex Menkov <amen...@openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix minor typo in output. > > test/jdk/com/sun/jdi/CLETest.java line 137: > >> 135: String method; >> 136: String signature; >> 137: int lineNumber; > > Should be final ok > test/jdk/com/sun/jdi/CLETest.java line 231: > >> 229: testcaseFailed = false; >> 230: } >> 231: } > > break missed ok > test/jdk/com/sun/jdi/CLETest.java line 237: > >> 235: testcaseFailed = false; >> 236: } >> 237: } > > break missed ok > test/jdk/com/sun/jdi/CLETest.java line 243: > >> 241: testcaseFailed = false; >> 242: } >> 243: } > > break missed ok > test/jdk/com/sun/jdi/CLETest.java line 249: > >> 247: testcaseFailed = false; >> 248: } >> 249: } > > break missed ok > test/jdk/com/sun/jdi/CLETest.java line 409: > >> 407: // Setup all breakpoints >> 408: for (MethodBreakpointData bpData : breakpoints) { >> 409: Location loc = findMethodLocation(targetClass, >> bpData.method, > > Specify breakpoints by line number in a method is better than just line > number, but did you think about mark them with some tag and parse source file > to get line numbers? (like in test/jdk/com/sun/jdi/lib/jdb/JdbTest.java, > parseBreakpoints method) It looks like the tests in com/sun/jdi are split between those that extend `JdbTest` and those that extend `TestScaffold`. I'm not too sure of the rationale for using one over the other, but I ended up with `TestScaffold` because of the test I initially used as a template (BreakpointTest.java). `parseBreakpoints()` is only supported by `JdbTest`, so I would need to convert the test to extend it instead. I have no idea how disruptive this might be to the test. I think the breakpoints I have are fairly safe from code movement and modifications. It would require edits within the methods with the breakpoints, all of which are very simple and well commented, and there really is no reason to ever edit them in the first place. Also there are 8 other tests that are sensitive to line numbers (search for THIS TEST IS LINE NUMBER SENSITIVE), and they are at much greater risk (adding or removing a line anywhere before the breakpoint will break the test). ------------- PR: https://git.openjdk.org/jdk/pull/9840