Ghidra is a software reverse engineering (SRE) framework
Added test debug
dragonmacherf75cbe496300
diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/function/Function1Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/function/Function1Test.javaindex bba9211827..bd7bd93920 100644--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/function/Function1Test.java+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/function/Function1Test.java@@ -55,6 +55,7 @@ import ghidra.program.model.listing.*;import ghidra.program.model.symbol.*;import ghidra.program.util.ProgramSelection;import ghidra.test.*;+import ghidra.util.Msg;import ghidra.util.task.TaskMonitor;public class Function1Test extends AbstractGhidraHeadedIntegrationTest {@@ -354,6 +355,7 @@ public class Function1Test extends AbstractGhidraHeadedIntegrationTest {Function func = createThunk(addr("0x10030d2"), "comdlg32.dll::CommDlgExtendedError", true);assertTrue(cb.goToField(addr("0x10030d2"), "Function Signature", 0, 0));+ assertTrue(func.isThunk());performAction(revertThunk, cb.getProvider(), false);@@ -369,6 +371,19 @@ public class Function1Test extends AbstractGhidraHeadedIntegrationTest {undo(program);// undo changed function+ if (!func.isThunk()) {++ Msg.debug(this, "\n\t>>> test will fail...waiting a bit to see if it is timing");+ waitForValueWithoutFailing(() -> {++ Msg.debug(this, "\tchecking again...");+ if (!func.isThunk()) {+ return null; // not ready+ }+ return true;+ });+ }+assertTrue(func.isThunk());assertEquals("CommDlgExtendedError", func.getName());@@ -886,8 +901,8 @@ public class Function1Test extends AbstractGhidraHeadedIntegrationTest {Variable[] vars = function.getLocalVariables(VariableFilter.STACK_VARIABLE_FILTER);tx(program, () -> {DataType byteDT = program.getDataTypeManager()- .addDataType(new ByteDataType(),- DataTypeConflictHandler.DEFAULT_HANDLER);+ .addDataType(new ByteDataType(),+ DataTypeConflictHandler.DEFAULT_HANDLER);vars[1].setDataType(byteDT, SourceType.ANALYSIS);});@@ -1278,6 +1293,7 @@ public class Function1Test extends AbstractGhidraHeadedIntegrationTest {// the following text (this is only a part of the status message, but is enough// to verify the test):assertTrue(dialog.getStatusText().contains("doesn't fit within"));+ close(dialog);}//==================================================================================================