aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
diff options
context:
space:
mode:
authorJake Egan <Jake.Egan@ibm.com>2021-10-18 13:07:45 -0400
committerJake Egan <Jake.Egan@ibm.com>2021-10-18 13:08:22 -0400
commitd24e721debb074c68795c2b019cb51da690ab5f8 (patch)
treeebc537f64532fb7e16b5c7460eb7dc7615fc3f60 /llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
parent51788a5aff870a8e87ce34ffa6cecb46ce68f72e (diff)
downloadllvm-d24e721debb074c68795c2b019cb51da690ab5f8.zip
llvm-d24e721debb074c68795c2b019cb51da690ab5f8.tar.gz
llvm-d24e721debb074c68795c2b019cb51da690ab5f8.tar.bz2
[AIX] Disable tests failing due to lack of 64-bit XCOFF object file support
The following tests are failing because 64-bit XCOFF object files are not currently supported on AIX. This patch disables these tests on AIX for now. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D111887
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp155
1 files changed, 155 insertions, 0 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
index 9de6c83..c01a20e91 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -177,7 +177,11 @@ void checkDefaultPrologue(uint16_t Version, DwarfFormat Format,
EXPECT_STREQ(*Prologue.FileNames[0].Name.getAsCString(), "a file");
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_GetOrParseLineTableAtInvalidOffset) {
+#else
TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffset) {
+#endif
if (!setupGenerator())
return;
generate();
@@ -199,7 +203,12 @@ TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffset) {
"offset 0x00000001 is not a valid debug line section offset"));
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_GetOrParseLineTableAtInvalidOffsetAfterData) {
+#else
TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffsetAfterData) {
+#endif
if (!setupGenerator())
return;
@@ -220,7 +229,11 @@ TEST_F(DebugLineBasicFixture, GetOrParseLineTableAtInvalidOffsetAfterData) {
"offset 0x00000001 is not a valid debug line section offset"));
}
+#ifdef _AIX
+TEST_P(DebugLineParameterisedFixture, DISABLED_PrologueGetLength) {
+#else
TEST_P(DebugLineParameterisedFixture, PrologueGetLength) {
+#endif
if (!setupGenerator(Version))
return;
LineTable &LT = Gen->addLineTable(Format);
@@ -243,7 +256,11 @@ TEST_P(DebugLineParameterisedFixture, PrologueGetLength) {
EXPECT_EQ((*ExpectedLineTable)->Prologue.getLength(), ExpectedLength);
}
+#ifdef _AIX
+TEST_P(DebugLineParameterisedFixture, DISABLED_GetOrParseLineTableValidTable) {
+#else
TEST_P(DebugLineParameterisedFixture, GetOrParseLineTableValidTable) {
+#endif
if (!setupGenerator(Version))
return;
@@ -309,7 +326,11 @@ TEST_P(DebugLineParameterisedFixture, GetOrParseLineTableValidTable) {
// correctly.
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ErrorForReservedLength) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForReservedLength) {
+#endif
if (!setupGenerator())
return;
@@ -332,7 +353,12 @@ struct DebugLineUnsupportedVersionFixture : public TestWithParam<uint16_t>,
uint16_t Version;
};
+#ifdef _AIX
+TEST_P(DebugLineUnsupportedVersionFixture,
+ DISABLED_ErrorForUnsupportedVersion) {
+#else
TEST_P(DebugLineUnsupportedVersionFixture, ErrorForUnsupportedVersion) {
+#endif
if (!setupGenerator())
return;
@@ -354,7 +380,11 @@ INSTANTIATE_TEST_SUITE_P(UnsupportedVersionTestParams,
Values(/*1 below min */ 1, /* 1 above max */ 6,
/* Maximum possible */ 0xffff));
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ErrorForInvalidV5IncludeDirTable) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForInvalidV5IncludeDirTable) {
+#endif
if (!setupGenerator(5))
return;
@@ -395,7 +425,11 @@ TEST_F(DebugLineBasicFixture, ErrorForInvalidV5IncludeDirTable) {
"found"));
}
+#ifdef _AIX
+TEST_P(DebugLineParameterisedFixture, DISABLED_ErrorForTooLargePrologueLength) {
+#else
TEST_P(DebugLineParameterisedFixture, ErrorForTooLargePrologueLength) {
+#endif
if (!setupGenerator(Version))
return;
@@ -431,7 +465,11 @@ TEST_P(DebugLineParameterisedFixture, ErrorForTooLargePrologueLength) {
.str()));
}
+#ifdef _AIX
+TEST_P(DebugLineParameterisedFixture, DISABLED_ErrorForTooShortPrologueLength) {
+#else
TEST_P(DebugLineParameterisedFixture, ErrorForTooShortPrologueLength) {
+#endif
if (!setupGenerator(Version))
return;
@@ -485,7 +523,12 @@ INSTANTIATE_TEST_SUITE_P(
std::make_pair(4, DWARF64), // Test v4 fields and DWARF64.
std::make_pair(5, DWARF32), std::make_pair(5, DWARF64)));
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ErrorForExtendedOpcodeLengthSmallerThanExpected) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthSmallerThanExpected) {
+#endif
if (!setupGenerator())
return;
@@ -514,7 +557,12 @@ TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthSmallerThanExpected) {
EXPECT_EQ((*ExpectedLineTable)->Rows[1].Discriminator, DW_LNS_negate_stmt);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ErrorForExtendedOpcodeLengthLargerThanExpected) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthLargerThanExpected) {
+#endif
if (!setupGenerator())
return;
@@ -543,7 +591,11 @@ TEST_F(DebugLineBasicFixture, ErrorForExtendedOpcodeLengthLargerThanExpected) {
EXPECT_EQ((*ExpectedLineTable)->Rows[2].IsStmt, 1u);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ErrorForUnitLengthTooLarge) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForUnitLengthTooLarge) {
+#endif
if (!setupGenerator())
return;
@@ -572,7 +624,11 @@ TEST_F(DebugLineBasicFixture, ErrorForUnitLengthTooLarge) {
EXPECT_EQ((*ExpectedLineTable)->Sequences.size(), 1u);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ErrorForMismatchedAddressSize) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForMismatchedAddressSize) {
+#endif
if (!setupGenerator(4, 8))
return;
@@ -601,8 +657,13 @@ TEST_F(DebugLineBasicFixture, ErrorForMismatchedAddressSize) {
EXPECT_EQ((*ExpectedLineTable)->Rows[1].Address.Address, Addr2);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ErrorForMismatchedAddressSizeUnsetInitialAddress) {
+#else
TEST_F(DebugLineBasicFixture,
ErrorForMismatchedAddressSizeUnsetInitialAddress) {
+#endif
if (!setupGenerator(4, 0))
return;
@@ -628,8 +689,13 @@ TEST_F(DebugLineBasicFixture,
EXPECT_EQ((*ExpectedLineTable)->Rows[1].Address.Address, Addr2);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ErrorForUnsupportedAddressSizeInSetAddressLength) {
+#else
TEST_F(DebugLineBasicFixture,
ErrorForUnsupportedAddressSizeInSetAddressLength) {
+#endif
// Use DWARF v4, and 0 for data extractor address size so that the address
// size is derived from the opcode length.
if (!setupGenerator(4, 0))
@@ -661,7 +727,11 @@ TEST_F(DebugLineBasicFixture,
EXPECT_EQ((*ExpectedLineTable)->Rows[0].Address.Address, 0u);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ErrorForAddressSizeGreaterThanByteSize) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForAddressSizeGreaterThanByteSize) {
+#endif
// Use DWARF v4, and 0 for data extractor address size so that the address
// size is derived from the opcode length.
if (!setupGenerator(4, 0))
@@ -685,7 +755,12 @@ TEST_F(DebugLineBasicFixture, ErrorForAddressSizeGreaterThanByteSize) {
ASSERT_THAT_EXPECTED(ExpectedLineTable, Succeeded());
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ErrorForUnsupportedAddressSizeDefinedInHeader) {
+#else
TEST_F(DebugLineBasicFixture, ErrorForUnsupportedAddressSizeDefinedInHeader) {
+#endif
// Use 0 for data extractor address size so that it does not clash with the
// header address size.
if (!setupGenerator(5, 0))
@@ -722,7 +797,11 @@ TEST_F(DebugLineBasicFixture, ErrorForUnsupportedAddressSizeDefinedInHeader) {
EXPECT_EQ((*ExpectedLineTable)->Rows[0].Address.Address, 0u);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_CallbackUsedForUnterminatedSequence) {
+#else
TEST_F(DebugLineBasicFixture, CallbackUsedForUnterminatedSequence) {
+#endif
if (!setupGenerator())
return;
@@ -943,7 +1022,11 @@ struct MaxOpsPerInstFixture
uint8_t MaxOpsPerInst;
};
+#ifdef _AIX
+TEST_P(MaxOpsPerInstFixture, DISABLED_MaxOpsPerInstProblemsReportedCorrectly) {
+#else
TEST_P(MaxOpsPerInstFixture, MaxOpsPerInstProblemsReportedCorrectly) {
+#endif
runTest(/*CheckAdvancePC=*/true,
"but the prologue maximum_operations_per_instruction value is " +
Twine(unsigned(MaxOpsPerInst)) +
@@ -987,7 +1070,11 @@ struct LineRangeFixture : TestWithParam<std::tuple<uint8_t, bool>>,
uint8_t LineRange;
};
+#ifdef _AIX
+TEST_P(LineRangeFixture, DISABLED_LineRangeProblemsReportedCorrectly) {
+#else
TEST_P(LineRangeFixture, LineRangeProblemsReportedCorrectly) {
+#endif
runTest(/*CheckAdvancePC=*/false,
"but the prologue line_range value is 0. The address and line will "
"not be adjusted");
@@ -1022,7 +1109,11 @@ struct BadMinInstLenFixture : TestWithParam<std::tuple<uint8_t, bool>>,
uint8_t MinInstLength;
};
+#ifdef _AIX
+TEST_P(BadMinInstLenFixture, DISABLED_MinInstLengthProblemsReportedCorrectly) {
+#else
TEST_P(BadMinInstLenFixture, MinInstLengthProblemsReportedCorrectly) {
+#endif
runTest(/*CheckAdvancePC=*/true,
"but the prologue minimum_instruction_length value is 0, which "
"prevents any address advancing");
@@ -1033,7 +1124,11 @@ INSTANTIATE_TEST_SUITE_P(
Values(std::make_tuple(0, true), // Test zero value (error).
std::make_tuple(1, false))); // Test non-zero value (no error).
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ParserParsesCorrectly) {
+#else
TEST_F(DebugLineBasicFixture, ParserParsesCorrectly) {
+#endif
if (!setupGenerator())
return;
@@ -1060,7 +1155,11 @@ TEST_F(DebugLineBasicFixture, ParserParsesCorrectly) {
EXPECT_FALSE(Unrecoverable);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ParserSkipsCorrectly) {
+#else
TEST_F(DebugLineBasicFixture, ParserSkipsCorrectly) {
+#endif
if (!setupGenerator())
return;
@@ -1081,7 +1180,11 @@ TEST_F(DebugLineBasicFixture, ParserSkipsCorrectly) {
EXPECT_FALSE(Unrecoverable);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_ParserAlwaysDoneForEmptySection) {
+#else
TEST_F(DebugLineBasicFixture, ParserAlwaysDoneForEmptySection) {
+#endif
if (!setupGenerator())
return;
@@ -1091,7 +1194,12 @@ TEST_F(DebugLineBasicFixture, ParserAlwaysDoneForEmptySection) {
EXPECT_TRUE(Parser.done());
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ParserMarkedAsDoneForBadLengthWhenParsing) {
+#else
TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenParsing) {
+#endif
if (!setupGenerator())
return;
@@ -1114,7 +1222,12 @@ TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenParsing) {
"reserved unit length of value 0xfffffff0"));
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ParserMarkedAsDoneForBadLengthWhenSkipping) {
+#else
TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenSkipping) {
+#endif
if (!setupGenerator())
return;
@@ -1137,7 +1250,12 @@ TEST_F(DebugLineBasicFixture, ParserMarkedAsDoneForBadLengthWhenSkipping) {
"reserved unit length of value 0xfffffff0"));
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ParserReportsFirstErrorInEachTableWhenParsing) {
+#else
TEST_F(DebugLineBasicFixture, ParserReportsFirstErrorInEachTableWhenParsing) {
+#endif
if (!setupGenerator())
return;
@@ -1163,7 +1281,12 @@ TEST_F(DebugLineBasicFixture, ParserReportsFirstErrorInEachTableWhenParsing) {
"unsupported version 1"));
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ParserReportsNonPrologueProblemsWhenParsing) {
+#else
TEST_F(DebugLineBasicFixture, ParserReportsNonPrologueProblemsWhenParsing) {
+#endif
if (!setupGenerator())
return;
@@ -1195,8 +1318,13 @@ TEST_F(DebugLineBasicFixture, ParserReportsNonPrologueProblemsWhenParsing) {
EXPECT_FALSE(Unrecoverable);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ParserReportsPrologueErrorsInEachTableWhenSkipping) {
+#else
TEST_F(DebugLineBasicFixture,
ParserReportsPrologueErrorsInEachTableWhenSkipping) {
+#endif
if (!setupGenerator())
return;
@@ -1222,7 +1350,12 @@ TEST_F(DebugLineBasicFixture,
"unsupported version 1"));
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture,
+ DISABLED_ParserIgnoresNonPrologueErrorsWhenSkipping) {
+#else
TEST_F(DebugLineBasicFixture, ParserIgnoresNonPrologueErrorsWhenSkipping) {
+#endif
if (!setupGenerator())
return;
@@ -1238,7 +1371,11 @@ TEST_F(DebugLineBasicFixture, ParserIgnoresNonPrologueErrorsWhenSkipping) {
EXPECT_FALSE(Unrecoverable);
}
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_VerboseOutput) {
+#else
TEST_F(DebugLineBasicFixture, VerboseOutput) {
+#endif
if (!setupGenerator(5))
return;
@@ -1394,7 +1531,11 @@ struct TruncatedPrologueFixture
StringRef ExpectedErr;
};
+#ifdef _AIX
+TEST_P(TruncatedPrologueFixture, DISABLED_ErrorForTruncatedPrologue) {
+#else
TEST_P(TruncatedPrologueFixture, ErrorForTruncatedPrologue) {
+#endif
if (!setupGenerator(Version))
return;
@@ -1571,7 +1712,12 @@ struct TruncatedExtendedOpcodeFixture
uint64_t OpcodeLength;
};
+#ifdef _AIX
+TEST_P(TruncatedExtendedOpcodeFixture,
+ DISABLED_ErrorForTruncatedExtendedOpcode) {
+#else
TEST_P(TruncatedExtendedOpcodeFixture, ErrorForTruncatedExtendedOpcode) {
+#endif
if (!setupGenerator())
return;
LineTable &LT = setupTable();
@@ -1650,7 +1796,12 @@ INSTANTIATE_TEST_SUITE_P(
"unexpected end of data at offset 0x35 while reading [0x32, "
"0x36)")));
+#ifdef _AIX
+TEST_P(TruncatedStandardOpcodeFixture,
+ DISABLED_ErrorForTruncatedStandardOpcode) {
+#else
TEST_P(TruncatedStandardOpcodeFixture, ErrorForTruncatedStandardOpcode) {
+#endif
if (!setupGenerator())
return;
LineTable &LT = setupTable();
@@ -1706,7 +1857,11 @@ INSTANTIATE_TEST_SUITE_P(
"unable to decode LEB128 at offset 0x00000032: "
"malformed uleb128, extends past end")));
+#ifdef _AIX
+TEST_F(DebugLineBasicFixture, DISABLED_PrintPathsProperly) {
+#else
TEST_F(DebugLineBasicFixture, PrintPathsProperly) {
+#endif
if (!setupGenerator(5))
return;