Skip to content

Commit

Permalink
[LLD][ELF] - Replace one of the tests with a YAML version.
Browse files Browse the repository at this point in the history
This removes one more binary from the inputs.

Differential revision: https://reviews.llvm.org/D59085

llvm-svn: 356334
  • Loading branch information
George Rimar committed Mar 17, 2019
1 parent 9a44535 commit 738146a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Binary file removed lld/test/ELF/invalid/Inputs/data-encoding.a
Binary file not shown.
17 changes: 17 additions & 0 deletions lld/test/ELF/invalid/data-encoding.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# REQUIRES: x86

# The object in the archive has invalid data encoding.
# Check we report this.

# RUN: yaml2obj %s -o %t.o
# RUN: llvm-ar rcs %t.a %t.o

# RUN: not ld.lld --whole-archive %t.a -o /dev/null 2>&1 | FileCheck %s
# CHECK: {{.*}}.a({{.*}}.o): corrupted ELF file: invalid data encoding

--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATANONE
Type: ET_REL
Machine: EM_X86_64
4 changes: 0 additions & 4 deletions lld/test/ELF/invalid/invalid-elf.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
# RUN: FileCheck --check-prefix=NOT-ELF %s
# NOT-ELF: not-elf.a(empty.o): not an ELF file

# RUN: not ld.lld %t/simple.o %p/Inputs/data-encoding.a -o %t2 2>&1 | \
# RUN: FileCheck --check-prefix=INVALID-DATA-ENC %s
# INVALID-DATA-ENC: data-encoding.a(test.o): corrupted ELF file: invalid data encoding

# RUN: not ld.lld %t/simple.o %p/Inputs/file-class.a -o %t2 2>&1 | \
# RUN: FileCheck --check-prefix=INVALID-FILE-CLASS %s
# INVALID-FILE-CLASS: file-class.a(test.o): corrupted ELF file: invalid file class
Expand Down

0 comments on commit 738146a

Please sign in to comment.