[PATCH] D59085: [LLD][ELF] - Replace one of the tests with a YAML version.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 02:58:42 PST 2019


grimar created this revision.
grimar added a reviewer: ruiu.
Herald added subscribers: MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
grimar added a parent revision: D59082: [yaml2obj] - Allow producing ELFDATANONE ELFs.

This removes one more binary from the inputs.


https://reviews.llvm.org/D59085

Files:
  test/ELF/invalid/Inputs/data-encoding.a
  test/ELF/invalid/data-encoding.test
  test/ELF/invalid/invalid-elf.test


Index: test/ELF/invalid/invalid-elf.test
===================================================================
--- test/ELF/invalid/invalid-elf.test
+++ test/ELF/invalid/invalid-elf.test
@@ -1,10 +1,6 @@
 # REQUIRES: x86
 # RUN: llvm-mc %s -o %t -filetype=obj -triple x86_64-pc-linux
 
-# RUN: not ld.lld %t %p/Inputs/data-encoding.a -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-DATA-ENC %s
-# INVALID-DATA-ENC: test.o: invalid data encoding
-
 # RUN: not ld.lld %t %p/Inputs/file-class.a -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-FILE-CLASS %s
 # INVALID-FILE-CLASS: test.o: invalid file class
Index: test/ELF/invalid/data-encoding.test
===================================================================
--- /dev/null
+++ test/ELF/invalid/data-encoding.test
@@ -0,0 +1,18 @@
+# The object in the archive has invalid data encoding.
+# Check we report this.
+
+# RUN: echo ".long foo" > %t.s
+# RUN: llvm-mc %t.s -o %t -filetype=obj -triple x86_64-pc-linux
+
+# RUN: yaml2obj %s -o %t.o
+# RUN: llvm-ar rcs %t.a %t.o
+
+# RUN: not ld.lld %t %t.a -o %t2 2>&1 | FileCheck %s
+# CHECK: {{.*}}.o: invalid data encoding
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATANONE
+  Type:            ET_REL
+  Machine:         EM_X86_64


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59085.189676.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190307/2852d704/attachment.bin>


More information about the llvm-commits mailing list