<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126318>126318</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] fix inconsistent ninja targets
</td>
</tr>
<tr>
<th>Labels</th>
<td>
cmake,
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
One thing that I noticed was that we have a mix of ninja targets that sometimes use hypens, sometimes underscores, sometimes "unittests" sometimes "tests."
Example:
```sh
$ ninja libc_
libc_arpa_inet_unittests libc_sys_auxv_unittests
libc_assert_unittests libc_sys_epoll_unittests
libc_dirent_unittests libc_sys_mman_unittests
libc_errno_unittests libc_sys_prctl_unittests
libc_execv_test_normal_exit libc_sys_random_unittests
libc_execv_test_signal_exit libc_sys_resource_unittests
libc_fcntl_unittests libc_sys_select_unittests
libc_fenv_unittests libc_sys_sendfile_unittests
libc_include_tests libc_sys_socket_unittests
libc_inttypes_tests libc_sys_stat_unittests
libc_poll_unittests libc_sys_statvfs_unittests
libc_posix_spawn_test_binary libc_system_str_to_float_comparison_test
libc_pthread_unittests libc_sys_uio_unittests
libc_sched_unittests libc_sys_utsname_unittests
libc_search_unittests libc_sys_wait_unittests
libc_setjmp_unittests libc_termios_unittests
libc_signal_unittests libc_time_unittests
libc_spawn_unittests libc_unistd_unittests
libc_stack_chk_guard_unittests libc_unittest_tests
libc_stdio_unittests libc_wchar_unittests
libc_str_to_float_comparison_test
$ ninja libc-
libc-complex-unittests libc-rpc-tests
libc-cpp-utils-tests libc-startup
libc-ctype-tests libc-startup-tests
libc-fixed-point-tests libc-stdbit-tests
libc-fputil-tests libc-stdfix-tests
libc-fuzzer libc-stdlib-tests
libc-hermetic-tests libc-strings-tests
libc-integration-tests libc-string-tests
libc-locale-tests libc-support-tests
libc-long-running-tests libc-support-threads-integration-tests
libc-math-smoke-tests libc-support-threads-tests
libc-math-unittests libc-support-time-tests
libc-osutil-tests libc-threads-integration-tests
libc-pthread-integration-tests libc-unit-tests
```
Personally, the underscores and unittests look way more consistent to me. But I think "unittests" is also somewhat overloaded since we have a different concept of unittests vs hermetic tests, and the ninja targets with unittests imply BOTH (I _think_). So I don't particularly care what we ultimately go with, _as long as were consistent_.
I have a weak preference to make most of these just: `libc_stdio_tests` and `libc_string_tests` etc. (i.e. `libc_{header}_tests`). Thoughts?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMV09v6r4S_TRmYwUFQ6FdsGhvX_W6-j3p3X00OBPi4tiRZ8Kf--l_coAQaOAWVUKx5xyfM5mkByAya4e4FE9v4ul9BA2XPiyd0ZscCRrrDAYarXx-WP7jUHJp3FpyCSw_pfNsNOZyB3Rc2qEsYYsSZGX20hfSGfcFkiGskU815CtkUyHJhlCWhxodCfWrv-5yDKR9wJsNoVTjDDMSk1DqeqddHQulRPoq0tf_7KGqLYppvBDz9PhHZbxSs5Mwa1Y6E-lr-w2hhsw45Kw75FhAB8qg2W9767efjoMIwyAB1t7a3sYZkZuAjh9Qx0_HUlXgBkgwBOf_wnEhqYPmISm4R73N4lrmfKjAZrg3fMEFcLmv7h4zQBNn6zsNkm-CxjtEZ5pCuyuVHZ7Qor7fsQ6PbjsMd3lhLA40wDhtmxyzB03stZG83lwNy4WG-VAjPeS50DAMkdyMy1X5tqB79i9wMvuMati5461YGQfh0PEwVhlxyNhnhfXAmfZVDcGQP9Z3PFwGhHxISWMejtyZgXSJw3gmB9XQfSCEoMufPhM7MEMNJOSvqv4JCWOojKchjuP8_oTDDDtpb8CN-cYZ4vwha4dn0JtMl5ts3UD41sbz5YNJuzDlV_erXdzpEsKQ7MeTcf0CTU6oJBZa3CfXhySh1snDJ6rD13XSsLGU9NDEELip72F76PjMDSCTK2tJYfaYJ7U3ju-pOqHzleFbcB31PXRzBhdmfwtu_vzBcN9ID2zN6gZcYoj_6x518gQOxq3pBm0c4zoAG-_-Yjqib8DWa7D4A9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