1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 23:45:23 +02:00

Bug 518689: Be lenient in cases where gdb provides extra info

In some targets (such as the build machines @ Eclipse) gdb is
returning thread names for remote debugging. No longer fail tests
in this case as long as the provided name is empty or correct.

Change-Id: I5f59f279a9d477e2c1ccb32098bbe1dad08cf334
This commit is contained in:
Jonah Graham 2021-04-04 16:53:52 -04:00
parent 821eb7b1a4
commit 48de9319c6

View file

@ -146,8 +146,16 @@ public class GDBProcessesTest extends BaseParametrizedTestCase {
for (int i = 1; i <= 6; i++) { for (int i = 1; i <= 6; i++) {
IThreadDMData threadData = SyncUtil.getThreadData(i); IThreadDMData threadData = SyncUtil.getThreadData(i);
String name = threadData.getName(); String name = threadData.getName();
String expectedName = threadNamesSupported() ? names[i - 1] : ""; if (threadNamesSupported()) {
assertEquals("Thread name of thread " + i, expectedName, name); assertEquals("Thread name of thread " + i, names[i - 1], name);
} else {
// Sometimes GDBserver does provide this info - it seems unreliable. So
// we allow an empty name, but if not empty when !threadNamesSupported
// we require it to be the correct name. See Bug 518689
if (!"".equals(name)) {
assertEquals("Thread name of thread " + i, names[i - 1], name);
}
}
} }
} }
} }