[llvm-branch-commits] [clang] bb8f8ed - [clang][ClangScanDeps] Match pcm file names in logging-two-threads.c (#234319)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Oct 22 09:48:05 PDT 2026
Author: Qiongsi Wu
Date: 2026-10-22T08:58:41-07:00
New Revision: bb8f8edf8a471134a0ebb160fd4a974da0918b04
URL: https://github.com/llvm/llvm-project/commit/bb8f8edf8a471134a0ebb160fd4a974da0918b04
DIFF: https://github.com/llvm/llvm-project/commit/bb8f8edf8a471134a0ebb160fd4a974da0918b04.diff
LOG: [clang][ClangScanDeps] Match pcm file names in logging-two-threads.c (#234319)
The test's patterns for A's and B's pcms were too coarse: they match any
line whose path contains `A-` or `B-`, not just the pcm files. Some CI
environments have such paths, and there the TSA count (added in
0db95253f939, #210587) also counts B's line, and fails when both threads
validate A.
This PR matches the modules by their pcm file names (e.g.
"/A-<hash>.pcm").
rdar://190466150
Assisted-by: Claude Opus 5.5
Added:
Modified:
clang/test/ClangScanDeps/logging-two-threads.c
Removed:
################################################################################
diff --git a/clang/test/ClangScanDeps/logging-two-threads.c b/clang/test/ClangScanDeps/logging-two-threads.c
index e3173deaddcf65..904c12e9e3c5ad 100644
--- a/clang/test/ClangScanDeps/logging-two-threads.c
+++ b/clang/test/ClangScanDeps/logging-two-threads.c
@@ -31,31 +31,33 @@
// before either records it, so each may validate and record it: A's timestamp
// is written once or twice. B (imported by a single TU) is always written once.
// The per-module ordering is checked by ASEQ/BSEQ below.
-// RUN: grep -c "timestamp_write:.*A-" %t/scan.log | FileCheck %s --check-prefix=TSA
-// RUN: grep -c "timestamp_write:.*B-" %t/scan.log | FileCheck %s --check-prefix=TSB
+// RUN: grep -c "timestamp_write:.*/A-[^/]*\.pcm" %t/scan.log \
+// RUN: | FileCheck %s --check-prefix=TSA
+// RUN: grep -c "timestamp_write:.*/B-[^/]*\.pcm" %t/scan.log \
+// RUN: | FileCheck %s --check-prefix=TSB
// TSA: {{^[12]$}}
// TSB: {{^1$}}
// Verify A's pcm is written before B's pcm.
// RUN: grep "pcm_write:" %t/scan.log | FileCheck %s --check-prefix=WRITEORDER
-// WRITEORDER: pcm_write: {{.*}}A-{{.*}}.pcm
-// WRITEORDER-NEXT: pcm_write: {{.*}}B-{{.*}}.pcm
+// WRITEORDER: pcm_write: {{.*}}/A-{{[^/]*}}.pcm
+// WRITEORDER-NEXT: pcm_write: {{.*}}/B-{{[^/]*}}.pcm
// Check the correct sequence for building module A.
-// RUN: grep "A-" %t/scan.log | FileCheck %s --check-prefix=ASEQ
-// ASEQ: timestamp_read: {{.*}}A-{{.*}}.pcm
-// ASEQ: pcm_write: {{.*}}A-{{.*}}.pcm
-// ASEQ: timestamp_write: {{.*}}A-{{.*}}.pcm
-// ASEQ: pcm_add_built: {{.*}}A-{{.*}}.pcm
-// ASEQ: pcm_finalized: {{.*}}A-{{.*}}.pcm
+// RUN: grep "/A-[^/]*\.pcm" %t/scan.log | FileCheck %s --check-prefix=ASEQ
+// ASEQ: timestamp_read: {{.*}}/A-{{[^/]*}}.pcm
+// ASEQ: pcm_write: {{.*}}/A-{{[^/]*}}.pcm
+// ASEQ: timestamp_write: {{.*}}/A-{{[^/]*}}.pcm
+// ASEQ: pcm_add_built: {{.*}}/A-{{[^/]*}}.pcm
+// ASEQ: pcm_finalized: {{.*}}/A-{{[^/]*}}.pcm
// Check the correct sequence for building module B.
-// RUN: grep "B-" %t/scan.log | FileCheck %s --check-prefix=BSEQ
-// BSEQ: timestamp_read: {{.*}}B-{{.*}}.pcm
-// BSEQ: pcm_write: {{.*}}B-{{.*}}.pcm
-// BSEQ: timestamp_write: {{.*}}B-{{.*}}.pcm
-// BSEQ: pcm_add_built: {{.*}}B-{{.*}}.pcm
-// BSEQ: pcm_finalized: {{.*}}B-{{.*}}.pcm
+// RUN: grep "/B-[^/]*\.pcm" %t/scan.log | FileCheck %s --check-prefix=BSEQ
+// BSEQ: timestamp_read: {{.*}}/B-{{[^/]*}}.pcm
+// BSEQ: pcm_write: {{.*}}/B-{{[^/]*}}.pcm
+// BSEQ: timestamp_write: {{.*}}/B-{{[^/]*}}.pcm
+// BSEQ: pcm_add_built: {{.*}}/B-{{[^/]*}}.pcm
+// BSEQ: pcm_finalized: {{.*}}/B-{{[^/]*}}.pcm
//--- cdb.json.template
[{
More information about the llvm-branch-commits
mailing list