xref: /llvm-project/llvm/test/tools/llvm-profdata/large-binary-id-size.test (revision 922a431e10fa28519eb5d62e094f19b1008612a1)
1// gnuwin32 printf does not work for this test because it will print \15 (CR)
2// whenever \12 (LF) is in the input string.
3UNSUPPORTED: system-windows
4RUN: printf '\201rforpl\377' > %t.profraw
5RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw
6RUN: printf '\40\0\0\0\0\0\0\0' >> %t.profraw
7RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
8RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
9RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
10RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
11RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
12RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
13RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
14RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
15RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
16RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
17RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
18RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
19RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw
20
21// Check for a corrupted size being too large past the end of the file.
22RUN: printf '\7\7\7\7\7\7\7\7' >> %t.profraw
23RUN: printf '\0\1\2\3\4\5\6\7' >> %t.profraw
24RUN: printf '\0\1\2\3\4\5\6\7' >> %t.profraw
25RUN: printf '\0\1\2\3\0\0\0\0' >> %t.profraw
26
27// RUN: not llvm-profdata show --binary-ids  %t.profraw 2>&1 | FileCheck %s
28// CHECK: malformed instrumentation profile data: not enough data to read binary id data
29