[lld] r282595 - [ELF] - Created new "Invalid" subfolder for testcases.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 08:11:58 PDT 2016


Author: grimar
Date: Wed Sep 28 10:11:58 2016
New Revision: 282595

URL: http://llvm.org/viewvc/llvm-project?rev=282595&view=rev
Log:
[ELF] - Created new "Invalid" subfolder for testcases.

This subfolder just like "linkerscript" subfolder keeps
testcases with invalid input. According to PR30540 it seems
we might have many new ones soon, so it is seems reasonable to 
separate them from regular testcases.

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

Added:
    lld/trunk/test/ELF/Invalid/
    lld/trunk/test/ELF/Invalid/Inputs/
    lld/trunk/test/ELF/Invalid/Inputs/invalid-binding.elf   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-cie-version2.elf   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-data-encoding.a   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-file-class.a   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-multiple-eh-relocs.elf   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-section-index.elf   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-shentsize-zero.elf   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-shstrndx.so   (with props)
    lld/trunk/test/ELF/Invalid/Inputs/invalid-symtab-sh_info.elf   (with props)
    lld/trunk/test/ELF/Invalid/eh-frame-hdr-no-out.s
    lld/trunk/test/ELF/Invalid/invalid-elf.test
    lld/trunk/test/ELF/Invalid/merge-invalid-size.s
Removed:
    lld/trunk/test/ELF/Inputs/invalid-binding.elf
    lld/trunk/test/ELF/Inputs/invalid-cie-version2.elf
    lld/trunk/test/ELF/Inputs/invalid-data-encoding.a
    lld/trunk/test/ELF/Inputs/invalid-file-class.a
    lld/trunk/test/ELF/Inputs/invalid-multiple-eh-relocs.elf
    lld/trunk/test/ELF/Inputs/invalid-section-index.elf
    lld/trunk/test/ELF/Inputs/invalid-shentsize-zero.elf
    lld/trunk/test/ELF/Inputs/invalid-shstrndx.so
    lld/trunk/test/ELF/Inputs/invalid-symtab-sh_info.elf
    lld/trunk/test/ELF/eh-frame-hdr-no-out.s
    lld/trunk/test/ELF/invalid-elf.test
    lld/trunk/test/ELF/merge-invalid-size.s

Removed: lld/trunk/test/ELF/Inputs/invalid-binding.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-binding.elf?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-binding.elf (original) and lld/trunk/test/ELF/Inputs/invalid-binding.elf (removed) differ

Removed: lld/trunk/test/ELF/Inputs/invalid-cie-version2.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-cie-version2.elf?rev=282594&view=auto
==============================================================================
Binary file - no diff available.

Removed: lld/trunk/test/ELF/Inputs/invalid-data-encoding.a
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-data-encoding.a?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-data-encoding.a (original) and lld/trunk/test/ELF/Inputs/invalid-data-encoding.a (removed) differ

Removed: lld/trunk/test/ELF/Inputs/invalid-file-class.a
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-file-class.a?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-file-class.a (original) and lld/trunk/test/ELF/Inputs/invalid-file-class.a (removed) differ

Removed: lld/trunk/test/ELF/Inputs/invalid-multiple-eh-relocs.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-multiple-eh-relocs.elf?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-multiple-eh-relocs.elf (original) and lld/trunk/test/ELF/Inputs/invalid-multiple-eh-relocs.elf (removed) differ

Removed: lld/trunk/test/ELF/Inputs/invalid-section-index.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-section-index.elf?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-section-index.elf (original) and lld/trunk/test/ELF/Inputs/invalid-section-index.elf (removed) differ

Removed: lld/trunk/test/ELF/Inputs/invalid-shentsize-zero.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-shentsize-zero.elf?rev=282594&view=auto
==============================================================================
Binary file - no diff available.

Removed: lld/trunk/test/ELF/Inputs/invalid-shstrndx.so
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-shstrndx.so?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-shstrndx.so (original) and lld/trunk/test/ELF/Inputs/invalid-shstrndx.so (removed) differ

Removed: lld/trunk/test/ELF/Inputs/invalid-symtab-sh_info.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/invalid-symtab-sh_info.elf?rev=282594&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/invalid-symtab-sh_info.elf (original) and lld/trunk/test/ELF/Inputs/invalid-symtab-sh_info.elf (removed) differ

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-binding.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-binding.elf?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-binding.elf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-cie-version2.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-cie-version2.elf?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-cie-version2.elf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-data-encoding.a
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-data-encoding.a?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-data-encoding.a
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-file-class.a
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-file-class.a?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-file-class.a
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-multiple-eh-relocs.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-multiple-eh-relocs.elf?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-multiple-eh-relocs.elf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-section-index.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-section-index.elf?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-section-index.elf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-shentsize-zero.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-shentsize-zero.elf?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-shentsize-zero.elf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-shstrndx.so
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-shstrndx.so?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-shstrndx.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/Inputs/invalid-symtab-sh_info.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/Inputs/invalid-symtab-sh_info.elf?rev=282595&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lld/trunk/test/ELF/Invalid/Inputs/invalid-symtab-sh_info.elf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lld/trunk/test/ELF/Invalid/eh-frame-hdr-no-out.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/eh-frame-hdr-no-out.s?rev=282595&view=auto
==============================================================================
--- lld/trunk/test/ELF/Invalid/eh-frame-hdr-no-out.s (added)
+++ lld/trunk/test/ELF/Invalid/eh-frame-hdr-no-out.s Wed Sep 28 10:11:58 2016
@@ -0,0 +1,6 @@
+// REQUIRES: x86
+// RUN: not ld.lld --eh-frame-hdr %p/Inputs/invalid-cie-version2.elf -o %t >& %t.log
+// RUN: FileCheck %s < %t.log
+
+// invalid-cie-version2.elf contains unsupported version of CIE = 2.
+// CHECK: FDE version 1 or 3 expected, but got 2

Added: lld/trunk/test/ELF/Invalid/invalid-elf.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/invalid-elf.test?rev=282595&view=auto
==============================================================================
--- lld/trunk/test/ELF/Invalid/invalid-elf.test (added)
+++ lld/trunk/test/ELF/Invalid/invalid-elf.test Wed Sep 28 10:11:58 2016
@@ -0,0 +1,31 @@
+# RUN: llvm-mc %s -o %t -filetype=obj -triple x86_64-pc-linux
+
+# RUN: not ld.lld %t %p/Inputs/invalid-data-encoding.a -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-DATA-ENC %s
+# INVALID-DATA-ENC: invalid data encoding: test.o
+
+# RUN: not ld.lld %t %p/Inputs/invalid-file-class.a -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-FILE-CLASS %s
+# INVALID-FILE-CLASS: invalid file class: test.o
+
+# RUN: not ld.lld %p/Inputs/invalid-symtab-sh_info.elf -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-SYMTAB-SHINFO %s
+# INVALID-SYMTAB-SHINFO: invalid sh_info in symbol table
+
+# RUN: not ld.lld %p/Inputs/invalid-binding.elf -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-BINDING %s
+# INVALID-BINDING: unexpected binding
+
+# RUN: not ld.lld %p/Inputs/invalid-section-index.elf -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX-LLD %s
+# INVALID-SECTION-INDEX-LLD: invalid section index
+
+# RUN: not ld.lld %p/Inputs/invalid-shstrndx.so -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX %s
+# INVALID-SECTION-INDEX: Invalid section index
+
+# RUN: not ld.lld %p/Inputs/invalid-multiple-eh-relocs.elf -o %t2 2>&1 | \
+# RUN:   FileCheck --check-prefix=INVALID-EH-RELOCS %s
+# INVALID-EH-RELOCS: multiple relocation sections to .eh_frame are not supported
+
+.long foo

Added: lld/trunk/test/ELF/Invalid/merge-invalid-size.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Invalid/merge-invalid-size.s?rev=282595&view=auto
==============================================================================
--- lld/trunk/test/ELF/Invalid/merge-invalid-size.s (added)
+++ lld/trunk/test/ELF/Invalid/merge-invalid-size.s Wed Sep 28 10:11:58 2016
@@ -0,0 +1,10 @@
+// REQUIRES: x86
+// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
+// RUN: not ld.lld %t.o -o %t.so 2>&1 | FileCheck %s
+// CHECK: SHF_MERGE section size must be a multiple of sh_entsize
+
+// Test that we accept a zero sh_entsize.
+// RUN: ld.lld %p/Inputs/invalid-shentsize-zero.elf -o %t2
+
+.section .foo,"aM", at progbits,4
+.short 42

Removed: lld/trunk/test/ELF/eh-frame-hdr-no-out.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/eh-frame-hdr-no-out.s?rev=282594&view=auto
==============================================================================
--- lld/trunk/test/ELF/eh-frame-hdr-no-out.s (original)
+++ lld/trunk/test/ELF/eh-frame-hdr-no-out.s (removed)
@@ -1,6 +0,0 @@
-// REQUIRES: x86
-// RUN: not ld.lld --eh-frame-hdr %p/Inputs/invalid-cie-version2.elf -o %t >& %t.log
-// RUN: FileCheck %s < %t.log
-
-// invalid-cie-version2.elf contains unsupported version of CIE = 2.
-// CHECK: FDE version 1 or 3 expected, but got 2

Removed: lld/trunk/test/ELF/invalid-elf.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid-elf.test?rev=282594&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid-elf.test (original)
+++ lld/trunk/test/ELF/invalid-elf.test (removed)
@@ -1,31 +0,0 @@
-# RUN: llvm-mc %s -o %t -filetype=obj -triple x86_64-pc-linux
-
-# RUN: not ld.lld %t %p/Inputs/invalid-data-encoding.a -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-DATA-ENC %s
-# INVALID-DATA-ENC: invalid data encoding: test.o
-
-# RUN: not ld.lld %t %p/Inputs/invalid-file-class.a -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-FILE-CLASS %s
-# INVALID-FILE-CLASS: invalid file class: test.o
-
-# RUN: not ld.lld %p/Inputs/invalid-symtab-sh_info.elf -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-SYMTAB-SHINFO %s
-# INVALID-SYMTAB-SHINFO: invalid sh_info in symbol table
-
-# RUN: not ld.lld %p/Inputs/invalid-binding.elf -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-BINDING %s
-# INVALID-BINDING: unexpected binding
-
-# RUN: not ld.lld %p/Inputs/invalid-section-index.elf -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX-LLD %s
-# INVALID-SECTION-INDEX-LLD: invalid section index
-
-# RUN: not ld.lld %p/Inputs/invalid-shstrndx.so -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX %s
-# INVALID-SECTION-INDEX: Invalid section index
-
-# RUN: not ld.lld %p/Inputs/invalid-multiple-eh-relocs.elf -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-EH-RELOCS %s
-# INVALID-EH-RELOCS: multiple relocation sections to .eh_frame are not supported
-
-.long foo

Removed: lld/trunk/test/ELF/merge-invalid-size.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/merge-invalid-size.s?rev=282594&view=auto
==============================================================================
--- lld/trunk/test/ELF/merge-invalid-size.s (original)
+++ lld/trunk/test/ELF/merge-invalid-size.s (removed)
@@ -1,10 +0,0 @@
-// REQUIRES: x86
-// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
-// RUN: not ld.lld %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: SHF_MERGE section size must be a multiple of sh_entsize
-
-// Test that we accept a zero sh_entsize.
-// RUN: ld.lld %p/Inputs/invalid-shentsize-zero.elf -o %t2
-
-.section .foo,"aM", at progbits,4
-.short 42




More information about the llvm-commits mailing list