Skip to content

Mark tests as unsupported when targeting z/OS #107916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

perry-ca
Copy link
Contributor

@perry-ca perry-ca commented Sep 9, 2024

Set up these tests so these are marked as unsupported when targeting z/OS. Most would already be unsupported if you ran lit on z/OS. However, they also need to be unsupported if the default triple is z/OS.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang:openmp OpenMP related changes to Clang labels Sep 9, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 9, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Sean Perry (perry-ca)

Changes

Set up these tests so these are marked as unsupported when targeting z/OS. Most would already be unsupported if you ran lit on z/OS. However, they also need to be unsupported if the default triple is z/OS.


Full diff: https://github.com/llvm/llvm-project/pull/107916.diff

6 Files Affected:

  • (modified) clang/test/Analysis/ctu-on-demand-parsing.c (+1)
  • (modified) clang/test/Analysis/ctu-on-demand-parsing.cpp (+1)
  • (modified) clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm (+3-2)
  • (modified) clang/test/Driver/hipstdpar.c (+1)
  • (modified) clang/test/Driver/lld-repro.c (+1-1)
  • (modified) clang/test/OpenMP/lit.local.cfg (+4)
diff --git a/clang/test/Analysis/ctu-on-demand-parsing.c b/clang/test/Analysis/ctu-on-demand-parsing.c
index 72288def61b13e..17ade150ded5e3 100644
--- a/clang/test/Analysis/ctu-on-demand-parsing.c
+++ b/clang/test/Analysis/ctu-on-demand-parsing.c
@@ -24,6 +24,7 @@
 //
 // FIXME: Path handling should work on all platforms.
 // REQUIRES: system-linux
+// UNSUPPORTED: target={{.*}}-zos{{.*}}
 
 void clang_analyzer_eval(int);
 
diff --git a/clang/test/Analysis/ctu-on-demand-parsing.cpp b/clang/test/Analysis/ctu-on-demand-parsing.cpp
index d28d3c22c69b07..0c0128faefaead 100644
--- a/clang/test/Analysis/ctu-on-demand-parsing.cpp
+++ b/clang/test/Analysis/ctu-on-demand-parsing.cpp
@@ -35,6 +35,7 @@
 //
 // FIXME: Path handling should work on all platforms.
 // REQUIRES: system-linux
+// UNSUPPORTED: target={{.*}}-zos{{.*}}
 
 #include "ctu-hdr.h"
 
diff --git a/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm b/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm
index 9956348f87ff4e..ad5a3e14a81dbe 100644
--- a/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm
+++ b/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm
@@ -1,9 +1,10 @@
 // https://github.com/llvm/llvm-project/issues/59765
 // FIXME: Since the signature of the constructors/destructors is
 // different in different targets. The current CHECK can't work
-// well when targeting or running on AIX and z/OS.
+// well when targeting AIX and z/OS.
 // It would be better to add the corresponding test for other test.
-// UNSUPPORTED: system-zos, system-aix
+// UNSUPPORTED: system-aix
+// UNSUPPORTED: target={{.*}}-zos{{.*}}
 //
 // RUN: rm -rf %t
 // RUN: mkdir %t
diff --git a/clang/test/Driver/hipstdpar.c b/clang/test/Driver/hipstdpar.c
index 2f48bf6b5cf1eb..32e040ef70d754 100644
--- a/clang/test/Driver/hipstdpar.c
+++ b/clang/test/Driver/hipstdpar.c
@@ -1,6 +1,7 @@
 // REQUIRES: x86-registered-target
 // REQUIRES: amdgpu-registered-target
 // REQUIRES: system-linux
+// UNSUPPORTED: target={{.*}}-zos{{.*}}
 // XFAIL: target={{.*}}hexagon{{.*}}
 // XFAIL: target={{.*}}-scei{{.*}}
 // XFAIL: target={{.*}}-sie{{.*}}
diff --git a/clang/test/Driver/lld-repro.c b/clang/test/Driver/lld-repro.c
index 61904c0e6df306..0e6340865b7382 100644
--- a/clang/test/Driver/lld-repro.c
+++ b/clang/test/Driver/lld-repro.c
@@ -1,5 +1,5 @@
 // REQUIRES: lld
-// UNSUPPORTED: target={{.*-(ps4|ps5)}}
+// UNSUPPORTED: target={{.*-(ps4|ps5)}}, target={{.*}}-zos{{.*}}
 
 // RUN: echo "-nostartfiles -nostdlib -fuse-ld=lld -gen-reproducer=error -fcrash-diagnostics-dir=%t" \
 // RUN:   | sed -e 's/\\/\\\\/g' > %t.rsp
diff --git a/clang/test/OpenMP/lit.local.cfg b/clang/test/OpenMP/lit.local.cfg
index 58ee923cb7ec5b..93adc6734d1a24 100644
--- a/clang/test/OpenMP/lit.local.cfg
+++ b/clang/test/OpenMP/lit.local.cfg
@@ -1,5 +1,9 @@
 # -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
+import re
 from lit.llvm.subst import ToolSubst
 
 fc = ToolSubst("FileCheck", unresolved="fatal")
 config.substitutions.insert(0, (fc.regex, "FileCheck --allow-unused-prefixes"))
+
+if re.match(r".*-zos", config.target_triple):
+    config.unsupported = True

@perry-ca
Copy link
Contributor Author

@abhina-sree could you review this. Thanks

@@ -24,6 +24,7 @@
//
// FIXME: Path handling should work on all platforms.
// REQUIRES: system-linux
// UNSUPPORTED: target={{.*}}-zos{{.*}}
Copy link
Contributor

@abhina-sree abhina-sree Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work instead? I think this testcase won't work for all non-linux targets, same with the other similar testcase

// REQUIRES: system-linux && target={{.*linux.*}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless we can prove that is the case, it is better to stick with the more selective condition. I don't think many people run lit cross target so it would be difficult to validate.

Copy link
Contributor

@abhina-sree abhina-sree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@perry-ca perry-ca merged commit a514457 into llvm:main Sep 25, 2024
12 checks passed
@perry-ca perry-ca deleted the perry/lit-zos-on-lop branch September 25, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang:openmp OpenMP related changes to Clang clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants