Add focused barrier and team-lifecycle tests to libgomp.
New tests validate specific barrier behaviors and thread team lifecycle management in libgomp.
This patch introduces twelve new executable tests for libgomp, derived from an AI-driven bug-hunting session, to specifically validate barrier synchronization and thread team lifecycle management. The tests cover scenarios like data flushing through barrier trees, secondary thread coordination during waits, and thread team retention across regions. While the author acknowledges not fully understanding every test case’s nuances, they were retained to improve test coverage for complex synchronization patterns.
In Details
This commit adds a set of focused, AI-generated tests for libgomp's barrier and team management functionalities. The tests exercise specific, complex synchronization paths not covered by existing testsuite cases, including data transitiveness through tree barriers, secondary thread task draining, and retained team behavior across regions. These tests target advanced features like linux/futex_waitv protocols and cancellable generations, aiming to improve robustness in intricate multi-threaded scenarios.
- libgomp
- The GNU implementation of OpenMP runtime library, providing support for parallel programming constructs in C, C++, and Fortran.
- barrier
- A synchronization primitive in parallel programming that causes threads to wait until all participating threads have reached a certain point in the program's execution before any of them can proceed.
- thread team
- A group of threads managed by libgomp that work together to execute parallel regions. Reusing thread teams can reduce the overhead of creating and destroying threads.
- futex
- Fast Userspace muTex. A Linux kernel primitive that allows userspace threads to efficiently wait for certain conditions to be met, often used by threading libraries for synchronization.
- OpenMP
- A standardized API for shared-memory parallel programming. It consists of a set of compiler directives, library routines, and environment variables.