From f87b05e43bdbb2250b4eab573ed1b7b168a50a41 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 29 Jun 2015 14:12:14 +0000 Subject: [PATCH] Add a testcase for an invalid file. We were already checking this, but had no tests. llvm-svn: 240945 --- .../Object/Inputs/invalid-strtab-non-null.elf | Bin 0 -> 536 bytes llvm/test/Object/invalid.test | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 llvm/test/Object/Inputs/invalid-strtab-non-null.elf diff --git a/llvm/test/Object/Inputs/invalid-strtab-non-null.elf b/llvm/test/Object/Inputs/invalid-strtab-non-null.elf new file mode 100644 index 0000000000000000000000000000000000000000..f52c0a1401313480c246a680dc12d2b1cccf9362 GIT binary patch literal 536 zcmb<-^>JfjWMpQ50!9Wq21XbMiJpPPb^x;-7}&6?geX)1Q%n#JGO1URT2aEFmsDKL zpjTW{RFaqkq$_j5bV_1LVj{9)^4UBT_(6}kX;}k0ihTG D&2bPu literal 0 HcmV?d00001 diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index 2e2c924dfaef..17cbb30c9c25 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -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