[llvm] f9e0bc3 - Specify --format for tests to workaround AIX big archive write operation

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 11:36:45 PDT 2022


Author: Jake Egan
Date: 2022-04-05T14:36:38-04:00
New Revision: f9e0bc37dbf74226d79b6b1a9ab30e599b2a1a53

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

LOG: Specify --format for tests to workaround AIX big archive write operation

D122746 missed the following tests, so this patch adds them.

This patch refactors D122949, which marked the following tests XFAIL, but it makes more sense to temporarily add `--format=gnu` option because these tests aren’t testing `llvm-ar` and AIX won’t lose their coverage.

Reviewed By: jhenderson, MaskRay, DiggerLin

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

Added: 
    

Modified: 
    llvm/test/tools/llvm-link/archive.ll
    llvm/test/tools/llvm-lipo/create-archive-input.test
    llvm/test/tools/llvm-objcopy/MachO/universal-object.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-link/archive.ll b/llvm/test/tools/llvm-link/archive.ll
index 44c9408dc81f3..eb78cc1ee6b73 100644
--- a/llvm/test/tools/llvm-link/archive.ll
+++ b/llvm/test/tools/llvm-link/archive.ll
@@ -1,9 +1,7 @@
-# XFAIL: system-aix
-
 # RUN: llvm-as %S/Inputs/f.ll -o %t.f.bc
 # RUN: llvm-as %S/Inputs/g.ll -o %t.g.bc
-# RUN: llvm-ar cr %t.fg.a %t.f.bc %t.g.bc
-# RUN: llvm-ar cr %t.empty.lib
+# RUN: llvm-ar cr --format=gnu %t.fg.a %t.f.bc %t.g.bc
+# RUN: llvm-ar cr --format=gnu  %t.empty.lib
 # RUN: llvm-link %S/Inputs/h.ll %t.fg.a %t.empty.lib -o %t.linked.bc
 
 # RUN: llvm-nm %t.linked.bc | FileCheck %s

diff  --git a/llvm/test/tools/llvm-lipo/create-archive-input.test b/llvm/test/tools/llvm-lipo/create-archive-input.test
index 6fe6a1696b1bf..cc3812fed40b1 100644
--- a/llvm/test/tools/llvm-lipo/create-archive-input.test
+++ b/llvm/test/tools/llvm-lipo/create-archive-input.test
@@ -1,21 +1,19 @@
-# XFAIL: system-aix
-
 # RUN: yaml2obj %p/Inputs/i386-slice.yaml -o %t-i386.o
 # RUN: yaml2obj %p/Inputs/x86_64-slice.yaml -o %t-x86_64.o
 # RUN: yaml2obj %p/Inputs/i386-x86_64-universal.yaml -o %t-universal.o
 # RUN: llvm-as %p/Inputs/armv7-ios.ll -o %t-ir-armv7.o
 # RUN: llvm-as %p/Inputs/x64-osx.ll -o %t-ir-x86_64.o
 
-# RUN: llvm-ar cr %t.empty.a
+# RUN: llvm-ar --format=gnu cr %t.empty.a
 # RUN: not llvm-lipo %t.empty.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=EMPTY-ARCHIVE %s
 
-# RUN: llvm-ar cr %t.
diff erent_architectures.a %t-i386.o %t-x86_64.o
+# RUN: llvm-ar --format=gnu cr %t.
diff erent_architectures.a %t-i386.o %t-x86_64.o
 # RUN: not llvm-lipo %t.
diff erent_architectures.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-DIFFERENT-ARCHS %s
 
-# RUN: llvm-ar cr %t.contains_fat_binary.a %t-universal.o 
+# RUN: llvm-ar --format=gnu cr %t.contains_fat_binary.a %t-universal.o 
 # RUN: not llvm-lipo %t.contains_fat_binary.a -create -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-FAT-BINARY %s
 
-# RUN: llvm-ar cr %t-i386-lib.a %t-i386.o
+# RUN: llvm-ar --format=gnu cr %t-i386-lib.a %t-i386.o
 # RUN: llvm-lipo %t-i386-lib.a %t-x86_64.o -create -output %t-i386-x86_64-universal.o
 # RUN: llvm-lipo %t-i386-x86_64-universal.o -info | FileCheck --check-prefix=INFO-i386-x86_64 %s
 # RUN: llvm-lipo %t-i386-x86_64-universal.o -thin i386 -output %t-extracted-i386-lib.a
@@ -23,18 +21,18 @@
 # RUN: llvm-lipo %t-i386-x86_64-universal.o -thin x86_64 -output %t-extracted-x86_64.o
 # RUN: cmp %t-extracted-x86_64.o %t-x86_64.o
 
-# RUN: llvm-ar cr %t-ir-armv7-lib.a %t-ir-armv7.o
+# RUN: llvm-ar --format=gnu cr %t-ir-armv7-lib.a %t-ir-armv7.o
 # RUN: llvm-lipo %t-ir-armv7-lib.a %t-ir-x86_64.o -create -output %t-ir-armv7-x86_64-universal.o
 # RUN: llvm-lipo %t-ir-armv7-x86_64-universal.o -thin armv7 -output %t-ir-extracted-armv7-lib.a
 # RUN: cmp %t-ir-extracted-armv7-lib.a %t-ir-armv7-lib.a
 # RUN: llvm-lipo %t-ir-armv7-x86_64-universal.o -thin x86_64 -output %t-ir-extracted-x86_64.o
 # RUN: cmp %t-ir-extracted-x86_64.o %t-ir-x86_64.o
 
-# RUN: llvm-ar cr %t.
diff erent_types0.a %t-i386.o %t-ir-x86_64.o
+# RUN: llvm-ar --format=gnu cr %t.
diff erent_types0.a %t-i386.o %t-ir-x86_64.o
 # RUN: not llvm-lipo -create %t.
diff erent_types0.a -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-MACHO-AND-IR %s
-# RUN: llvm-ar cr %t.
diff erent_types1.a %t-ir-x86_64.o %t-i386.o 
+# RUN: llvm-ar --format=gnu cr %t.
diff erent_types1.a %t-ir-x86_64.o %t-i386.o 
 # RUN: not llvm-lipo -create %t.
diff erent_types1.a -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-IR-AND-MACHO %s
-# RUN: llvm-ar cr %t.
diff erent_architectures_ir.a %t-ir-x86_64.o %t-ir-armv7.o
+# RUN: llvm-ar --format=gnu cr %t.
diff erent_architectures_ir.a %t-ir-x86_64.o %t-ir-armv7.o
 # RUN: not llvm-lipo -create %t.
diff erent_architectures_ir.a -output /dev/null 2>&1 | FileCheck --check-prefix=ARCHIVE-WITH-DIFFERENT-ARCHS %s
 
 # EMPTY-ARCHIVE: empty archive

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/universal-object.test b/llvm/test/tools/llvm-objcopy/MachO/universal-object.test
index 984cceea8886e..d9cdf785bc5d3 100644
--- a/llvm/test/tools/llvm-objcopy/MachO/universal-object.test
+++ b/llvm/test/tools/llvm-objcopy/MachO/universal-object.test
@@ -1,4 +1,3 @@
-# XFAIL: system-aix
 # This test verifies that llvm-objcopy copies a univeral Mach-O object file properly.
 
 # RUN: yaml2obj %p/Inputs/i386.yaml -o %t.i386
@@ -15,7 +14,7 @@
 
 ## Case 2: copy a universal object file containing an archive.
 # RUN: rm -f %t.archive.i386
-# RUN: llvm-ar cr %t.archive.i386 %t.i386
+# RUN: llvm-ar --format=gnu cr %t.archive.i386 %t.i386
 # RUN: llvm-lipo %t.archive.i386 %t.x86_64 -create -output %t.universal.containing.archive
 # RUN: llvm-objcopy %t.universal.containing.archive %t.universal.containing.archive.copy
 # RUN: llvm-lipo %t.universal.containing.archive.copy -archs | FileCheck --check-prefix=VERIFY_ARCHS %s
@@ -25,7 +24,7 @@
 # RUN: cmp %t.x86_64 %t.archive.x86_64.copy
 
 ## Case 3: copy an archive containing a universal object.
-# RUN: llvm-ar cr %t.archive.containing.universal %t.universal
+# RUN: llvm-ar --format=gnu cr %t.archive.containing.universal %t.universal
 # RUN: llvm-objcopy %t.archive.containing.universal %t.archive.containing.universal.copy
 
 ## Case 4: try to copy a universal object file contaning a bitcode slice.
@@ -35,7 +34,7 @@
 # RUN:  | FileCheck --check-prefix=UNSUPPORTED_UNIVERSAL_OBJECT %s
 
 ## Case 5: try to copy an archive containing an unsupported universal object.
-# RUN: llvm-ar cr %t.archive.universal.bitcode %t.universal.containing.bitcode
+# RUN: llvm-ar --format=gnu cr %t.archive.universal.bitcode %t.universal.containing.bitcode
 # RUN: not llvm-objcopy %t.archive.universal.bitcode %t.archive.universal.bitcode.copy 2>&1 \
 # RUN:  | FileCheck --check-prefix=UNSUPPORTED_UNIVERSAL_OBJECT %s
 


        


More information about the llvm-commits mailing list