GP-0: Fix tests.

This commit is contained in:
Dan
2023-11-14 09:36:30 -05:00
parent ba30f4b0bb
commit 5654daa89d
7 changed files with 30 additions and 18 deletions

View File

@@ -1274,8 +1274,7 @@ public class GdbMethodsTest extends AbstractGdbTraceRmiTest {
tb = new ToyDBTraceBuilder((Trace) mdo.get());
waitStopped();
long snap = 0;
long pcOff =
Integer.decode(conn.executeCapture("print/x $pc").split("=")[1].strip());
long pcOff = Long.decode(conn.executeCapture("print/x $pc").split("=")[1].strip());
TraceObject inf1 = Objects.requireNonNull(tb.obj("Inferiors[1]"));
readMem.invoke(Map.ofEntries(
@@ -1306,8 +1305,7 @@ public class GdbMethodsTest extends AbstractGdbTraceRmiTest {
try (ManagedDomainObject mdo = openDomainObject("/New Traces/gdb/bash")) {
tb = new ToyDBTraceBuilder((Trace) mdo.get());
waitStopped();
long pcOff =
Integer.decode(conn.executeCapture("print/x $pc").split("=")[1].strip());
long pcOff = Long.decode(conn.executeCapture("print/x $pc").split("=")[1].strip());
TraceObject inf1 = Objects.requireNonNull(tb.obj("Inferiors[1]"));
writeMem.invoke(Map.ofEntries(

View File

@@ -887,6 +887,7 @@ public class LldbCommandsTest extends AbstractLldbTraceRmiTest {
assertEquals(
"""
Parent Key Span Value Type
Test.Objects[1] vaddr [0,+inf) ram:deadbeef ADDRESS
Test.Objects[1] vbool [0,+inf) True BOOL
Test.Objects[1] vboolarr [0,+inf) [True, False] BOOL_ARR
Test.Objects[1] vbyte [0,+inf) 1 BYTE
@@ -900,8 +901,7 @@ public class LldbCommandsTest extends AbstractLldbTraceRmiTest {
Test.Objects[1] vobj [0,+inf) Test.Objects[1] OBJECT
Test.Objects[1] vshort [0,+inf) 2 SHORT
Test.Objects[1] vshortarr [0,+inf) [1, 2, 3] SHORT_ARR
Test.Objects[1] vstring [0,+inf) '"Hello"' STRING
Test.Objects[1] vaddr [0,+inf) ram:deadbeef ADDRESS"""
Test.Objects[1] vstring [0,+inf) '"Hello"' STRING"""
.replaceAll(" ", "")
.replaceAll("\n", ""),
extractOutSection(out, "---GetValues---").replaceAll(" ", "").replaceAll("\n", ""));

View File

@@ -188,6 +188,7 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
.getValuePaths(Lifespan.at(0),
PathPredicates.parse("Processes[].Watchpoints[]"))
.map(p -> p.getLastEntry())
.sorted(Comparator.comparing(TraceObjectValue::getEntryKey))
.toList();
assertEquals(3, procWatchLocVals.size());
AddressRange rangeMain0 =