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

    <tr>
        <th>Summary</th>
        <td>
            Make libc unittests hermetic wrt modifying errno
        </td>
    </tr>

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

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

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

<pre>
    A good number of libc unittests and integration tests set/reset `errno`. Often, it is the app wide `errno` that is modified. This is OK as long as the tests run in their own process. However, on certain platforms, all libc unittests are run in a single process one after the other. If the unittest author misses resetting the `errno` at the right places, then the unittests cease to be hermetic. This tracker  is about making the unittests hermetic wrt `errno`. Once approach we can take is to handout each test its own `errno`. This way, the `errno` modified in one test does not affect the `errno` of another test.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlUs2OmzAQfhq4jIoMBJIcOGxbrVpV1V76AmMYwBtjR7ZJlLfv2Fm0m10JYXk8_ub7sbTDrXuCydoBzLpIcmBH0Er2sBoVAvngAc0AygSaHAZlDdyrnkJWPTviFbJWkHPG8lrAyxjIZNUPUAGUhzAT4PkMVzXQx0Y-wNSw2EGNioYC_s285e_lD6AHbc0U1whwH-lWw0RiQTHPq4Gzsz15X8Ave6ULuTiVCfbkAnLjWWMYrVt8rKPWX4Q52jARvDKTpg2SYZg2K3FpvuWfK-D3mHYbAuAaZutgUd4T04teBIZJTR-lstBYcmqaQ2TFEyIlrpkHQM_U0bNcC5KARy4UVP9mTHDYn5hPdAilXQMseNqmvSNst-DqPgdj-hSFs9jPcCXokcfjiVJMFmYOOsJSPE76FONFnx9gEpkr3t4UPAjdsoyWRgcTymDZHGPZrnGkPny5xC8OTXI49Rc5dWXbHg_7_a4p86Grh2N9xDyooKn7G_l-yvFBcqJwi76kAfnqdDeHcPZZ_cQPlr9JhXmVRW8X3mh92ZZv7MwrE-QtB7rGjJ6bY7Vv87kTzf4oUMpR9LIWFcmybA9YVgM1fb07ilyjJO27rPmeVVXkx0vW_MxVV4mqKitRirYRjShGeSjFUDbycBjEvq2znaAFlS4ihcK6KXddYiPXyfOhVizx_RC9V5MhSpMY__4EO68unBoH6DBP5LvE_D8NF1Os">