On Jun 21, 2022, Jonathan Wakely <jwak...@redhat.com> wrote: > On Tue, 21 Jun 2022 at 06:54, Alexandre Oliva via Libstdc++ > <libstd...@gcc.gnu.org> wrote: >> >> >> As in the gcc testsuite, systems without preemptive multi-threading >> require sched_yield calls to be placed at points in which a context >> switch might be needed to enable the test to complete.
> I'll try to remember that, but will probably forget. Is this really > the only affected test? Yeah, the only one in libstdc++-v3/testsuite, as of gcc-11, which is what I've focused on for this project; I haven't gone through all fails on master to make sure they're unrelated. (This is holding up some filesystem-related patches, whose tests are failing for reasons not present in gcc-11, and some of the forward-ports needed significant rewriting.) libstdc++ has plenty of threading tests, but they involve sleeping or otherwise blocking, which offers a context switch opportunity even on non-preemptive multithreading systems. It's busy waits that require a sched_yield. The gcc testsuite has a handful of those; covered by a separate patch also posted last night. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>