mirror of
https://sourceware.org/git/glibc.git
synced 2026-10-24 01:33:52 +03:00
Single-threaded malloc tests exercise only the SINGLE_THREAD_P paths in the malloc implementation. This commit runs variants of these tests in a multi-threaded environment in order to exercise the alternate code paths in the same test scenarios, thus potentially improving coverage. $(test)-threaded-main and $(test)-threaded-worker variants are introduced for most single-threaded malloc tests (with a small number of exceptions). The -main variants run the base test in a main thread while the test environment has an alternate thread running, whereas the -worker variants run the test in an alternate thread while the main thread waits on it. The tests themselves are unmodified, and the change is accomplished by using -DTEST_IN_THREAD at compile time, which instructs support/ infrastructure to run the test while an alternate thread waits on it. Reviewed-by: Florian Weimer <fweimer@redhat.com>
18 KiB
18 KiB