GP-0: from review

This commit is contained in:
d-millar 2025-01-10 20:50:09 +00:00
parent 4fd092bb73
commit fe71611803
6 changed files with 119 additions and 119 deletions

View file

@ -230,10 +230,6 @@ public abstract class AbstractDrgnTraceRmiTest extends AbstractGhidraHeadedDebug
protected record PythonAndConnection(ExecInDrgn exec, TraceRmiConnection connection)
implements AutoCloseable {
protected boolean hasMethod(String name) {
return connection.getMethods().get(name) != null;
}
protected RemoteMethod getMethod(String name) {
return Objects.requireNonNull(connection.getMethods().get(name));
}

View file

@ -17,6 +17,7 @@ package agent.drgn.rmi;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.junit.Assume.*;
import java.util.*;
@ -200,9 +201,7 @@ public class DrgnMethodsTest extends AbstractDrgnTraceRmiTest {
txCreate(conn, path);
String out = conn.executeCapture("print(hasattr(drgn, 'RelocatableModule'))").strip();
if (out.equals("False")) {
return;
}
assumeFalse(out.equals("False"));
RemoteMethod refreshMappings = conn.getMethod("refresh_mappings");
try (ManagedDomainObject mdo = openDomainObject(MDO)) {
@ -227,9 +226,7 @@ public class DrgnMethodsTest extends AbstractDrgnTraceRmiTest {
txCreate(conn, path);
String out = conn.executeCapture("print(hasattr(drgn, 'RelocatableModule'))").strip();
if (out.equals("False")) {
return;
}
assumeFalse(out.equals("False"));
RemoteMethod refreshModules = conn.getMethod("refresh_modules");
try (ManagedDomainObject mdo = openDomainObject(MDO)) {