[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
Thu May 7 11:52:30 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-binary-utilities
Author: sujianIBM
<details>
<summary>Changes</summary>
Those tests fail on z/OS because printf interprets octal escape sequences as EBCDIC characters and converts them to ASCII, producing incorrect values in the output.
---
Full diff: https://github.com/llvm/llvm-project/pull/196391.diff
18 Files Affected:
- (modified) llvm/test/tools/llvm-cgdata/error.test (+4)
- (modified) llvm/test/tools/llvm-objcopy/ELF/add-invalid-note.test (+4)
- (modified) llvm/test/tools/llvm-profdata/binary-ids-padding.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/insufficient-binary-ids-size.test (+3)
- (modified) llvm/test/tools/llvm-profdata/large-binary-id-size.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/malformed-not-space-for-another-header.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/malformed-num-counters-zero.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/malformed-ptr-to-counter-array.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/misaligned-binary-ids-size.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test (+3)
- (modified) llvm/test/tools/llvm-profdata/raw-32-bits-be.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/raw-32-bits-le.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/raw-64-bits-be.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/raw-64-bits-le.test (+3-1)
- (modified) llvm/test/tools/llvm-profdata/raw-magic-but-no-header.test (+3)
- (modified) llvm/test/tools/llvm-profdata/raw-two-profiles.test (+3-1)
- (modified) llvm/test/tools/llvm-strings/stdin.test (+4)
- (modified) llvm/test/tools/sanstats/elf.test (+4)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/196391
More information about the llvm-commits
mailing list