<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/80868>80868</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
tools/llvm-readtapi/stubify-simple.test fails when it is disallowed to write into the input directory
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm-tools
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
cyndyishida
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ilya-biryukov
</td>
</tr>
</table>
<pre>
We have noticed our tests don't pass with https://github.com/llvm/llvm-project/commit/7189219ec9fc768f159917052b4b5998d077c39f internally.
We have a stricter setup in which we don't allow to write into arbitrary files during test execution.
It turns out that `stubify-simple.test` actually writes into `.tbd` file during its execution and gets "permission denied" error in our setup.
This happens because if uses a path of the `InterfaceFile` to figure out the output path and it can be empty in some cases.
In particular, if I `assert(!IF->getPath().empty())` to [this line](https://github.com/llvm/llvm-project/blob/7189219ec9fc768f159917052b4b5998d077c39f/llvm/tools/llvm-readtapi/llvm-readtapi.cpp#L204), the test fails upstream as well.
@cyndyishida could you please take a look?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlM2O6zYMhZ9G2RATyHLi2Asv7k8DBOiiiwJdyxIds6NYhkhN6rcv5GQ6vRftYgDDkmWI_A51KMtM1xmxV8evyhi3zn4lnshbZYw6ft_ZLFNMPYXVvgyU1vwa33ZD9Gv_B8Jk3xDmKOTQQ8wJBFkYfJyVOQkslhnuJBNMIgur-osyZ2XOV5IpD3sXb8qcQ3h7H16WFP9EJ8qcXbzdqExOVduZqkPXje7UtGN17LrqpI9mOAzHrmu9Pp1c3Y1As2CabQjrXunvSn9557PAksgJJmCUvADNcJ_ITXDHf1BtCPEOEuGeSLAEi2DTQJJsWmGkgAw-J5qvm0bAv9BloTg_kz3eFwHJaWaIWUAmK6AazZIHGtcXptsScF-2q0aDdZIL7SMjP1KqRu9l8OV_yfmekoQ_MoKdPVxRGJQxC6YbMZdljzOhV8YAphRTkVmOZNP8A-XvEzFMdllwZhjQ2cwINEJmZLCwWJkgjiATFp5LqetoHZ4pYAGTCCNdc8Knym1csjw2FjgScHaGAQFvi6yFhOMNwVlGfqJcZlhsEnI52KTMtwJwKfksMyZRplWmupxfVP3LFeU3K9O21O23kI95eR5A6vhViqpAM6rjd2XaTztuCHH4hN8-4kiMgd_jJbRe7EI_f-_dsihT_2r0YQP_thVus9JoKTDkhSWhvYFluGMIP5yYOuh_dSa4mIOHNWZYAlpGEPtafB5ifFX1eef72nd1Z3fYVyd9MnURtZt6XXVe-2YYHBoc66H1Dg-HzrZNq3Xtmx31RpuDNrqpmrrW3d42FdZo9dFXWJ9qrQ4ab5bCvojbx3TdEXPGvtVt0-6CHTDw8yrZ5D9rs90kqd-WhnxlddCBWPgjjJAE7P-vlP_RQs-y3Seci9-IwRNvXYz-pz4ulaa5ONRTQicxrbucQv9pi2xaC98m9-8AAAD___dNurw">