[PATCH v3 2/2] malloc: Add threaded variants of single-threaded malloc tests

Florian Weimer fweimer@redhat.com
Mon Nov 24 15:24:52 GMT 2025


* Arjun Shankar:

> 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.

This one looks okay to me too.

Reviewed-by: Florian Weimer <fweimer@redhat.com>

Thanks,
Florian



More information about the Libc-alpha mailing list