[lld-macho][nfc] Clean up tests
authorJez Ng <jezng@fb.com>
Mon, 10 May 2021 02:09:17 +0000 (22:09 -0400)
committerJez Ng <jezng@fb.com>
Mon, 10 May 2021 19:45:54 +0000 (15:45 -0400)
* Remove unnecessary `rm -rf %t`s
* Have lc-linker-option.ll use the right comment marker

lld/test/MachO/U-dynamic-lookup.s
lld/test/MachO/adhoc-codesign.s
lld/test/MachO/dependency-info.s
lld/test/MachO/flat-namespace.s
lld/test/MachO/invalid/undefined-symbol.s
lld/test/MachO/lc-linker-option.ll
lld/test/MachO/sub-library.s
lld/test/MachO/t.s
lld/test/MachO/u.s
lld/test/MachO/why-load.s

index 2f867f8..b0b4f77 100644 (file)
@@ -1,5 +1,4 @@
 # REQUIRES: x86
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s
index d9817b7..1795035 100644 (file)
@@ -1,6 +1,5 @@
 # REQUIRES: x86, aarch64
 
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-macos -o %t/main-arm64-macos.o %t/main.s
index fe7c33a..57b0b88 100644 (file)
@@ -1,6 +1,4 @@
 # REQUIRES: x86
-#
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s
index 79d575c..dea8536 100644 (file)
@@ -1,5 +1,4 @@
 # REQUIRES: x86
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s
index dd6fa17..b2f5eee 100644 (file)
@@ -1,5 +1,4 @@
 # REQUIRES: x86
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o
index fae023b..5906f90 100644 (file)
@@ -1,33 +1,32 @@
-# REQUIRES: x86
-# RUN: rm -rf %t
-# RUN: rm -rf %t; split-file %s %t
-
-# RUN: llvm-as %t/framework.ll -o %t/framework.o
-# RUN: %lld %t/framework.o -o %t/frame
-# RUN: llvm-objdump --macho --all-headers %t/frame | FileCheck --check-prefix=FRAME %s \
-# RUN:  --implicit-check-not LC_LOAD_DYLIB
-# FRAME:          cmd LC_LOAD_DYLIB
-# FRAME-NEXT: cmdsize
-# FRAME-NEXT:    name /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
-
-# RUN: llvm-as %t/l.ll -o %t/l.o
-# RUN: %lld %t/l.o -o %t/l
-# RUN: llvm-objdump --macho --all-headers %t/l | FileCheck --check-prefix=LIB %s \
-# RUN:  --implicit-check-not LC_LOAD_DYLIB
-
-## Check that we don't create duplicate LC_LOAD_DYLIBs.
-# RUN: %lld -lSystem %t/l.o -o %t/l
-# RUN: llvm-objdump --macho --all-headers %t/l | FileCheck --check-prefix=LIB %s \
-# RUN:  --implicit-check-not LC_LOAD_DYLIB
-# LIB:          cmd LC_LOAD_DYLIB
-# LIB-NEXT: cmdsize
-# LIB-NEXT:    name /usr/lib/libSystem.dylib
-
-# RUN: llvm-as %t/invalid.ll -o %t/invalid.o
-# RUN: not %lld %t/invalid.o -o /dev/null 2>&1 | FileCheck --check-prefix=INVALID %s
-# INVALID: error: -why_load is not allowed in LC_LINKER_OPTION
-
-#--- framework.ll
+; REQUIRES: x86
+; RUN: rm -rf %t; split-file %s %t
+;
+; RUN: llvm-as %t/framework.ll -o %t/framework.o
+; RUN: %lld %t/framework.o -o %t/frame
+; RUN: llvm-objdump --macho --all-headers %t/frame | FileCheck --check-prefix=FRAME %s \
+; RUN:  --implicit-check-not LC_LOAD_DYLIB
+; FRAME:          cmd LC_LOAD_DYLIB
+; FRAME-NEXT: cmdsize
+; FRAME-NEXT:    name /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
+;
+; RUN: llvm-as %t/l.ll -o %t/l.o
+; RUN: %lld %t/l.o -o %t/l
+; RUN: llvm-objdump --macho --all-headers %t/l | FileCheck --check-prefix=LIB %s \
+; RUN:  --implicit-check-not LC_LOAD_DYLIB
+;
+;; Check that we don't create duplicate LC_LOAD_DYLIBs.
+; RUN: %lld -lSystem %t/l.o -o %t/l
+; RUN: llvm-objdump --macho --all-headers %t/l | FileCheck --check-prefix=LIB %s \
+; RUN:  --implicit-check-not LC_LOAD_DYLIB
+; LIB:          cmd LC_LOAD_DYLIB
+; LIB-NEXT: cmdsize
+; LIB-NEXT:    name /usr/lib/libSystem.dylib
+;
+; RUN: llvm-as %t/invalid.ll -o %t/invalid.o
+; RUN: not %lld %t/invalid.o -o /dev/null 2>&1 | FileCheck --check-prefix=INVALID %s
+; INVALID: error: -why_load is not allowed in LC_LINKER_OPTION
+;
+;--- framework.ll
 target triple = "x86_64-apple-macosx10.15.0"
 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
@@ -38,7 +37,7 @@ define void @main() {
   ret void
 }
 
-#--- l.ll
+;--- l.ll
 target triple = "x86_64-apple-macosx10.15.0"
 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
@@ -49,7 +48,7 @@ define void @main() {
   ret void
 }
 
-#--- invalid.ll
+;--- invalid.ll
 
 target triple = "x86_64-apple-macosx10.15.0"
 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
index 7f5e290..322ce90 100644 (file)
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: mkdir -p %t
+# RUN: rm -rf %t; mkdir -p %t
 
 ## Create a libsuper that has libgoodbye as a sub-library, which in turn has
 ## libhello as another sub-library.
index c8fe0b2..8626950 100644 (file)
@@ -1,5 +1,4 @@
 # REQUIRES: x86
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s
index ff6c6d7..fb5159a 100644 (file)
@@ -1,9 +1,8 @@
 # REQUIRES: x86
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/foo.o %t/foo.s
-# RUN: llvm-ar csr  %t/lib.a %t/foo.o
+# RUN: llvm-ar csr %t/lib.a %t/foo.o
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s
 
index 136187b..4ad3d46 100644 (file)
@@ -1,5 +1,4 @@
 # REQUIRES: x86
-# RUN: rm -rf %t
 # RUN: rm -rf %t; split-file %s %t
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/objc.o %t/objc.s