| Summary: | [tests] Remote JUnits don't work anymore | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc Khouzam <marc.khouzam> | ||||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Marc Khouzam <marc.khouzam> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Marc Khouzam <marc.khouzam> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cdtdoug, pawel.1.piech | ||||||
| Version: | 8.0 | ||||||||
| Target Milestone: | 8.1.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marc Khouzam
Created attachment 196271 [details]
First part of fix
The problem was that we now clear the launch attributes before every class of tests, therefore when a suite sets an attribute, that attribute is lost as soon as the first class of test is loaded.
This patch adds a concept of globalLaunchAttributes which will not be reset when loading a new class of tests. Those global attributes can be used by suites, but the suite must clear them once it is done.
Committed to HEAD
*** cdt cvs genie on behalf of mkhouzam *** Bug 346789: Remote JUnits don't work anymore [*] Suite_Remote_7_2.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_2/Suite_Remote_7_2.java?root=Tools_Project&r1=1.5&r2=1.6 [*] Suite_Remote_7_1.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_1/Suite_Remote_7_1.java?root=Tools_Project&r1=1.5&r2=1.6 [*] Suite_Remote_7_0.java 1.8 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_0/Suite_Remote_7_0.java?root=Tools_Project&r1=1.7&r2=1.8 [*] Suite_Remote_7_3.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_7_3/Suite_Remote_7_3.java?root=Tools_Project&r1=1.2&r2=1.3 [*] Suite_Remote_6_6.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_6/Suite_Remote_6_6.java?root=Tools_Project&r1=1.5&r2=1.6 [*] Suite_Remote_6_8.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_8/Suite_Remote_6_8.java?root=Tools_Project&r1=1.5&r2=1.6 [*] BaseTestCase.java 1.17 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java?root=Tools_Project&r1=1.16&r2=1.17 [+] BaseRemoteSuite.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseRemoteSuite.java?root=Tools_Project&revision=1.1&view=markup [*] Suite_Remote_6_7.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/tests_6_7/Suite_Remote_6_7.java?root=Tools_Project&r1=1.5&r2=1.6 Note that there was a memory leak that prevented us from running more than 140 remote tests. This has been fixed by Bug 370376 Created attachment 210823 [details]
Properly detect that remote tests have stopped at main
There is a problem with the startup sequence of the remote tests.
The tests need to know when we are properly stopped at main.
With GDB >= 7.0, when connecting to the remote gdbserver, we get a first *stopped event at connection time. This is not the event we want. I had modified the code to instead listen for an IBreakpointHitDMEvent.
However, with GDB <= 6.8, temporary breakpoints are not reported as breakpoint-hit, so we don't get an IBreakpointHitDMEvent for GDB <= 6.8 but simply an ISuspendedDMEvent.
So, the question was, how can we listen for an ISuspendedDMEvent, but know that for GDB >= 7.0 we should ignore the first one?
What I found to be able to know we have stopped at main, in all cases,
is to look for an ISuspendedDMEvent and then confirming that it indicates
in its frame that it stopped at "main". This will allow us to skip
the first *stopped event for GDB >= 7.0 and also properly detect the stop for GDB <= 6.8
The attach patch does this.
2007 extra remote tests now pass :)
I will commit to master.
Remote tests now work overall. Some individual failures need to be fixed, but I'll address that in a separate bug. *** cdt git genie on behalf of Marc Khouzam ***
Bug 346789: fix startup sequence for remote JUnits tests
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=7f07eb597c9255655efd9895093ac7fb8ac42127
*** cdt git genie on behalf of Marc Khouzam ***
Bug 346789: fix startup sequence for remote JUnits tests
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=7f07eb597c9255655efd9895093ac7fb8ac42127
*** cdt git genie on behalf of Marc Khouzam ***
Bug 346789: fix startup sequence for remote JUnits tests
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=7f07eb597c9255655efd9895093ac7fb8ac42127
|