clang/test/Driver/msvc-link.c: DEBUG-LINK-NOT: lld can spuriously fail when lit's random scratch-dir name contains "lld"
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Found in: https://lab.llvm.org/buildbot/#/builders/214/builds/3902 (clang-riscv-x60-mrvv-vec-bits-2stage)
Root cause: `DEBUG-LINK-NOT: lld` (msvc-link.c:66) is a bare, unanchored
substring search. lit's randomly generated per-invocation scratch directory
name (`lit-tmp-XXXXXXXX`) happened to be `lit-tmp-29klldxo` on this run --
which contains the literal substring "lld" -- so the check fired even
though the actual linker invoked was link.exe, not lld.
Reproduce:
FileCheck --check-prefix=DEBUG-LINK <(echo '// DEBUG-LINK-NOT: lld') <<< '"link.exe" "/tmp/lit-tmp-29klldxo/a.o"'
Contributor guide
Research direction
Inspect clang/test/Driver/msvc-link.c at the DEBUG-LINK-NOT check around line 66. Reproduce the failure with the provided FileCheck command and a scratch path containing "lld". Done means the test still rejects an actual lld invocation but no longer fails when "lld" appears only in the scratch-directory name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers, testing-qa
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100