[llvm-profdata] Add check for text profile formats and improve error reporting
[oota-llvm.git] / test / tools / llvm-profdata / raw-magic-but-no-header.test
1 RUN: printf '\201rforpl\377' > %t
2 RUN: not llvm-profdata show %t 2>&1 | FileCheck %s
3 RUN: printf '\377lprofr\201' > %t
4 RUN: not llvm-profdata show %t 2>&1 | FileCheck %s
5
6 CHECK: error: {{.+}}: Invalid instrumentation profile data (file header is corrupt)