[clang] [clang-repl][AIX][zOS] Disable clang/test/Interpreter tests on AIX and zOS (NFC) (PR #153587)
Kelvin Li via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 15 14:32:49 PDT 2025
https://github.com/kkwli updated https://github.com/llvm/llvm-project/pull/153587
>From 7111f28e42915b6a14cf03afd3a2edde0fe54b28 Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Tue, 12 Aug 2025 13:59:26 -0400
Subject: [PATCH 1/2] [clang-repl][AIX][zOS] Disable clang/test/Interpreter
tests on AIX and zOS (NFC)
---
clang/test/Interpreter/assignment-with-implicit-ctor.cpp | 1 -
clang/test/Interpreter/bad_percent_command.cpp | 1 -
clang/test/Interpreter/code-undo.cpp | 1 -
clang/test/Interpreter/const.cpp | 1 -
clang/test/Interpreter/cxx20-modules.cppm | 1 -
clang/test/Interpreter/dynamic-library-bad-args.cpp | 1 -
clang/test/Interpreter/execute-stmts.cpp | 1 -
clang/test/Interpreter/execute-weak.cpp | 2 +-
clang/test/Interpreter/execute.c | 1 -
clang/test/Interpreter/execute.cpp | 2 --
clang/test/Interpreter/fail.cpp | 1 -
clang/test/Interpreter/global-dtor.cpp | 3 +--
clang/test/Interpreter/help.cpp | 1 -
clang/test/Interpreter/incremental-mode.cpp | 2 --
clang/test/Interpreter/inline-asm.cpp | 1 -
clang/test/Interpreter/inline-virtual.cpp | 1 -
clang/test/Interpreter/lambda.cpp | 3 +--
clang/test/Interpreter/lit.local.cfg | 5 ++++-
clang/test/Interpreter/multiline.cpp | 1 -
clang/test/Interpreter/pretty-print.c | 1 -
clang/test/Interpreter/pretty-print.cpp | 2 +-
clang/test/Interpreter/simple-exception.cpp | 1 -
22 files changed, 8 insertions(+), 26 deletions(-)
diff --git a/clang/test/Interpreter/assignment-with-implicit-ctor.cpp b/clang/test/Interpreter/assignment-with-implicit-ctor.cpp
index 24cea8ec1a4b2..cef568c78663e 100644
--- a/clang/test/Interpreter/assignment-with-implicit-ctor.cpp
+++ b/clang/test/Interpreter/assignment-with-implicit-ctor.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
//
// RUN: cat %s | clang-repl | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s
diff --git a/clang/test/Interpreter/bad_percent_command.cpp b/clang/test/Interpreter/bad_percent_command.cpp
index 95bebeab58d37..207570cac1873 100644
--- a/clang/test/Interpreter/bad_percent_command.cpp
+++ b/clang/test/Interpreter/bad_percent_command.cpp
@@ -1,4 +1,3 @@
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl 2>&1 | FileCheck %s
%foobar
// CHECK: Invalid % command "%foobar", use "%help" to list commands
diff --git a/clang/test/Interpreter/code-undo.cpp b/clang/test/Interpreter/code-undo.cpp
index 83ade0ec9158b..4516910ca3b4f 100644
--- a/clang/test/Interpreter/code-undo.cpp
+++ b/clang/test/Interpreter/code-undo.cpp
@@ -1,4 +1,3 @@
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl | FileCheck %s
extern "C" int printf(const char *, ...);
int x1 = 0;
diff --git a/clang/test/Interpreter/const.cpp b/clang/test/Interpreter/const.cpp
index 52be75e09ade7..cadd446b7504f 100644
--- a/clang/test/Interpreter/const.cpp
+++ b/clang/test/Interpreter/const.cpp
@@ -1,4 +1,3 @@
-// UNSUPPORTED: system-aix, system-zos
// see https://github.com/llvm/llvm-project/issues/68092
// XFAIL: host={{.*}}-windows-msvc
diff --git a/clang/test/Interpreter/cxx20-modules.cppm b/clang/test/Interpreter/cxx20-modules.cppm
index 4e56e2fc1528a..97744e3b25f77 100644
--- a/clang/test/Interpreter/cxx20-modules.cppm
+++ b/clang/test/Interpreter/cxx20-modules.cppm
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit, x86_64-linux
-// UNSUPPORTED: system-aix
//
// RUN: rm -rf %t
// RUN: mkdir -p %t
diff --git a/clang/test/Interpreter/dynamic-library-bad-args.cpp b/clang/test/Interpreter/dynamic-library-bad-args.cpp
index 7684a8b746c91..f48a2657beacc 100644
--- a/clang/test/Interpreter/dynamic-library-bad-args.cpp
+++ b/clang/test/Interpreter/dynamic-library-bad-args.cpp
@@ -1,4 +1,3 @@
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl 2>&1 | FileCheck %s
%lib
// CHECK: %lib expects 1 argument: the path to a dynamic library
diff --git a/clang/test/Interpreter/execute-stmts.cpp b/clang/test/Interpreter/execute-stmts.cpp
index 433c6811777da..cc27fa615f716 100644
--- a/clang/test/Interpreter/execute-stmts.cpp
+++ b/clang/test/Interpreter/execute-stmts.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl -Xcc -Xclang -Xcc -verify | FileCheck %s
// RUN: %clang_cc1 -verify -fincremental-extensions -emit-llvm -o - %s \
// RUN: | FileCheck --check-prefix=CODEGEN-CHECK %s
diff --git a/clang/test/Interpreter/execute-weak.cpp b/clang/test/Interpreter/execute-weak.cpp
index 85fa5d276f5f4..f469451f5e5e4 100644
--- a/clang/test/Interpreter/execute-weak.cpp
+++ b/clang/test/Interpreter/execute-weak.cpp
@@ -1,4 +1,4 @@
-// UNSUPPORTED: system-aix, system-windows
+// UNSUPPORTED: system-windows
// RUN: cat %s | clang-repl | FileCheck %s
extern "C" int printf(const char *, ...);
diff --git a/clang/test/Interpreter/execute.c b/clang/test/Interpreter/execute.c
index 44a3a32c93011..ca8f83cf6e374 100644
--- a/clang/test/Interpreter/execute.c
+++ b/clang/test/Interpreter/execute.c
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl -Xcc -xc -Xcc -Xclang -Xcc -verify | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -xc -Xcc -O2 -Xcc -Xclang -Xcc -verify| FileCheck %s
diff --git a/clang/test/Interpreter/execute.cpp b/clang/test/Interpreter/execute.cpp
index 534a54ed94fba..82cd70a93980a 100644
--- a/clang/test/Interpreter/execute.cpp
+++ b/clang/test/Interpreter/execute.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: system-aix
-
// clang-format off
// RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
// RUN: 'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
diff --git a/clang/test/Interpreter/fail.cpp b/clang/test/Interpreter/fail.cpp
index 4963df8c54a49..d92debc253542 100644
--- a/clang/test/Interpreter/fail.cpp
+++ b/clang/test/Interpreter/fail.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
// clang-repl can be called from the prompt in non-interactive mode as a
// calculator in shell scripts, for example. In that case if there is an error
// we should set the exit code as failure.
diff --git a/clang/test/Interpreter/global-dtor.cpp b/clang/test/Interpreter/global-dtor.cpp
index 1f241d9f19317..9cb454b06c171 100644
--- a/clang/test/Interpreter/global-dtor.cpp
+++ b/clang/test/Interpreter/global-dtor.cpp
@@ -1,5 +1,4 @@
// clang-format off
-// UNSUPPORTED: system-aix
//
// Tests that a global destructor is ran on platforms with gnu exception support.
//
@@ -10,4 +9,4 @@ extern "C" int printf(const char *, ...);
struct D { float f = 1.0; D *m = nullptr; D(){} ~D() { printf("D[f=%f, m=0x%llx]\n", f, reinterpret_cast<unsigned long long>(m)); }} d;
// CHECK: D[f=1.000000, m=0x0]
-%quit
\ No newline at end of file
+%quit
diff --git a/clang/test/Interpreter/help.cpp b/clang/test/Interpreter/help.cpp
index 5573fb4284c65..70f114f4644e3 100644
--- a/clang/test/Interpreter/help.cpp
+++ b/clang/test/Interpreter/help.cpp
@@ -1,4 +1,3 @@
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl | FileCheck %s
%help
// CHECK: %help list clang-repl %commands
diff --git a/clang/test/Interpreter/incremental-mode.cpp b/clang/test/Interpreter/incremental-mode.cpp
index 71ff794872b21..d63cee0dd6d15 100644
--- a/clang/test/Interpreter/incremental-mode.cpp
+++ b/clang/test/Interpreter/incremental-mode.cpp
@@ -1,5 +1,3 @@
-// UNSUPPORTED: system-aix
-//
// RUN: clang-repl -Xcc -E
// RUN: clang-repl -Xcc -emit-llvm
// RUN: clang-repl -Xcc -xc
diff --git a/clang/test/Interpreter/inline-asm.cpp b/clang/test/Interpreter/inline-asm.cpp
index f94f14df72f80..6d071b1ef207d 100644
--- a/clang/test/Interpreter/inline-asm.cpp
+++ b/clang/test/Interpreter/inline-asm.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit, x86_64-linux
-// UNSUPPORTED: system-aix
//
// RUN: rm -rf %t
// RUN: mkdir -p %t
diff --git a/clang/test/Interpreter/inline-virtual.cpp b/clang/test/Interpreter/inline-virtual.cpp
index c9e85683d3cd0..3790c110af09d 100644
--- a/clang/test/Interpreter/inline-virtual.cpp
+++ b/clang/test/Interpreter/inline-virtual.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
//
// This test is flaky with ASan: https://github.com/llvm/llvm-project/issues/135401
// UNSUPPORTED: asan
diff --git a/clang/test/Interpreter/lambda.cpp b/clang/test/Interpreter/lambda.cpp
index db8c9db9b3442..e6941087e9470 100644
--- a/clang/test/Interpreter/lambda.cpp
+++ b/clang/test/Interpreter/lambda.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl | FileCheck %s
// At -O2, somehow "x = 42" appears first when piped into FileCheck,
// see https://github.com/llvm/llvm-project/issues/143547.
@@ -27,4 +26,4 @@ auto capture = [&]() { return x * 2; };
printf("x = %d\n", x);
// CHECK: x = 42
-%quit
\ No newline at end of file
+%quit
diff --git a/clang/test/Interpreter/lit.local.cfg b/clang/test/Interpreter/lit.local.cfg
index ac6d2205e9fcd..25495bb0762bb 100644
--- a/clang/test/Interpreter/lit.local.cfg
+++ b/clang/test/Interpreter/lit.local.cfg
@@ -1,2 +1,5 @@
-if "host-supports-jit" not in config.available_features:
+import sys
+
+# clang-repl is not supported on AIX and zOS
+if "host-supports-jit" not in config.available_features or sys.platform == "aix" or sys.platform == "zos":
config.unsupported = True
diff --git a/clang/test/Interpreter/multiline.cpp b/clang/test/Interpreter/multiline.cpp
index 0f5ef48417f13..a9f1455fc94a5 100644
--- a/clang/test/Interpreter/multiline.cpp
+++ b/clang/test/Interpreter/multiline.cpp
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl -Xcc -Xclang -Xcc -verify | FileCheck %s
// expected-no-diagnostics
diff --git a/clang/test/Interpreter/pretty-print.c b/clang/test/Interpreter/pretty-print.c
index e1408c035a164..588df70e33e84 100644
--- a/clang/test/Interpreter/pretty-print.c
+++ b/clang/test/Interpreter/pretty-print.c
@@ -1,5 +1,4 @@
// REQUIRES: host-supports-jit
-// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl -Xcc -xc | FileCheck %s
// RUN: cat %s | clang-repl -Xcc -std=c++11 | FileCheck %s
diff --git a/clang/test/Interpreter/pretty-print.cpp b/clang/test/Interpreter/pretty-print.cpp
index e1036ab87df95..bad71cdd48f0b 100644
--- a/clang/test/Interpreter/pretty-print.cpp
+++ b/clang/test/Interpreter/pretty-print.cpp
@@ -1,7 +1,7 @@
// RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
// RUN: 'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
// The test is flaky with asan https://github.com/llvm/llvm-project/pull/148701.
-// UNSUPPORTED: system-aix, asan
+// UNSUPPORTED: asan
// CHECK-DRIVER: i = 10
// RUN: cat %s | clang-repl -Xcc -std=c++11 -Xcc -fno-delayed-template-parsing | FileCheck %s
extern "C" int printf(const char*,...);
diff --git a/clang/test/Interpreter/simple-exception.cpp b/clang/test/Interpreter/simple-exception.cpp
index 8f7b515c142b0..2d43f807d7b92 100644
--- a/clang/test/Interpreter/simple-exception.cpp
+++ b/clang/test/Interpreter/simple-exception.cpp
@@ -1,5 +1,4 @@
// clang-format off
-// UNSUPPORTED: system-aix
// XFAIL for arm, or running on Windows.
// XFAIL: target=arm-{{.*}}, target=armv{{.*}}, system-windows, system-cygwin
// RUN: cat %s | clang-repl | FileCheck %s
>From df15ed4437ee354a5471b491b70e93e845e60cfe Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Fri, 15 Aug 2025 17:28:18 -0400
Subject: [PATCH 2/2] check config.available_features instead
---
clang/test/Interpreter/lit.local.cfg | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/clang/test/Interpreter/lit.local.cfg b/clang/test/Interpreter/lit.local.cfg
index 25495bb0762bb..37af5129d4eee 100644
--- a/clang/test/Interpreter/lit.local.cfg
+++ b/clang/test/Interpreter/lit.local.cfg
@@ -1,5 +1,6 @@
-import sys
-
# clang-repl is not supported on AIX and zOS
-if "host-supports-jit" not in config.available_features or sys.platform == "aix" or sys.platform == "zos":
+unsupported_platforms = [ "system-aix", "system-zos" ]
+
+if "host-supports-jit" not in config.available_features or \
+ any(up in config.available_features for up in unsupported_platforms):
config.unsupported = True
More information about the cfe-commits
mailing list