[llvm] fbf52ca - [AIX] Disable tests that fail because of no 64-bit XCOFF object file support

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 9 09:26:53 PST 2022


Author: Jake Egan
Date: 2022-01-09T12:25:24-05:00
New Revision: fbf52caf58b3270c84e1cd3f399345272cca09a1

URL: https://github.com/llvm/llvm-project/commit/fbf52caf58b3270c84e1cd3f399345272cca09a1
DIFF: https://github.com/llvm/llvm-project/commit/fbf52caf58b3270c84e1cd3f399345272cca09a1.diff

LOG: [AIX] Disable tests that fail because of no 64-bit XCOFF object file support

The modified tests fail because 64-bit XCOFF object files are not currently supported on AIX. This patch disables these tests on 64-bit AIX for now.

This patch is similar to D111887 except the failures on this patch are on a 64-bit build.

Reviewed By: shchenz, #powerpc

Differential Revision: https://reviews.llvm.org/D113049

Added: 
    

Modified: 
    clang/test/ASTMerge/codegen-body/test.c
    clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
    clang/test/ClangScanDeps/resource_directory.c
    clang/test/lit.cfg.py
    llvm/test/LTO/X86/remangle_intrinsics.ll
    llvm/test/lit.cfg.py
    llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/ASTMerge/codegen-body/test.c b/clang/test/ASTMerge/codegen-body/test.c
index 7232bf4164b58..fc5553facbd95 100644
--- a/clang/test/ASTMerge/codegen-body/test.c
+++ b/clang/test/ASTMerge/codegen-body/test.c
@@ -1,5 +1,5 @@
+// UNSUPPORTED: powerpc64-ibm-aix
 // RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/body1.c
 // RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/body2.c
 // RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s
 // expected-no-diagnostics
-

diff  --git a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
index cecc76840e1d5..e8a067a974d81 100644
--- a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
+++ b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
@@ -1,3 +1,4 @@
+// UNSUPPORTED: powerpc64-ibm-aix
 // RUN: rm -rf %t.dir
 // RUN: rm -rf %t.cdb
 // RUN: mkdir -p %t.dir

diff  --git a/clang/test/ClangScanDeps/resource_directory.c b/clang/test/ClangScanDeps/resource_directory.c
index 55d5d90bbcdea..b9e9d219541ba 100644
--- a/clang/test/ClangScanDeps/resource_directory.c
+++ b/clang/test/ClangScanDeps/resource_directory.c
@@ -1,3 +1,4 @@
+// UNSUPPORTED: powerpc64-ibm-aix
 // REQUIRES: shell
 
 // RUN: rm -rf %t && mkdir %t

diff  --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py
index a1a3bf6ee626d..a8efe6c593e98 100644
--- a/clang/test/lit.cfg.py
+++ b/clang/test/lit.cfg.py
@@ -243,3 +243,24 @@ def calculate_arch_features(arch_string):
 # Add a vendor-specific feature.
 if config.clang_vendor_uti:
     config.available_features.add('clang-vendor=' + config.clang_vendor_uti)
+
+def exclude_unsupported_files_for_aix(dirname):
+    for filename in os.listdir(dirname):
+        source_path = os.path.join( dirname, filename)
+        if os.path.isdir(source_path):
+            continue
+        f = open(source_path, 'r', encoding='ISO-8859-1')
+        try:
+           data = f.read()
+           # 64-bit object files are not supported on AIX, so exclude the tests.
+           if (any(option in data for option in ('-emit-obj', '-fmodule-format=obj', '-fintegrated-as')) and
+              '64' in config.target_triple):
+               config.excludes += [ filename ]
+        finally:
+           f.close()
+
+if 'aix' in config.target_triple:
+    for directory in ('/CodeGenCXX', '/Misc', '/Modules', '/PCH', '/Driver',
+                      '/ASTMerge/anonymous-fields', '/ASTMerge/injected-class-name-decl'):
+        exclude_unsupported_files_for_aix(config.test_source_root + directory)
+

diff  --git a/llvm/test/LTO/X86/remangle_intrinsics.ll b/llvm/test/LTO/X86/remangle_intrinsics.ll
index 112cace0403b9..523e78e5d30d9 100644
--- a/llvm/test/LTO/X86/remangle_intrinsics.ll
+++ b/llvm/test/LTO/X86/remangle_intrinsics.ll
@@ -1,3 +1,4 @@
+; UNSUPPORTED: powerpc64-ibm-aix
 ; RUN: llvm-as < %s > %t1
 ; RUN: llvm-as < %p/Inputs/remangle_intrinsics.ll > %t2
 ; RUN: llvm-lto %t1 %t2 | FileCheck %s

diff  --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 0753b0483ef9c..9b80726df5c4a 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -405,3 +405,22 @@ def have_ld64_plugin_support():
 
 if "MemoryWithOrigins" in config.llvm_use_sanitizer:
     config.available_features.add('use_msan_with_origins')
+
+def exclude_unsupported_files_for_aix(dirname):
+   for filename in os.listdir(dirname):
+       source_path = os.path.join( dirname, filename)
+       if os.path.isdir(source_path):
+           continue
+       f = open(source_path, 'r')
+       try:
+          data = f.read()
+          # 64-bit object files are not supported on AIX, so exclude the tests.
+          if ('-emit-obj' in data or '-filetype=obj' in data) and '64' in config.target_triple:
+            config.excludes += [ filename ]
+       finally:
+          f.close()
+
+if 'aix' in config.target_triple:
+    for directory in ('/CodeGen/X86', '/DebugInfo', '/DebugInfo/X86', '/DebugInfo/Generic', '/LTO/X86', '/Linker'):
+        exclude_unsupported_files_for_aix(config.test_source_root + directory)
+

diff  --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
index ddd057aa11210..386ef4e4383bd 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -1131,7 +1131,11 @@ TEST(DWARFDebugInfo, TestStringOffsets) {
   EXPECT_STREQ(String1, *Extracted3);
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestEmptyStringOffsets) {
+#else
 TEST(DWARFDebugInfo, TestEmptyStringOffsets) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();
@@ -1160,7 +1164,11 @@ TEST(DWARFDebugInfo, TestEmptyStringOffsets) {
       DwarfContext->getDWARFObj().getStrOffsetsSection().Data.empty());
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestRelations) {
+#else
 TEST(DWARFDebugInfo, TestRelations) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();
@@ -1347,7 +1355,11 @@ TEST(DWARFDebugInfo, TestDWARFDie) {
   EXPECT_FALSE(DefaultDie.getSibling().isValid());
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestChildIterators) {
+#else
 TEST(DWARFDebugInfo, TestChildIterators) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();
@@ -1456,7 +1468,11 @@ TEST(DWARFDebugInfo, TestEmptyChildren) {
   EXPECT_EQ(CUDie.begin(), CUDie.end());
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestAttributeIterators) {
+#else
 TEST(DWARFDebugInfo, TestAttributeIterators) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();
@@ -1518,7 +1534,11 @@ TEST(DWARFDebugInfo, TestAttributeIterators) {
   EXPECT_EQ(E, ++I);
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestFindRecurse) {
+#else
 TEST(DWARFDebugInfo, TestFindRecurse) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();
@@ -1732,7 +1752,11 @@ TEST(DWARFDebugInfo, TestDwarfToFunctions) {
   // Test
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestFindAttrs) {
+#else
 TEST(DWARFDebugInfo, TestFindAttrs) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();
@@ -1795,7 +1819,11 @@ TEST(DWARFDebugInfo, TestFindAttrs) {
   EXPECT_EQ(DieMangled, toString(NameOpt, ""));
 }
 
+#if defined(_AIX) && defined(__64BIT__)
+TEST(DWARFDebugInfo, DISABLED_TestImplicitConstAbbrevs) {
+#else
 TEST(DWARFDebugInfo, TestImplicitConstAbbrevs) {
+#endif
   Triple Triple = getNormalizedDefaultTargetTriple();
   if (!isConfigurationSupported(Triple))
     GTEST_SKIP();


        


More information about the llvm-commits mailing list