Skip to content

Commit fcc9d35

Browse files
committed
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-1-26-24' into patch
2 parents 8327ebd + f75cbe4 commit fcc9d35

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/function/Function1Test.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import ghidra.program.model.symbol.*;
5656
import ghidra.program.util.ProgramSelection;
5757
import ghidra.test.*;
58+
import ghidra.util.Msg;
5859
import ghidra.util.task.TaskMonitor;
5960

6061
public class Function1Test extends AbstractGhidraHeadedIntegrationTest {
@@ -354,6 +355,7 @@ public void testRevertThunkFunction() throws Exception {
354355
Function func = createThunk(addr("0x10030d2"), "comdlg32.dll::CommDlgExtendedError", true);
355356

356357
assertTrue(cb.goToField(addr("0x10030d2"), "Function Signature", 0, 0));
358+
assertTrue(func.isThunk());
357359

358360
performAction(revertThunk, cb.getProvider(), false);
359361

@@ -369,6 +371,19 @@ public void testRevertThunkFunction() throws Exception {
369371

370372
undo(program);// undo changed function
371373

374+
if (!func.isThunk()) {
375+
376+
Msg.debug(this, "\n\t>>> test will fail...waiting a bit to see if it is timing");
377+
waitForValueWithoutFailing(() -> {
378+
379+
Msg.debug(this, "\tchecking again...");
380+
if (!func.isThunk()) {
381+
return null; // not ready
382+
}
383+
return true;
384+
});
385+
}
386+
372387
assertTrue(func.isThunk());
373388
assertEquals("CommDlgExtendedError", func.getName());
374389

@@ -886,8 +901,8 @@ public void testArray() throws Exception {
886901
Variable[] vars = function.getLocalVariables(VariableFilter.STACK_VARIABLE_FILTER);
887902
tx(program, () -> {
888903
DataType byteDT = program.getDataTypeManager()
889-
.addDataType(new ByteDataType(),
890-
DataTypeConflictHandler.DEFAULT_HANDLER);
904+
.addDataType(new ByteDataType(),
905+
DataTypeConflictHandler.DEFAULT_HANDLER);
891906
vars[1].setDataType(byteDT, SourceType.ANALYSIS);
892907
});
893908

@@ -1278,6 +1293,7 @@ public void testInvalidDataTypeSize() throws Exception {
12781293
// the following text (this is only a part of the status message, but is enough
12791294
// to verify the test):
12801295
assertTrue(dialog.getStatusText().contains("doesn't fit within"));
1296+
close(dialog);
12811297
}
12821298

12831299
//==================================================================================================

0 commit comments

Comments
 (0)