<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57430>57430</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            instrprof-merging.cpp test is unreliable on Windows
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zmodem
      </td>
    </tr>
</table>

<pre>
    After 992e10a3fce4 enabled the test in the "runtimes" build, the test is failing in Chromium's builds, see below.

It's not clear what the failure is due to; sometimes changing the name of the build dir helped, sometimes not.

It's also been failing before, e.g. the same test fails in the same way in Issue 47103.

I don't have any reliable reproduction steps, because right now it insists on passing on my machine (yesterday it insisted on failing, with the same build steps).

```
FAIL: Profile-x86_64 :: instrprof-merging.cpp (60403 of 63143)
 ******************** TEST 'Profile-x86_64 :: instrprof-merging.cpp' FAILED ********************
 Script:
 --
 : 'RUN: at line 3';      C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang.exe    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   -Wl,-incremental:no  -fprofile-instr-generate -std=c++14 -fcoverage-mapping C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -c -o C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o                   -D_VERSION_1
 : 'RUN: at line 5';      C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang.exe    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   -Wl,-incremental:no  -fprofile-instr-generate -std=c++14 -fcoverage-mapping C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -c -o C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o                   -D_VERSION_2
 : 'RUN: at line 7';      C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang.exe    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   -Wl,-incremental:no  -fprofile-instr-generate -std=c++14 -fcoverage-mapping C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o                   -o C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.exe
 : 'RUN: at line 12';   env LLVM_PROFILE_FILE=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profraw  C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.exe
 : 'RUN: at line 13';   llvm-profdata merge C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profraw -o C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata
 : 'RUN: at line 17';   llvm-cov show C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o -instr-profile=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata | FileCheck C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -check-prefixes=V1,V1-ONLY
 : 'RUN: at line 18';   llvm-cov show C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o -instr-profile=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata | FileCheck C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -check-prefixes=V2,V2-ONLY
 : 'RUN: at line 19';   llvm-cov show C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o -object C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o -instr-profile=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata | FileCheck C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -check-prefixes=V1,V2
 : 'RUN: at line 20';   llvm-cov show C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.exe -instr-profile=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata | FileCheck C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -check-prefixes=V1,V2
 --
 Exit Code: 2
 
 Command Output (stdout):
 --
 $ ":" "RUN: at line 3"
 $ "C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang.exe" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-Wl,-incremental:no" "-fprofile-instr-generate" "-std=c++14" "-fcoverage-mapping" "C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp" "-c" "-o" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o" "-D_VERSION_1"
 # command stderr:
 clang: warning: -Wl,-incremental:no: 'linker' input unused [-Wunused-command-line-argument]
 
 $ ":" "RUN: at line 5"
 $ "C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang.exe" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-Wl,-incremental:no" "-fprofile-instr-generate" "-std=c++14" "-fcoverage-mapping" "C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp" "-c" "-o" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o" "-D_VERSION_2"
 # command stderr:
 clang: warning: -Wl,-incremental:no: 'linker' input unused [-Wunused-command-line-argument]
 
 $ ":" "RUN: at line 7"
 $ "C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/./bin/clang.exe" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-Wl,-incremental:no" "-fprofile-instr-generate" "-std=c++14" "-fcoverage-mapping" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o" "-o" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.exe"
 $ ":" "RUN: at line 12"
 $ "env" "LLVM_PROFILE_FILE=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profraw" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.exe"
 $ ":" "RUN: at line 13"
 $ "llvm-profdata" "merge" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profraw" "-o" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata"
 $ ":" "RUN: at line 17"
 $ "llvm-cov" "show" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v1.o" "-instr-profile=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata"
 $ "FileCheck" "C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp" "-check-prefixes=V1,V1-ONLY"
 $ ":" "RUN: at line 18"
 $ "llvm-cov" "show" "C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o" "-instr-profile=C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.profdata"
 # command stderr:
 error: Failed to load coverage: 'C:\b\s\w\ir\cache\builder\src\third_party\llvm-bootstrap\runtimes\runtimes-bins\compiler-rt\test\profile\Profile-x86_64\Output\instrprof-merging.cpp.tmp.v2.o': Malformed coverage data

 
 error: command failed with exit status: 1
 $ "FileCheck" "C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp" "-check-prefixes=V2,V2-ONLY"
 # command stderr:
 FileCheck error: '<stdin>' is empty.
 FileCheck command line:  filecheck.exe C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\test\profile\instrprof-merging.cpp -check-prefixes=V2,V2-ONLY
 
 error: command failed with exit status: 2
 
 --
 
 ********************
 
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
 ********************
 Failed Tests (1):
   Profile-x86_64 :: instrprof-merging.cpp
 
 
 Testing Time: 260.29s
   Skipped          :    91
   Unsupported      : 25847
   Passed           : 56863
   Expectedly Failed:    98
   Failed           :     1
 
 1 warning(s) in tests
 FAILED: CMakeFiles/check-all C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/CMakeFiles/check-all
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztW1tv4joQ_jXwYgURhyTwwEOXttJKe9NedZ4qJxkgZ5M4sp1Szq8_M84FKLTbPdujLiwIjBOP5_qNk0ySSCbr6cXcgGKTCQd3KLx5DCMGhYgySJhZAjOgDUsL2-9xrqrCpDlo7LKoSrOkx2dbdJrNRZqlxYKmzJZK5mmV93ioa2JN1BqARZDJ1aA3vOwNL-r2tbFkhTQszkAotloKYzkTx0oBMU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