<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/145349>145349</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] Tracking progress for adding hermetic testing on baremetal
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
saturn691
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
saturn691
</td>
</tr>
</table>
<pre>
Downstream (https://github.com/arm/arm-toolchain/), I have managed to hack together running hermetic testing of unit tests by LLVM.
```
❯ qemu-system-arm -M mps2-an500 -semihosting -nographic -device loader,file=libc/test/src/stdio/libc.test.src.stdio.printf_test.__hermetic__.__build__ -s -S
[==========] Running 1 test from 1 test suite.
[ RUN ] LlvmLibcPrintfTest.PrintOut
A simple string with no conversions.
1234567890
1234 and more
[ OK ] LlvmLibcPrintfTest.PrintOut
Ran 1 tests. PASS: 1 FAIL: 0
```
In an ideal world, I would like to contribute this upstream, where the embedded build is ran in the post-commit. In order to do this, I will have to do the following.
- [ ] Fix a few bugs with the testing on LLVM-libc
- [ ] Start the mutex implementation
- [ ] Upstream the LLVM-libc support libraries (https://github.com/arm/arm-toolchain/tree/arm-software/arm-software/embedded/llvmlibc-support) into `crt1` and `semihost`.
- [ ] Other things that I may have missed when integrating upstream.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVE2P2zYQ_TX0ZSBBoizZPvjgxDWw6KYb7Ca9GpQ4ktjlh0qO7Oy_L0jLi6YIgiICYZPD4RvOzOMTIajBIu5Z_YFxHgTN3ja7knHO6uNKzDQ6v383r1on3_ZHd7WBPAoDjG9Hoimw6sD4ifHToGic27xzhvGT8MtvRs7pbhTKJq8d4x_hAUZxQTDCigElkINRdK9AbkAa0YOfrVV2gBG9QVIdEAaKBtfDbBWldYD2DR4f__yUs-IQR1Msoziw3zjbHdnhBH-jmbPwFghNJryB7BOYKfBM2LooIAto1Ohu4Jl1gxfTqDrI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