This is an archive of the discontinued LLVM Phabricator instance.

Update missing_pdb.test input binary to point to a more likely non-removable media path
ClosedPublic

Authored by dyung on Dec 7 2020, 2:08 PM.

Details

Summary

The test llvm/test/tools/llvm-symbolizer/pdb/missing_pdb.test recently started failing on our internal build bots, and I tracked down the issue to the path of the "missing" pdb that the test is looking for. The test has llvm-symbolizer searching for the pdb at "D:\src\llvm\build\missing_pdb.pdb". The file does not exist and the lookup should fail, and the test checks for the expected error message "No such file or directory". The problem is that when D:\ is mapped to a removable media drive such as a DVD drive as on our build machine, the error returned instead is "resource unavailable try again" causing the test to fail.

Since the source for the test is unavailable, I am fixing this by modifying the path in the executable to be "C:\" instead of "D:\". The problem could still occur if C:\ is mapped to a removable media drive on Windows, but I feel the problem is going to rare since it has been the Windows default to install itself on to the C:\ drive which must be a hard drive.

Since the change is a binary change (and literally only 1 bit), I did a hex dump before and after my change for the review:

$ diff original.txt new.txt 
403c403
< 00057c0 7d77 7e04 0001 0000 3a44 735c 6372 6c5c
---
> 00057c0 7d77 7e04 0001 0000 3a43 735c 6372 6c5c

You can see the one bit change from 44 to 43, which corresponds to the hexadecimal number for the ASCII 'D' and 'C' characters respectively.

Let me know if there are any objections to this fix.

Diff Detail

Event Timeline

dyung created this revision.Dec 7 2020, 2:08 PM
dyung requested review of this revision.Dec 7 2020, 2:08 PM
dyung edited the summary of this revision. (Show Details)Dec 7 2020, 2:09 PM
rnk accepted this revision.Dec 7 2020, 3:41 PM

lgtm

Sorry about that.

This revision is now accepted and ready to land.Dec 7 2020, 3:41 PM
This revision was landed with ongoing or failed builds.Dec 7 2020, 4:44 PM
This revision was automatically updated to reflect the committed changes.