[llvm] [z/OS] Mark 18 tests UNSUPPORTED on z/OS due to an issue in printf. (PR #196391)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 12:05:00 PDT 2026


https://github.com/sujianIBM updated https://github.com/llvm/llvm-project/pull/196391

>From 5bae21a065e901d98ea6e960655e4e7a4f4bb151 Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Thu, 7 May 2026 19:02:37 +0000
Subject: [PATCH 1/4] Mark 18 tests UNSUPPORTED on z/OS due to an issue in
 printf.

---
 llvm/test/tools/llvm-cgdata/error.test                        | 4 ++++
 llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test        | 4 ++++
 llvm/test/tools/llvm-profdata/binary-ids-padding.test         | 4 +++-
 .../tools/llvm-profdata/insufficient-binary-ids-size.test     | 3 +++
 llvm/test/tools/llvm-profdata/large-binary-id-size.test       | 4 +++-
 .../llvm-profdata/malformed-not-space-for-another-header.test | 4 +++-
 .../test/tools/llvm-profdata/malformed-num-counters-zero.test | 4 +++-
 .../tools/llvm-profdata/malformed-ptr-to-counter-array.test   | 4 +++-
 llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test | 4 +++-
 .../tools/llvm-profdata/mismatched-raw-profile-header.test    | 3 +++
 llvm/test/tools/llvm-profdata/raw-32-bits-be.test             | 4 +++-
 llvm/test/tools/llvm-profdata/raw-32-bits-le.test             | 4 +++-
 llvm/test/tools/llvm-profdata/raw-64-bits-be.test             | 4 +++-
 llvm/test/tools/llvm-profdata/raw-64-bits-le.test             | 4 +++-
 llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test    | 3 +++
 llvm/test/tools/llvm-profdata/raw-two-profiles.test           | 4 +++-
 llvm/test/tools/llvm-strings/stdin.test                       | 4 ++++
 llvm/test/tools/sanstats/elf.test                             | 4 ++++
 18 files changed, 58 insertions(+), 11 deletions(-)

diff --git a/llvm/test/tools/llvm-cgdata/error.test b/llvm/test/tools/llvm-cgdata/error.test
index bf5e3ff6a4ed0..d6225cbe07643 100644
--- a/llvm/test/tools/llvm-cgdata/error.test
+++ b/llvm/test/tools/llvm-cgdata/error.test
@@ -1,5 +1,9 @@
 # Test various error cases
 
+# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+# causing the magic bytes to be incorrect.
+# UNSUPPORTED: system-zos
+
 # Synthesize a header only cgdata.
 # struct Header {
 #   uint64_t Magic;
diff --git a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
index d4b535352020c..102424f72b200 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
@@ -1,5 +1,9 @@
 ## Verify that --add-section warns on invalid note sections.
 
+# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+# causing the values to be incorrect.
+# UNSUPPORTED: system-zos
+
 ## Add [namesz, descsz, type, name, desc] for a build id.
 
 ## Notes should be padded to 8 bytes.
diff --git a/llvm/test/tools/llvm-profdata/binary-ids-padding.test b/llvm/test/tools/llvm-profdata/binary-ids-padding.test
index cc3e6c38e6907..cf545865fbdce 100644
--- a/llvm/test/tools/llvm-profdata/binary-ids-padding.test
+++ b/llvm/test/tools/llvm-profdata/binary-ids-padding.test
@@ -16,7 +16,9 @@
 
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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/insufficient-binary-ids-size.test b/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test
index 71fad58e64230..1442b8057ed65 100644
--- a/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test
+++ b/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test
@@ -1,3 +1,6 @@
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\10\0\0\0\0\0\0\0' >> %t.profraw
 // We should fail on this because the data buffer (profraw file) is not long
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 b62bdad4ddb21..9100772263a0d 100644
--- a/llvm/test/tools/llvm-profdata/large-binary-id-size.test
+++ b/llvm/test/tools/llvm-profdata/large-binary-id-size.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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 705e5efaf5875..411c770923099 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
@@ -16,7 +16,9 @@
 
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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 157c13b926a7e..9e7e3b9ad948d 100644
--- a/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test
+++ b/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test
@@ -16,7 +16,9 @@
 
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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 83cf76f68fb63..f04afcee33522 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
@@ -16,7 +16,9 @@
 
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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 0f20a1b0b369c..ed008845e546b 100644
--- a/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test
+++ b/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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/mismatched-raw-profile-header.test b/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
index dfa163f1f3439..190575385f34b 100644
--- a/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
+++ b/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
@@ -1,3 +1,6 @@
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-zos
 // Magic
 RUN: printf '\377lprofr\201' > %t
 // Version
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 6b3dc96b36270..acdf06b672bed 100644
--- a/llvm/test/tools/llvm-profdata/raw-32-bits-be.test
+++ b/llvm/test/tools/llvm-profdata/raw-32-bits-be.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 // 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 95625565f5c0c..6804e66bf7e99 100644
--- a/llvm/test/tools/llvm-profdata/raw-32-bits-le.test
+++ b/llvm/test/tools/llvm-profdata/raw-32-bits-le.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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 5316ef5a3e559..63d84c2eb01f7 100644
--- a/llvm/test/tools/llvm-profdata/raw-64-bits-be.test
+++ b/llvm/test/tools/llvm-profdata/raw-64-bits-be.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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 58f4da8cf0386..0427dfe1176c3 100644
--- a/llvm/test/tools/llvm-profdata/raw-64-bits-le.test
+++ b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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-magic-but-no-header.test b/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test
index bd2b797831fc4..ddda82419beb9 100644
--- a/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test
+++ b/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test
@@ -1,3 +1,6 @@
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-zos
 RUN: printf '\201rforpl\377' > %t
 RUN: not llvm-profdata show %t 2>&1 | FileCheck %s
 RUN: printf '\377lprofr\201' > %t
diff --git a/llvm/test/tools/llvm-profdata/raw-two-profiles.test b/llvm/test/tools/llvm-profdata/raw-two-profiles.test
index 47cc6fa4fd7fe..470ed7336634f 100644
--- a/llvm/test/tools/llvm-profdata/raw-two-profiles.test
+++ b/llvm/test/tools/llvm-profdata/raw-two-profiles.test
@@ -1,6 +1,8 @@
 // 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
+// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+// causing the magic bytes to be incorrect.
+UNSUPPORTED: system-windows, system-zos
 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
diff --git a/llvm/test/tools/llvm-strings/stdin.test b/llvm/test/tools/llvm-strings/stdin.test
index d0b6e44aabbea..6ea8a8a892b87 100644
--- a/llvm/test/tools/llvm-strings/stdin.test
+++ b/llvm/test/tools/llvm-strings/stdin.test
@@ -1,5 +1,9 @@
 ## Show that llvm-strings can handle stdin input properly.
 
+# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+# causing the values to be incorrect.
+# UNSUPPORTED: system-zos
+
 ## Case 1: output with single string.
 RUN: printf "abcdefg" | llvm-strings - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
 CASE1: abcdefg
diff --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test
index e230fbdc435fb..ba26e30475cd7 100644
--- a/llvm/test/tools/sanstats/elf.test
+++ b/llvm/test/tools/sanstats/elf.test
@@ -1,3 +1,7 @@
+# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
+# causing the values to be incorrect.
+# UNSUPPORTED: system-zos
+
 # RUN: yaml2obj %s -o %t1.o
 # RUN: yaml2obj %s -o %t2.o
 

>From c8f997435e01ca1ced4594dd641f5da169347852 Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Fri, 22 May 2026 00:17:12 +0000
Subject: [PATCH 2/4] Add a TODO for using lit builtin printf.

---
 llvm/test/tools/llvm-cgdata/error.test                       | 5 +++--
 llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test       | 5 +++--
 llvm/test/tools/llvm-profdata/binary-ids-padding.test        | 5 +++--
 .../tools/llvm-profdata/insufficient-binary-ids-size.test    | 5 +++--
 llvm/test/tools/llvm-profdata/large-binary-id-size.test      | 5 +++--
 .../malformed-not-space-for-another-header.test              | 5 +++--
 .../tools/llvm-profdata/malformed-num-counters-zero.test     | 5 +++--
 .../tools/llvm-profdata/malformed-ptr-to-counter-array.test  | 5 +++--
 .../test/tools/llvm-profdata/misaligned-binary-ids-size.test | 5 +++--
 .../tools/llvm-profdata/mismatched-raw-profile-header.test   | 5 +++--
 llvm/test/tools/llvm-profdata/raw-32-bits-be.test            | 5 +++--
 llvm/test/tools/llvm-profdata/raw-32-bits-le.test            | 5 +++--
 llvm/test/tools/llvm-profdata/raw-64-bits-be.test            | 5 +++--
 llvm/test/tools/llvm-profdata/raw-64-bits-le.test            | 5 +++--
 llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test   | 5 +++--
 llvm/test/tools/llvm-profdata/raw-two-profiles.test          | 5 +++--
 llvm/test/tools/llvm-strings/stdin.test                      | 5 +++--
 llvm/test/tools/sanstats/elf.test                            | 5 +++--
 18 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/llvm/test/tools/llvm-cgdata/error.test b/llvm/test/tools/llvm-cgdata/error.test
index d6225cbe07643..e45bc9a85fa19 100644
--- a/llvm/test/tools/llvm-cgdata/error.test
+++ b/llvm/test/tools/llvm-cgdata/error.test
@@ -1,7 +1,8 @@
 # Test various error cases
 
-# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-# causing the magic bytes to be incorrect.
+# On z/OS, ebcdic output from printf is converted into utf-8 as
+# the output being redirected, causing the magic bytes to be incorrect.
+# TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 # Synthesize a header only cgdata.
diff --git a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
index 102424f72b200..95edd1eecb0a5 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
@@ -1,7 +1,8 @@
 ## Verify that --add-section warns on invalid note sections.
 
-# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-# causing the values to be incorrect.
+# On z/OS, ebcdic output from printf is converted into utf-8 as
+# the output being redirected, causing the values to be incorrect.
+# TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 ## Add [namesz, descsz, type, name, desc] for a build id.
diff --git a/llvm/test/tools/llvm-profdata/binary-ids-padding.test b/llvm/test/tools/llvm-profdata/binary-ids-padding.test
index cf545865fbdce..2d3b438f96946 100644
--- a/llvm/test/tools/llvm-profdata/binary-ids-padding.test
+++ b/llvm/test/tools/llvm-profdata/binary-ids-padding.test
@@ -16,8 +16,9 @@
 
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw
diff --git a/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test b/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test
index 1442b8057ed65..66fba4ba495b7 100644
--- a/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test
+++ b/llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test
@@ -1,5 +1,6 @@
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\10\0\0\0\0\0\0\0' >> %t.profraw
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 9100772263a0d..bd43243d986dd 100644
--- a/llvm/test/tools/llvm-profdata/large-binary-id-size.test
+++ b/llvm/test/tools/llvm-profdata/large-binary-id-size.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\12\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 411c770923099..1677b70be9483 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
@@ -16,8 +16,9 @@
 
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\12\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 9e7e3b9ad948d..f10674cb4058e 100644
--- a/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test
+++ b/llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test
@@ -16,8 +16,9 @@
 
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\12\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 f04afcee33522..d94bc89192ea5 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
@@ -16,8 +16,9 @@
 
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\12\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 ed008845e546b..ce91be459646a 100644
--- a/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test
+++ b/llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t.profraw
 RUN: printf '\12\0\0\0\0\0\0\0' >> %t.profraw
diff --git a/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test b/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
index 190575385f34b..fda43dbdf3f86 100644
--- a/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
+++ b/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
@@ -1,5 +1,6 @@
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-zos
 // Magic
 RUN: printf '\377lprofr\201' > %t
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 acdf06b672bed..83969003ef63a 100644
--- a/llvm/test/tools/llvm-profdata/raw-32-bits-be.test
+++ b/llvm/test/tools/llvm-profdata/raw-32-bits-be.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 // Header
 RUN: printf '\377lprofR\201' > %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 6804e66bf7e99..234e0276c3bff 100644
--- a/llvm/test/tools/llvm-profdata/raw-32-bits-le.test
+++ b/llvm/test/tools/llvm-profdata/raw-32-bits-le.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201Rforpl\377' > %t
 RUN: printf '\12\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 63d84c2eb01f7..3222ff7165cec 100644
--- a/llvm/test/tools/llvm-profdata/raw-64-bits-be.test
+++ b/llvm/test/tools/llvm-profdata/raw-64-bits-be.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 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-64-bits-le.test b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test
index 0427dfe1176c3..35b7673099309 100644
--- a/llvm/test/tools/llvm-profdata/raw-64-bits-le.test
+++ b/llvm/test/tools/llvm-profdata/raw-64-bits-le.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t
 RUN: printf '\12\0\0\0\0\0\0\0' >> %t
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
index ddda82419beb9..caec1663a04fd 100644
--- a/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test
+++ b/llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test
@@ -1,5 +1,6 @@
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-zos
 RUN: printf '\201rforpl\377' > %t
 RUN: not llvm-profdata show %t 2>&1 | FileCheck %s
diff --git a/llvm/test/tools/llvm-profdata/raw-two-profiles.test b/llvm/test/tools/llvm-profdata/raw-two-profiles.test
index 470ed7336634f..80189567a820d 100644
--- a/llvm/test/tools/llvm-profdata/raw-two-profiles.test
+++ b/llvm/test/tools/llvm-profdata/raw-two-profiles.test
@@ -1,7 +1,8 @@
 // gnuwin32 printf does not work for this test because it will print \15 (CR)
 // whenever \12 (LF) is in the input string.
-// z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-// causing the magic bytes to be incorrect.
+// On z/OS, ebcdic output from printf is converted into utf-8 as
+// the output being redirected, causing the magic bytes to be incorrect.
+// TODO: use a builtin version of printf
 UNSUPPORTED: system-windows, system-zos
 RUN: printf '\201rforpl\377' > %t-foo.profraw
 RUN: printf '\12\0\0\0\0\0\0\0' >> %t-foo.profraw
diff --git a/llvm/test/tools/llvm-strings/stdin.test b/llvm/test/tools/llvm-strings/stdin.test
index 6ea8a8a892b87..f322f37f900e4 100644
--- a/llvm/test/tools/llvm-strings/stdin.test
+++ b/llvm/test/tools/llvm-strings/stdin.test
@@ -1,7 +1,8 @@
 ## Show that llvm-strings can handle stdin input properly.
 
-# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-# causing the values to be incorrect.
+# On z/OS, ebcdic output from printf is converted into utf-8 as
+# the output being redirected, causing the values to be incorrect.
+# TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 ## Case 1: output with single string.
diff --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test
index ba26e30475cd7..88ec8e03dc20c 100644
--- a/llvm/test/tools/sanstats/elf.test
+++ b/llvm/test/tools/sanstats/elf.test
@@ -1,5 +1,6 @@
-# z/OS printf interprets octal escape sequences in EBCDIC encoding, not ASCII,
-# causing the values to be incorrect.
+# On z/OS, ebcdic output from printf is converted into utf-8 as
+# the output being redirected, causing the values to be incorrect.
+# TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 # RUN: yaml2obj %s -o %t1.o

>From 9a590c29b257e2db6edf5e0a54fd8ed674dd83bd Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Fri, 22 May 2026 15:07:21 +0000
Subject: [PATCH 3/4] Use ## for comments.

---
 llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test | 6 +++---
 llvm/test/tools/llvm-strings/stdin.test                | 6 +++---
 llvm/test/tools/sanstats/elf.test                      | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
index 95edd1eecb0a5..e31d49cc6bf28 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
@@ -1,8 +1,8 @@
 ## Verify that --add-section warns on invalid note sections.
 
-# On z/OS, ebcdic output from printf is converted into utf-8 as
-# the output being redirected, causing the values to be incorrect.
-# TODO: use a builtin version of printf
+## On z/OS, ebcdic output from printf is converted into utf-8 as
+## the output being redirected, causing the values to be incorrect.
+## TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 ## Add [namesz, descsz, type, name, desc] for a build id.
diff --git a/llvm/test/tools/llvm-strings/stdin.test b/llvm/test/tools/llvm-strings/stdin.test
index f322f37f900e4..f9b9913bd826f 100644
--- a/llvm/test/tools/llvm-strings/stdin.test
+++ b/llvm/test/tools/llvm-strings/stdin.test
@@ -1,8 +1,8 @@
 ## Show that llvm-strings can handle stdin input properly.
 
-# On z/OS, ebcdic output from printf is converted into utf-8 as
-# the output being redirected, causing the values to be incorrect.
-# TODO: use a builtin version of printf
+## On z/OS, ebcdic output from printf is converted into utf-8 as
+## the output being redirected, causing the values to be incorrect.
+## TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 ## Case 1: output with single string.
diff --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test
index 88ec8e03dc20c..7e7bb50c57744 100644
--- a/llvm/test/tools/sanstats/elf.test
+++ b/llvm/test/tools/sanstats/elf.test
@@ -1,6 +1,6 @@
-# On z/OS, ebcdic output from printf is converted into utf-8 as
-# the output being redirected, causing the values to be incorrect.
-# TODO: use a builtin version of printf
+## On z/OS, ebcdic output from printf is converted into utf-8 as
+## the output being redirected, causing the values to be incorrect.
+## TODO: use a builtin version of printf
 # UNSUPPORTED: system-zos
 
 # RUN: yaml2obj %s -o %t1.o

>From e354325acb1726aed9f74b3edf02f9d1b03e477b Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Fri, 22 May 2026 19:19:21 +0000
Subject: [PATCH 4/4] Remove # before UNSUPPORTED.

---
 llvm/test/tools/llvm-cgdata/error.test                 | 2 +-
 llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test | 2 +-
 llvm/test/tools/llvm-strings/stdin.test                | 2 +-
 llvm/test/tools/sanstats/elf.test                      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/llvm/test/tools/llvm-cgdata/error.test b/llvm/test/tools/llvm-cgdata/error.test
index e45bc9a85fa19..d5ccfbb095771 100644
--- a/llvm/test/tools/llvm-cgdata/error.test
+++ b/llvm/test/tools/llvm-cgdata/error.test
@@ -3,7 +3,7 @@
 # On z/OS, ebcdic output from printf is converted into utf-8 as
 # the output being redirected, causing the magic bytes to be incorrect.
 # TODO: use a builtin version of printf
-# UNSUPPORTED: system-zos
+UNSUPPORTED: system-zos
 
 # Synthesize a header only cgdata.
 # struct Header {
diff --git a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
index e31d49cc6bf28..21ca151c478ca 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test
@@ -3,7 +3,7 @@
 ## On z/OS, ebcdic output from printf is converted into utf-8 as
 ## the output being redirected, causing the values to be incorrect.
 ## TODO: use a builtin version of printf
-# UNSUPPORTED: system-zos
+UNSUPPORTED: system-zos
 
 ## Add [namesz, descsz, type, name, desc] for a build id.
 
diff --git a/llvm/test/tools/llvm-strings/stdin.test b/llvm/test/tools/llvm-strings/stdin.test
index f9b9913bd826f..dfc4541394d35 100644
--- a/llvm/test/tools/llvm-strings/stdin.test
+++ b/llvm/test/tools/llvm-strings/stdin.test
@@ -3,7 +3,7 @@
 ## On z/OS, ebcdic output from printf is converted into utf-8 as
 ## the output being redirected, causing the values to be incorrect.
 ## TODO: use a builtin version of printf
-# UNSUPPORTED: system-zos
+UNSUPPORTED: system-zos
 
 ## Case 1: output with single string.
 RUN: printf "abcdefg" | llvm-strings - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
diff --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test
index 7e7bb50c57744..4aa9e1946da0a 100644
--- a/llvm/test/tools/sanstats/elf.test
+++ b/llvm/test/tools/sanstats/elf.test
@@ -1,7 +1,7 @@
 ## On z/OS, ebcdic output from printf is converted into utf-8 as
 ## the output being redirected, causing the values to be incorrect.
 ## TODO: use a builtin version of printf
-# UNSUPPORTED: system-zos
+UNSUPPORTED: system-zos
 
 # RUN: yaml2obj %s -o %t1.o
 # RUN: yaml2obj %s -o %t2.o



More information about the llvm-commits mailing list