Skip to content

A more precise matching for the driver test #129611

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
Mar 4, 2025

Conversation

llvm-beanz
Copy link
Collaborator

Maybe this fixes issues detected after #128894

Maybe this fixes issues detected after llvm#128894
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Mar 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 3, 2025

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Chris B (llvm-beanz)

Changes

Maybe this fixes issues detected after #128894


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

1 Files Affected:

  • (modified) clang/test/Driver/hip-gz-options.hip (+3-3)
diff --git a/clang/test/Driver/hip-gz-options.hip b/clang/test/Driver/hip-gz-options.hip
index bdef24e052ffb..36de8e8404020 100644
--- a/clang/test/Driver/hip-gz-options.hip
+++ b/clang/test/Driver/hip-gz-options.hip
@@ -8,7 +8,7 @@
 // RUN:   -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
 // RUN:   -ggdb -gz=zlib 2>&1 | FileCheck %s
 
-// CHECK-DAG: {{".*clang.*" .* "--compress-debug-sections=zlib"}}
-// CHECK-DAG: {{".*lld.*" .* "--compress-debug-sections=zlib"}}
-// CHECK-DAG: {{".*clang.*" .* "--compress-debug-sections=zlib"}}
+// CHECK-DAG: {{".*clang(-[0-9]+)?(.exe)?" .* "--compress-debug-sections=zlib"}}
+// CHECK-DAG: {{".*lld(.exe)?" .* "--compress-debug-sections=zlib"}}
+// CHECK-DAG: {{".*clang(-[0-9]+)?(.exe)?" .* "--compress-debug-sections=zlib"}}
 // CHECK: "--compress-debug-sections=zlib"

@llvm-beanz
Copy link
Collaborator Author

#128894 seems to have caused a problem on the ppc64le bot. I think this fixes it, but this test seems a bit janky to me. I don't really see why the driver's sub-commands would ever be out of order, and the imprecise matches seem flaky.

Not sure if @MaskRay or @yxsamliu have any insights.

@llvm-beanz llvm-beanz merged commit 9ad5156 into llvm:main Mar 4, 2025
14 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 4, 2025

LLVM Buildbot has detected a new failure on builder openmp-s390x-linux running on systemz-1 while building clang at step 6 "test-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/8726

Here is the relevant piece of the build log for the reference
Step 6 (test-openmp) failure: test (failure)
******************** TEST 'libomp :: tasking/issue-94260-2.c' FAILED ********************
Exit Code: -11

Command Output (stdout):
--
# RUN: at line 1
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/./bin/clang -fopenmp   -I /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -I /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test -L /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -fno-omit-frame-pointer -mbackchain -I /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/ompt /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c -o /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp -lm -latomic && /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# executed command: /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/./bin/clang -fopenmp -I /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -I /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test -L /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -fno-omit-frame-pointer -mbackchain -I /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/ompt /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c -o /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp -lm -latomic
# executed command: /home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -11

--

********************


@MaskRay
Copy link
Member

MaskRay commented Mar 18, 2025

#128894 seems to have caused a problem on the ppc64le bot. I think this fixes it, but this test seems a bit janky to me. I don't really see why the driver's sub-commands would ever be out of order, and the imprecise matches seem flaky.

Not sure if @MaskRay or @yxsamliu have any insights.

The issue was likely that the build directory name
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test contains lld.

We usually don't test specific strings like clang-[[#]]. I recall that this broke Google's internal lit tester, where clang becomes a hashed string in a content-addressable storage, unless -no-canonical-prefixes is specified.

Instead, we just check -cc1 (which is a good anchor for the clang -cc1 line)

jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
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 Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants