Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2014-12-22 18:49:25 +0000
committerMarc Khouzam2014-12-22 20:22:58 +0000
commitca6d07cf0cebbbec9ea66b14abd7686fd1122f50 (patch)
tree56f1bbf2cadb7f4bc2077716d6708539524d21bc
parentc647a521184844f92ab17dccd0bd9a93b9206146 (diff)
downloadorg.eclipse.cdt-ca6d07cf0cebbbec9ea66b14abd7686fd1122f50.tar.gz
org.eclipse.cdt-ca6d07cf0cebbbec9ea66b14abd7686fd1122f50.tar.xz
org.eclipse.cdt-ca6d07cf0cebbbec9ea66b14abd7686fd1122f50.zip
Bug 455992 - MIRunControlTest.getExecutionContexts fails when run in
remote mode Change-Id: I869a7496e63380f3839d641105fa29fc0c1c3b74 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/38692 Tested-by: Hudson CI
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java
index 06d6f5aaa1..14c3116b0e 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRunControlTest.java
@@ -284,12 +284,7 @@ public class MIRunControlTest extends BaseTestCase {
MIStoppedEvent stoppedEvent = SyncUtil.step(StepType.STEP_OVER); // over the printf
SyncUtil.step(stoppedEvent.getDMContext(), StepType.STEP_OVER); // over the create-thread call
SyncUtil.step(stoppedEvent.getDMContext(), StepType.STEP_OVER, TestsPlugin.massageTimeout(2000)); // over the one second sleep
-
- // Make sure thread started event was received
- IStartedDMEvent startedEvent = startedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
-
- Assert.assertEquals("Thread created event is for wrong thread id", sProgramIsCygwin ? 3 : 2, ((IMIExecutionDMContext)startedEvent.getDMContext()).getThreadId());
-
+
final IContainerDMContext containerDmc = SyncUtil.getContainerContext();
/*
@@ -304,6 +299,13 @@ public class MIRunControlTest extends BaseTestCase {
wait.waitUntilDone(TestsPlugin.massageTimeout(5000));
Assert.assertTrue(wait.getMessage(), wait.isOK());
wait.waitReset();
+
+ // Make sure thread started event was received
+ // We check this _after_ we ask for the execution contexts because when running remote (i.e., with gdbserver),
+ // thread events are not sent by gdb until a request for a thread list is given (Bug 455992)
+ IStartedDMEvent startedEvent = startedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(1000));
+ Assert.assertEquals("Thread created event is for wrong thread id", sProgramIsCygwin ? 3 : 2, ((IMIExecutionDMContext)startedEvent.getDMContext()).getThreadId());
+
/*
* Get data
*/

Back to the top