[PATCH] D80217: [lld-macho] Move all tests for erroneous inputs under invalid/

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 13:45:00 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf04d1c3b90c1: [lld-macho] Move all tests for erroneous inputs under invalid/ (authored by int3).

Changed prior to commit:
  https://reviews.llvm.org/D80217?vs=264915&id=267980#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80217/new/

https://reviews.llvm.org/D80217

Files:
  lld/test/MachO/Inputs/no-id-dylib.yaml
  lld/test/MachO/alignment-too-large.yaml
  lld/test/MachO/duplicate-symbol.s
  lld/test/MachO/invalid-executable.s
  lld/test/MachO/invalid-fat-narch.s
  lld/test/MachO/invalid-fat-offset.s
  lld/test/MachO/invalid/alignment-too-large.yaml
  lld/test/MachO/invalid/duplicate-symbol.s
  lld/test/MachO/invalid/invalid-executable.s
  lld/test/MachO/invalid/invalid-fat-narch.s
  lld/test/MachO/invalid/invalid-fat-offset.s
  lld/test/MachO/invalid/missing-dylib.s
  lld/test/MachO/invalid/no-id-dylink.yaml
  lld/test/MachO/invalid/no-such-file.s
  lld/test/MachO/missing-dylib.s
  lld/test/MachO/no-id-dylink.s
  lld/test/MachO/no-such-file.s


Index: lld/test/MachO/no-id-dylink.s
===================================================================
--- lld/test/MachO/no-id-dylink.s
+++ /dev/null
@@ -1,13 +0,0 @@
-# REQUIRES: x86
-# RUN: mkdir -p %t
-# RUN: yaml2obj %p/Inputs/no-id-dylib.yaml -o %t/libnoid.dylib
-# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/no-id-dylink.o
-# RUN: not lld -flavor darwinnew -o %t/no-id-dylink -Z -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s
-# CHECK: error: dylib {{.*}}libnoid.dylib missing LC_ID_DYLIB load command
-
-.text
-.globl _main
-
-_main:
-  mov $0, %rax
-  ret
Index: lld/test/MachO/invalid/no-id-dylink.yaml
===================================================================
--- lld/test/MachO/invalid/no-id-dylink.yaml
+++ lld/test/MachO/invalid/no-id-dylink.yaml
@@ -1,5 +1,12 @@
-## This yaml file was originally generated from linking the following source
-## input with ld64:
+# REQUIRES: x86
+# RUN: mkdir -p %t
+# RUN: yaml2obj %s -o %t/libnoid.dylib
+# RUN: echo ".globl _main; .text; _main: ret" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/no-id-dylink.o
+# RUN: not lld -flavor darwinnew -o %t/no-id-dylink -Z -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s
+# CHECK: error: dylib {{.*}}libnoid.dylib missing LC_ID_DYLIB load command
+
+## This YAML file was originally generated from linking the following source
+## input with ld64 and passing the resulting binary through obj2yaml:
 ##
 ## .section __TEXT,__cstring
 ## .globl _hello_world
@@ -7,9 +14,9 @@
 ## _hello_world:
 ## .asciz "Hello world!\n"
 ##
-## Then we deleted the LC_ID_DYLIB command from the YAML file.
+## Then we deleted the LC_ID_DYLIB command from the file.
 
---- !mach-o
+!mach-o
 FileHeader:
   magic:           0xFEEDFACF
   cputype:         0x01000007
@@ -157,4 +164,3 @@
     - ' '
     - _hello_world
     - ''
-...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80217.267980.patch
Type: text/x-patch
Size: 1856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200602/bdc58159/attachment.bin>


More information about the llvm-commits mailing list