Skip to content

Conversation

@playstation-edd
Copy link
Contributor

A regex used in a negative check had an unintended match with the pseudo-random part of the temporary directory created by a lit run on the SIE buildbot, causing a spurious test failure:

https://lab.llvm.org/buildbot/#/builders/144/builds/29507

// CHECK-NO-CRT-NOT: crt{{[^"]*}}.o"
                     ^
<stdin>:7:224: note: found here
[...] "/tmp/lit-tmp-vcrtn3vi/ps5-linker-ee5f76.o" "-r"
                     !~~~~~~~~~~~~~~~~~~~~~~~~~~

The updated check avoids such accidental matches.

A regex used in a negative check had an unintended match with the
pseudo-random part of the temporary directory created by a lit run on
the SIE buildbot, causing a spurious test failure:

https://lab.llvm.org/buildbot/#/builders/144/builds/29507

    // CHECK-NO-CRT-NOT: crt{{[^"]*}}.o"
                         ^
    <stdin>:7:224: note: found here
    [...] "/tmp/lit-tmp-vcrtn3vi/ps5-linker-ee5f76.o" "-r"
                         !~~~~~~~~~~~~~~~~~~~~~~~~~~

The updated check avoids such accidental matches.
@playstation-edd playstation-edd requested review from dyung and jmorse July 8, 2025 08:35
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jul 8, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 8, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Edd Dawson (playstation-edd)

Changes

A regex used in a negative check had an unintended match with the pseudo-random part of the temporary directory created by a lit run on the SIE buildbot, causing a spurious test failure:

https://lab.llvm.org/buildbot/#/builders/144/builds/29507

// CHECK-NO-CRT-NOT: crt{{[^"]*}}.o"
                     ^
&lt;stdin&gt;:7:224: note: found here
[...] "/tmp/lit-tmp-vcrtn3vi/ps5-linker-ee5f76.o" "-r"
                     !~~~~~~~~~~~~~~~~~~~~~~~~~~

The updated check avoids such accidental matches.


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

1 Files Affected:

  • (modified) clang/test/Driver/ps5-linker.c (+1-1)
diff --git a/clang/test/Driver/ps5-linker.c b/clang/test/Driver/ps5-linker.c
index 753085d2e1b0b..16c9967bc2b41 100644
--- a/clang/test/Driver/ps5-linker.c
+++ b/clang/test/Driver/ps5-linker.c
@@ -165,7 +165,7 @@
 // CHECK-SHARED-CRT-SAME: "-l:crtendS.o" "-l:crtn.o"
 // CHECK-STATIC-CRT-SAME: "-l:crtend.o" "-l:crtn.o"
 
-// CHECK-NO-CRT-NOT: crt{{[^"]*}}.o"
+// CHECK-NO-CRT-NOT: "-l:crt
 // CHECK-NO-LIBS-NOT: "-l{{[^"]*}}"
 
 // Test the driver's control over the -fcrash-diagnostics-dir behavior with linker flags.

Copy link
Member

@jmorse jmorse left a comment

Choose a reason for hiding this comment

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

LGTM

@playstation-edd playstation-edd merged commit c6776bb into llvm:main Jul 8, 2025
12 checks passed
@playstation-edd playstation-edd deleted the ps5-driver-test-fix-bad-match branch July 8, 2025 10:06
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.

3 participants