Skip to content

Commit b8424ea

Browse files
[llvm-profdata] Make tests more readable (NFC)
These tests generally use one printf for each field of RawInstrProf::ProfileData except the lines being touched in this patch. These lines print two fields, namely NumValueSites and NumBitmapBytes, with one printf, which is very confusing. (Note that the 4-byte printf at the end of the group is padding to make the struct size a multiple of 8 bytes.) This patch makes the tests a litle more readable by splitting NumValueSites and NumBitmapBytes into two separate lines.
1 parent 039d9aa commit b8424ea

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

llvm/test/tools/llvm-profdata/raw-32-bits-be.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ RUN: printf '\3\0\0\0' >> %t
2020
RUN: printf '\0\0\0\0' >> %t
2121
RUN: printf '\0\0\0\0' >> %t
2222
RUN: printf '\0\0\0\1' >> %t
23-
RUN: printf '\0\0\0\0\0\0\0\3' >> %t
23+
RUN: printf '\0\0\0\0' >> %t
24+
RUN: printf '\0\0\0\3' >> %t
2425
RUN: printf '\0\0\0\0' >> %t
2526

2627
RUN: printf '\344\023\165\112\031\035\265\067' >> %t
@@ -30,7 +31,8 @@ RUN: printf '\2\xff\xff\xd3' >> %t
3031
RUN: printf '\0\0\0\0' >> %t
3132
RUN: printf '\0\0\0\0' >> %t
3233
RUN: printf '\0\0\0\2' >> %t
33-
RUN: printf '\0\0\0\0\0\0\0\1' >> %t
34+
RUN: printf '\0\0\0\0' >> %t
35+
RUN: printf '\0\0\0\1' >> %t
3436
RUN: printf '\0\0\0\0' >> %t
3537

3638
RUN: printf '\0\0\0\0\0\0\0\023' >> %t

llvm/test/tools/llvm-profdata/raw-32-bits-le.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ RUN: printf '\0\0\0\3' >> %t
2020
RUN: printf '\0\0\0\0' >> %t
2121
RUN: printf '\0\0\0\0' >> %t
2222
RUN: printf '\1\0\0\0' >> %t
23-
RUN: printf '\0\0\0\0\3\0\0\0' >> %t
23+
RUN: printf '\0\0\0\0' >> %t
24+
RUN: printf '\3\0\0\0' >> %t
2425
RUN: printf '\0\0\0\0' >> %t
2526

2627
RUN: printf '\067\265\035\031\112\165\023\344' >> %t
@@ -30,7 +31,8 @@ RUN: printf '\xd3\xff\xff\2' >> %t
3031
RUN: printf '\0\0\0\0' >> %t
3132
RUN: printf '\0\0\0\0' >> %t
3233
RUN: printf '\2\0\0\0' >> %t
33-
RUN: printf '\0\0\0\0\1\0\0\0' >> %t
34+
RUN: printf '\0\0\0\0' >> %t
35+
RUN: printf '\1\0\0\0' >> %t
3436
RUN: printf '\0\0\0\0' >> %t
3537

3638
RUN: printf '\023\0\0\0\0\0\0\0' >> %t

0 commit comments

Comments
 (0)