From 768cf93bca2d515236ef87b86d46fea45e1fb840 Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 4 Mar 2024 12:53:16 -0800 Subject: [PATCH] [TypeProf][InstrPGO][nfc] Disable several tests on Windows Several profdata tests pass the byte 012 to printf. This causes these tests to fail when using GnuWin32's version of printf because printf will detect that 012 is the LF character and will prepend the byte 015 (CR) in front of LF. --- llvm/test/tools/llvm-profdata/binary-ids-padding.test | 3 +++ llvm/test/tools/llvm-profdata/large-binary-id-size.test | 3 +++ .../llvm-profdata/malformed-not-space-for-another-header.test | 3 +++ llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test | 3 +++ .../tools/llvm-profdata/malformed-ptr-to-counter-array.test | 3 +++ llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test | 3 +++ llvm/test/tools/llvm-profdata/raw-32-bits-be.test | 3 +++ llvm/test/tools/llvm-profdata/raw-32-bits-le.test | 3 +++ llvm/test/tools/llvm-profdata/raw-64-bits-be.test | 3 +++ llvm/test/tools/llvm-profdata/raw-64-bits-le.test | 3 +++ llvm/test/tools/llvm-profdata/raw-two-profiles.test | 3 +++ 11 files changed, 33 insertions(+) diff --git a/llvm/test/tools/llvm-profdata/binary-ids-padding.test b/llvm/test/tools/llvm-profdata/binary-ids-padding.test index 61881b69cfd5c..292c582b45c52 100644 --- a/llvm/test/tools/llvm-profdata/binary-ids-padding.test +++ b/llvm/test/tools/llvm-profdata/binary-ids-padding.test @@ -14,6 +14,9 @@ // INSTR_PROF_RAW_HEADER(uint64_t, NumVTables, NumVTables) // INSTR_PROF_RAW_HEADER(uint64_t, ValueKindLast, IPVK_Last) +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw // There will be 2 20-byte binary IDs, so the total Binary IDs size will be 64 bytes. diff --git a/llvm/test/tools/llvm-profdata/large-binary-id-size.test b/llvm/test/tools/llvm-profdata/large-binary-id-size.test index 316a9a4c9df4c..b62bdad4ddb21 100644 --- a/llvm/test/tools/llvm-profdata/large-binary-id-size.test +++ b/llvm/test/tools/llvm-profdata/large-binary-id-size.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw RUN: printf '\40\0\0\0\0\0\0\0' >> %t.profraw diff --git a/llvm/test/tools/llvm-profdata/malformed-not-space-for-another-header.test b/llvm/test/tools/llvm-profdata/malformed-not-space-for-another-header.test index 8b686d5c50cb7..705e5efaf5875 100644 --- a/llvm/test/tools/llvm-profdata/malformed-not-space-for-another-header.test +++ b/llvm/test/tools/llvm-profdata/malformed-not-space-for-another-header.test @@ -14,6 +14,9 @@ // INSTR_PROF_RAW_HEADER(uint64_t, NumVTables, NumVTables) // INSTR_PROF_RAW_HEADER(uint64_t, ValueKindLast, IPVK_Last) +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw diff --git a/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test b/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test index 089afad420622..157c13b926a7e 100644 --- a/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test +++ b/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test @@ -14,6 +14,9 @@ // INSTR_PROF_RAW_HEADER(uint64_t, NumVTables, NumVTables) // INSTR_PROF_RAW_HEADER(uint64_t, ValueKindLast, IPVK_Last) +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw diff --git a/llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test b/llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test index e404ba4210cc1..83cf76f68fb63 100644 --- a/llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test +++ b/llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test @@ -14,6 +14,9 @@ // INSTR_PROF_RAW_HEADER(uint64_t, NumVTables, NumVTables) // INSTR_PROF_RAW_HEADER(uint64_t, ValueKindLast, IPVK_Last) +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw RUN: printf '\0\0\0\0\0\0\0\0' >> %t.profraw diff --git a/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test b/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test index ee54bfb978567..0f20a1b0b369c 100644 --- a/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test +++ b/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw // We should fail on this because the binary IDs is not a multiple of 8 bytes. diff --git a/llvm/test/tools/llvm-profdata/raw-32-bits-be.test b/llvm/test/tools/llvm-profdata/raw-32-bits-be.test index 63782c8b94d4a..fbd73ae30a5b3 100644 --- a/llvm/test/tools/llvm-profdata/raw-32-bits-be.test +++ b/llvm/test/tools/llvm-profdata/raw-32-bits-be.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows // Header RUN: printf '\377lprofR\201' > %t RUN: printf '\0\0\0\0\0\0\0\12' >> %t diff --git a/llvm/test/tools/llvm-profdata/raw-32-bits-le.test b/llvm/test/tools/llvm-profdata/raw-32-bits-le.test index e9569bec1178b..91f10fc874586 100644 --- a/llvm/test/tools/llvm-profdata/raw-32-bits-le.test +++ b/llvm/test/tools/llvm-profdata/raw-32-bits-le.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201Rforpl\377' > %t RUN: printf '\12\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\0\0\0\0\0' >> %t diff --git a/llvm/test/tools/llvm-profdata/raw-64-bits-be.test b/llvm/test/tools/llvm-profdata/raw-64-bits-be.test index 0bc579eec58ab..e7694a1b5a73b 100644 --- a/llvm/test/tools/llvm-profdata/raw-64-bits-be.test +++ b/llvm/test/tools/llvm-profdata/raw-64-bits-be.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\377lprofr\201' > %t RUN: printf '\0\0\0\0\0\0\0\12' >> %t RUN: printf '\0\0\0\0\0\0\0\0' >> %t diff --git a/llvm/test/tools/llvm-profdata/raw-64-bits-le.test b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test index ca9ea54c3f014..99d486b8a5176 100644 --- a/llvm/test/tools/llvm-profdata/raw-64-bits-le.test +++ b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t RUN: printf '\12\0\0\0\0\0\0\0' >> %t RUN: printf '\0\0\0\0\0\0\0\0' >> %t diff --git a/llvm/test/tools/llvm-profdata/raw-two-profiles.test b/llvm/test/tools/llvm-profdata/raw-two-profiles.test index 70a4210dea9f8..47cc6fa4fd7fe 100644 --- a/llvm/test/tools/llvm-profdata/raw-two-profiles.test +++ b/llvm/test/tools/llvm-profdata/raw-two-profiles.test @@ -1,3 +1,6 @@ +// gnuwin32 printf does not work for this test because it will print \15 (CR) +// whenever \12 (LF) is in the input string. +UNSUPPORTED: system-windows RUN: printf '\201rforpl\377' > %t-foo.profraw RUN: printf '\12\0\0\0\0\0\0\0' >> %t-foo.profraw RUN: printf '\0\0\0\0\0\0\0\0' >> %t-foo.profraw