[llvm] r240945 - Add a testcase for an invalid file.

Rafael Espindola rafael.espindola at gmail.com
Mon Jun 29 07:12:14 PDT 2015


Author: rafael
Date: Mon Jun 29 09:12:14 2015
New Revision: 240945

URL: http://llvm.org/viewvc/llvm-project?rev=240945&view=rev
Log:
Add a testcase for an invalid file.

We were already checking this, but had no tests.

Added:
    llvm/trunk/test/Object/Inputs/invalid-strtab-non-null.elf
Modified:
    llvm/trunk/test/Object/invalid.test

Added: llvm/trunk/test/Object/Inputs/invalid-strtab-non-null.elf
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/invalid-strtab-non-null.elf?rev=240945&view=auto
==============================================================================
Binary files llvm/trunk/test/Object/Inputs/invalid-strtab-non-null.elf (added) and llvm/trunk/test/Object/Inputs/invalid-strtab-non-null.elf Mon Jun 29 09:12:14 2015 differ

Modified: llvm/trunk/test/Object/invalid.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/invalid.test?rev=240945&r1=240944&r2=240945&view=diff
==============================================================================
--- llvm/trunk/test/Object/invalid.test (original)
+++ llvm/trunk/test/Object/invalid.test Mon Jun 29 09:12:14 2015
@@ -1,3 +1,6 @@
 RUN: not llvm-dwarfdump %p/Inputs/invalid-bad-rel-type.elf 2>&1 | FileCheck %s
 RUN: not llvm-objdump -s %p/Inputs/invalid-strtab-type.elf 2>&1 | FileCheck %s
 CHECK: Invalid data was encountered while parsing the file
+
+RUN: not llvm-objdump -s %p/Inputs/invalid-strtab-non-null.elf 2>&1 | FileCheck --check-prefix=NON-NULL %s
+NON-NULL: String table must end with a null terminator





More information about the llvm-commits mailing list