[llvm] d858447 - [llvm-debuginfo-analyzer] (08/09) - ELF Reader
Carlos Alberto Enciso via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 02:01:40 PDT 2022
Author: Carlos Alberto Enciso
Date: 2022-10-27T10:01:04+01:00
New Revision: d858447584a0dc41ecdee7c92bb5e8b7f52e3ff0
URL: https://github.com/llvm/llvm-project/commit/d858447584a0dc41ecdee7c92bb5e8b7f52e3ff0
DIFF: https://github.com/llvm/llvm-project/commit/d858447584a0dc41ecdee7c92bb5e8b7f52e3ff0.diff
LOG: [llvm-debuginfo-analyzer] (08/09) - ELF Reader
The unitest and test cases are platform dependent (x86_64)
causing failures in:
https://lab.llvm.org/buildbot/#/builders/245/builds/146
https://lab.llvm.org/buildbot/#/builders/188/builds/21397
No available targets are compatible with triple "x86_64-unknown-unknown".
Added:
- ';REQUIRES: x86-registered-target' to the LIT tests.
- Code to check if the target 'Triple::x86_64' is supported to
the unittest case.
Added:
Modified:
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-compare-logical-elements.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/04-dwarf-missing-nested-enumerators.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-ignored-DW_FORM_implicit_const.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-incorrect-function-compare.test
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-compare-logical-elements.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-compare-logical-elements.test
index 532d11054a8a..a076887140c2 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-compare-logical-elements.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-compare-logical-elements.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 1 - General options
; test.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
index 9b38a527e8a5..54dbd7466e4f 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-print-basic-details.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 1 - General options.
; test.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
index 55584b89fec4..cb98176d8185 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 1 - General options
; test.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
index e925ad7c4b07..62eaf593a16c 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/02-dwarf-logical-lines.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 2 - Assembler instructions.
; hello-world.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
index 0abacc0ccae2..f252a9a046f0 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/03-dwarf-incorrect-lexical-scope-typedef.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 3 - Incorrect lexical scope for typedef.
; pr-44884.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/04-dwarf-missing-nested-enumerators.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/04-dwarf-missing-nested-enumerators.test
index e86035c9e771..dca1ff3326cc 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/04-dwarf-missing-nested-enumerators.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/04-dwarf-missing-nested-enumerators.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 4 - Missing nested enumerations.
; pr-46466.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
index 372a8ac8de8b..5453a46fb542 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/05-dwarf-incorrect-lexical-scope-variable.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 5 - Incorrect lexical scope variable.
; pr-43860.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
index 089726fab02f..e83592afd2ff 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/06-dwarf-full-logical-view.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Test case 6 - Full logical view
; test.cpp
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-ignored-DW_FORM_implicit_const.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-ignored-DW_FORM_implicit_const.test
index 78e9670241a3..7ee9f3118d0a 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-ignored-DW_FORM_implicit_const.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-ignored-DW_FORM_implicit_const.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Ignored attributes with DW_FORM_implicit_const.
; https://github.com/llvm/llvm-project/issues/57040
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-incorrect-function-compare.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-incorrect-function-compare.test
index 4d7aba1d0055..46fbc703f7de 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-incorrect-function-compare.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-57040-incorrect-function-compare.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; Incorrect function matching during comparison.
; https://github.com/llvm/llvm-project/issues/57040
diff --git a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
index 083068be784b..a99eae2aa293 100644
--- a/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
+++ b/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/pr-incorrect-logical-instructions.test
@@ -1,3 +1,5 @@
+; REQUIRES: x86-registered-target
+
; * Added incorrect logical instructions for: --print=lines,instructions
; 'bar' and 'foo' showing extra instruction from compiler generated functions:
; '_cxx_global_var_init' and '_GLOBAL_sub_l_suite_lexical_01.cpp'
diff --git a/llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp b/llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp
index e494e03cf2ed..1c973659033b 100644
--- a/llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp
@@ -12,6 +12,7 @@
#include "llvm/DebugInfo/LogicalView/Core/LVSymbol.h"
#include "llvm/DebugInfo/LogicalView/Core/LVType.h"
#include "llvm/DebugInfo/LogicalView/LVReaderHandler.h"
+#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/COM.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/ScopedPrinter.h"
@@ -331,6 +332,16 @@ TEST(LogicalViewTest, ELFReader) {
SmallString<128> InputsDir = unittest::getInputFileDirectory(TestMainArgv0);
+ // This test requires a x86-registered-target
+ Triple TT;
+ TT.setArch(Triple::x86_64);
+ TT.setVendor(Triple::UnknownVendor);
+ TT.setOS(Triple::UnknownOS);
+
+ std::string TargetLookupError;
+ if (!TargetRegistry::lookupTarget(std::string(TT.str()), TargetLookupError))
+ return;
+
// Logical elements general properties and selection.
elementProperties(InputsDir);
elementSelection(InputsDir);
More information about the llvm-commits
mailing list