From 531bb481e22f429157811f215c044ee0634f2c1f Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 21 Mar 2014 20:42:28 +0000 Subject: InstrProf: Actually detect bad headers llvm-svn: 204510 --- llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test (limited to 'llvm/test/tools') diff --git a/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test b/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test new file mode 100644 index 00000000000..e899ece2755 --- /dev/null +++ b/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test @@ -0,0 +1,6 @@ +RUN: printf "warforpl" > %t +RUN: not llvm-profdata show %t 2>&1 | FileCheck %s +RUN: printf "lprofraw" > %t +RUN: not llvm-profdata show %t 2>&1 | FileCheck %s + +CHECK: error: {{.+}}: Invalid header -- cgit v1.2.3