Test changes for MicrosoftDmang

This commit is contained in:
ghidra1 2021-03-19 17:48:48 -04:00
parent 2fcde3a802
commit b19ddc60bd
5 changed files with 25 additions and 29 deletions

View file

@ -48,10 +48,6 @@ test {
if (rootProject.ext.parallelMode) {
exclude "*"
} else {
includes = ['**/MDMangBaseTestSuite.class', '**/MDMangExtraTests.class']
includes = ['**/MDMangBaseWorkingTests.class', '**/MDMangExtraTest.class']
}
}
integrationTest {
scanForTestClasses = false
excludes = ['**/*']
}

View file

@ -2564,7 +2564,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
// It also seems to indicate that the "int" portion would be the referred-to type and the rest of the function spec would be part of the the function info.
// Other information at one time, led me to believe that the return type of a function is special... need to rekinkdle those thoughts, but think related to nested
// functions, such as function returning a function pointer..
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testCVModifiersBased5_Variation_aj() throws Exception {
mangled = "?Var@@3P_CClass@@D5AHD@ZEP0";
@ -2722,7 +2722,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testCVModifiersBased5_Variation_be() throws Exception {
mangled = "?Var@@3P_CClass@@D5AHD@ZEP0";
@ -7856,7 +7856,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testManagedProperties_And_DollarDollar_Debug_In_Progress_av() throws Exception {
//hand-made $$A ($$A works for functions: 6, 7, 8, 9; but nothing yet for non-function modifiers)
@ -8491,7 +8491,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testManagedProperties_CliArray_QuestionModifier() throws Exception {
mangled = "?var@@3?E$2AAHA";
@ -8881,7 +8881,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
// is still under construction. The MDArrayReferenceType (Y (Y01)) is only to be found in the MDmodifierType.
// Note that the EFGHI and ABCD... MDCVMod processing both can be found for $$C (e.g., we could have
// "?var@@3$$CEBHA" as a valid symbol). I just added the test for this above (should pass with the current code).
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testDataReferenceType_withArrayFail() throws Exception {
mangled = "?var@@3$$CBY01HA";
@ -9622,7 +9622,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testManagedProperties_And_DollarDollar_Debug_In_Progress_moremoremore2_variation030()
throws Exception {
@ -9642,7 +9642,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
}
//TODO: CREATE mstruth output (dispatcher)
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testManagedProperties_And_DollarDollar_Debug_In_Progress_moremoremore2_variation032()
throws Exception {
@ -9655,7 +9655,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
}
//TODO: CREATE mstruth output (dispatcher)
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testManagedProperties_And_DollarDollar_Debug_In_Progress_moremoremore2_variation033()
throws Exception {
@ -9748,7 +9748,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testManagedProperties_And_DollarDollar_Debug_In_Progress_moremoremore2_variation042()
throws Exception {
@ -11162,7 +11162,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void test_e304() throws Exception {
mangled =
@ -11282,7 +11282,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
}
// chars 0-37
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testGDTSD304_a_breakdown_analysis_011() throws Exception {
mangled = "?__abi_name0?$name1@P$AAVname2@name3@@";
@ -11414,7 +11414,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testGDTSD304_SysSet_h_mod4() throws Exception {
mangled = "?name0@?Qname1@name2@@?Qname3@name4@@name5@@3HA";
@ -11425,7 +11425,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
}
//TODO: CREATE mstruth output (dispatcher)
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testGDTSD304_SysSet_h_mod5() throws Exception {
mangled = "?name0@?Qname1@?Qname2@name3@@@name4@@3HA"; //Nested "?Q"
@ -11445,7 +11445,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
demangleAndTest();
}
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testWin10_1015829() throws Exception { //was: testWin10_001
mangled =
@ -11511,7 +11511,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
//NOTE: This test is failing (we fail to fail) because we allow $template to be parsed as fragment and don't error when the symbol
// is truncated (no typeinfo).
//Test showing that we cannot have MDTemplateNameAndArgumentsList after CodeView
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testCodeView_Simple_01test() throws Exception {
mangled = "?@?$template@H";
@ -11617,7 +11617,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
//Seems like a pattern where they truncate the symbol and append a 32-character (128-bit) hash code on the end instead. Not sure what/how we
// should deal with this (and potentially others--this came from Windows 7): give partial results? By running with parse info output, we can
// see that it is a series of nested templates to start, which cuts off during a deep nesting.
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testUnknown3() throws Exception {
mangled =
@ -13773,7 +13773,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
//20170522 BEST GUESS (see MDQualification): Get some sort of result if we replace "?CimDisableDedupVolume" with "CimDisableDedupVolume@" in two places.
// Perhaps "?C" means literal string, up to, but not including the next invalid char in the sequence (so a missing '@' can be tolerated)
// --so would also need to strip the 'C' in the results.
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testWin10_0358058() throws Exception {
mangled =
@ -13903,7 +13903,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
}
//MSFT problem
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testWin10_0356843() throws Exception {
mangled =
@ -13984,7 +13984,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
//Note, however, that the test is still not processed correctly for mdtruth, which
// is only a guess. A fix to process it (an MDMANG SPECIALIZATION used in MDQual)
// causes a different test to fail: testWin10_0022127(). TODO: figure this out.
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testWin10_6798753() throws Exception {
mangled =
@ -14032,7 +14032,7 @@ public class MDMangBaseTest extends AbstractGenericTest {
}
//I haven't determined what the true output should be yet.
@Category(MDMangFailingTests.class)
@Category(MDMangFailingTestCategory.class)
@Test
public void testWin10_6798753_breakdown5() throws Exception {
mangled = "?$vector@UVolumeWarning@?BL@?CimStartDedupJob@@";

View file

@ -21,7 +21,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Categories.class)
@ExcludeCategory(MDMangFailingTests.class)
@ExcludeCategory(MDMangFailingTestCategory.class)
@SuiteClasses(MDMangBaseTest.class)
/**
* This test suite has the purpose of driving the tests in MDMangBaseTest and
@ -33,6 +33,6 @@ import org.junit.runners.Suite.SuiteClasses;
* during nightly or continuous testing. The MDMangBaseTest class is not located
* in a folder that will be seen by these tests.
*/
public class MDMangBaseTestSuite {
public class MDMangBaseWorkingTests {
// Purposefully empty.
}

View file

@ -26,7 +26,7 @@ import ghidra.app.util.demangler.DemangledObject;
* This class performs extra demangler testing for special cases that do not fit
* the testing pattern found in MDMangBaseTest and its derived test classes.
*/
public class MDMangExtraTests extends AbstractGenericTest {
public class MDMangExtraTest extends AbstractGenericTest {
@Test
//This test checks that we can provide a mangled string for a function namespace.

View file

@ -20,6 +20,6 @@ package mdemangler;
* interface described here is the name I decided to call the failing tests
* in MDMangBaseTest and used by MDMangBaseTestSuite to exclude failing tests.
*/
public interface MDMangFailingTests {
public interface MDMangFailingTestCategory {
// Purposefully empty.
}