| Revision | Date | Changes |
| A | Apr 05, 2004 | Initial release |
| B | Apr 06, 2004 | Added new paragraphs for the following items:
|
| C | Apr 19, 2004 | Added HTML anchors for each test |
Go back to Coverage Analysis
This analysis is based on a Feb 23, 2004 cvs checkout of the glibc source tree.
The tests are ordered in alphabetical order in each section.
Table of contents
nptl directory tests.CONFORMANCE
Tests for stack alignment in a pthread_create()'d function.
CONFORMANCE
Tests for functions calls order (prepare, parent, child).
CONFORMANCE
Same as previous, but with a shared object loading inside.
CONFORMANCE
Tests for invalid (random) set call parameters with attributes:
pthread_ : cancelstate - canceltype
pthread_attr_ : detachstate - inheritsched - schedpolicy - scope
pthread_mutexattr_ : pshared
pthread_rwlockattr_: pshared
CONFORMANCE
Tests for default values and normal use cases for attributes:
pthread_attr_ : detachstate - guardsize - inheritsched - schedpolicy - scope
Tests for invalid parameter for attributes:
pthread_attr_ : stack - stacksize
CONFORMANCE
Tests the function pthread_getattr_np().
Compares the attribute passed to create and those obtained in the new thread for :
pthread_attr_ : (get)affinity_np - (get)detachstate - (get)stack -
(get/set)guardsize - (get)scope - (get)inheritsched.
pthread_ : (get)affinity_np
other
backtrace() of a thread creation.
CONFORMANCE
Light tests for pthread_barrier_init(), pthread_barrier_wait() and pthread_barrier_destroy().
CONFORMANCE
Tests for pthread_barrierattr_(get/set)pshared() (uses a barrier shared between two processes). Check that 1 and only 1 thread gets PTHREAD_BARRIER_SERIAL_THREAD on wait.
STRESS
Tests for multiple threads using the same barrier. Verify whether only one thread returns the serial value. Verify also whether no thread passes the barrier before it should.
other
Tests for pthread_barrier_destroy while some threads are still inside pthread_barrier_wait() (it is not POSIX* mandatory).
CONFORMANCE
Tests for thread creation basics: whether thread pid is the same as parent. whether thread return code is received by parent in join.
CONFORMANCE
Tests pthread_equal() and pthread_self().
CONFORMANCE
Tests for atexit() (the threads are exiting in same order they were created, parent returns first).
CONFORMANCE
Tests for atexit() and signals with waitpid().
CONFORMANCE
Tests for pthread_getconcurrency()
CONFORMANCE
Tests for environment sharing between threads (working directory).
other
Tests for thread cancelation in pthread_mutex_lock(). This test uses cleanup handlers. Uses non POSIX* extensions.
CONFORMANCE
Tests for cancelation with write() call.
CONFORMANCE
Tests for cancelation with read() call.
CONFORMANCE & other
Tests for cancelation with:
read readv write writev sleep usleep nanosleep select pselect poll
wait waitpid waitid sigpause sigsuspend sigwait sigwaitinfo sigtimedwait
pause accept send recv recvfrom recvmsg open close pread pwrite fsync
msync sendto sendmsg creat connect tcdrain msgrcv msgsend
Same as tst-cancel4.c
other
Tests for cancelation in fgets().
other
Tests for cancelation in file locking operations and shell commands.
CONFORMANCE
Tests for pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED).
other
Tests for cancelation in printf() (aka. in write()).
STRESS - light
Tests multiple cancelations.
CONFORMANCE
Check whether cleanup handler is called only once. Uses cancelation in read()
CONFORMANCE
Check cancelation in sem_wait() (before entering and while sleeping).
CONFORMANCE
Check cancelation in sem_timedwait() (before entering and while sleeping).
CONFORMANCE & other
Tests for cancelation in lockf().
CONFORMANCE
Tests cancelation with asynchonous I/O functions.
CONFORMANCE
Tests cancelation in clock_nanosleep() function.
STRESS
Stresses pthread_setcanceltype().
STRESS
Tests for cancelation in signal handlers.
STRESS
Same as previous with additional fork().
CONFORMANCE
Tests for PTHREAD_CANCEL_DISABLED with nanosleep() call.
Same code as previous.
CONFORMANCE
Tests if cleanup handlers are call in the right order. Also tests the atexit() function.
CONFORMANCE
Same as previous but inside a thread.
CONFORMANCE
Tests the signal handling system.
CONFORMANCE
Tests if the cleanup handlers are called in the right order
(almost same as tst-cleanup1.c)
other
Tests for mixing Linuxthreads and NPTL pthread_cleanup_{push,pop}().
other
Tests that symbols definitions are correct.
CONFORMANCE
Tests for thread clocks features (pthread_getclockid()...).
CONFORMANCE
Basic test of pthread_cond_wait() and pthread_cond_signal().
CONFORMANCE
Basic test of pthread_cond_broadcast().
CONFORMANCE
Tests whether pthread_cond_wait() returns when not awaken.
CONFORMANCE
Tests for PTHREAD_PROCESS_SHARED attribute in conditionnal variable. Also tests for correct mutex/conditional variables interactions.
CONFORMANCE
Tests for timeout in pthread_cont_timedwait().
CONFORMANCE
Same as tst-cond4.c but uses pthread_cond_timedwait() instead of pthread_cond_wait().
STRESS
Tests for cancelation in pthread_cond_wait() a hundred times.
CONFORMANCE
Tests for ERRORCHECK mutex return value when recursively locked in cleanup handler while cancelation occurs in pthread_cond_wait() and in pthread_cond_timedwait().
CONFORMANCE
Tests for return value of pthread_cond_wait() and pthread_cond_timedwait() when called without ownership of the associated mutex.
STRESS
Tests for multiple signaling (with multiple waiters) without mutex ownership.
CONFORMANCE
Tests for pthread_cond_timedwait() timeout with CLOCK_REALTIME and CLOCK_MONOTONIC.
CONFORMANCE
Tests for process shared mutex & conditional variable (pthread_cond_broadcast()). Uses two different calls to mmap().
CONFORMANCE
Same as previous but uses pthread_cond_signal().
other
Tests for getcontext() setcontext() makecontext() and swapcontext() routines.
CONFORMANCE
Call of pthread_detach() with an already terminated joinable thread.
STRESS
Plenty of calls to dlsym(NULL, "invalid").
CONFORMANCE & STRESS
A thread delivers SIGUSR1 continuously, and four other threads spend their time creating threads and joining them (one has a handler for SIGUSR1). Also checks that pthread_create() does not return EINTR.
CONFORMANCE & STRESS
Same as previous but deals with phread_mutex_{lock,unlock,timedlock}()
CONFORMANCE & STRESS
Three threads are created. The first one is blocked in pthread_mutex_lock(), the second one is blocked in pthread_join() waiting for the first and it has a handler for SIGUSR1, which is sent continuously by the third thread with the pthread_kill() routine.
CONFORMANCE
Checks that pthread_barrier_wait() does not return EINTR.
CONFORMANCE & STRESS
Same as tst-eintr2.c but checks for pthread_cond_{wait,timedwait}().
CONFORMANCE
Tests whether a process created with posix_spawn() inherits the correct parent pid. This is a simple exec test with only one thread in the parent.
CONFORMANCE
Same as previous but with fork() / execl() calls. In the child process, a child threads tries to join the parent thread which exec().
CONFORMANCE
Same as previous but exec is called from the child thread.
CONFORMANCE
Creates a thread which ignores SIGUSR1 and blocks SIGUSR2. This thread then execv() and checks that the signals are still ignored and blocked.
CONFORMANCE
Test program for making nonexecutable stacks executable on load of a DSO that requires executable stacks.
CONFORMANCE
Checks that calling exit() in a thread terminates the whole process (not required by POSIX*).
CONFORMANCE
Checks that a thread can lock a file for reading while another thread locked it for writting.
CONFORMANCE
Checks that file locks are not released on thread exit but are released when the process exits.
CONFORMANCE
Creates N threads, each thread calls fork(). The pid information is checked.
CONFORMANCE
Checks that a thread inherits correctly his parent's ppid.
CONFORMANCE
Very similar to the previous test but with one additional thread (for ppid inheritance testing).
other
Test of fork() updating child universe's pthread structures.
CONFORMANCE
Tests that a child thread can join his parent thread.
CONFORMANCE
Tests the pthread_tryjoin_np() function, when it shall return an error and when it shall not. Tests also that the thread return value is retrieved.
CONFORMANCE
Tests the pthread_timedjoin_np() function, when it shall return an error and when it shall not. Tests also that the thread return value is retrieved.
CONFORMANCE
Tests for pthread_attr_setdetachstate() and pthread_detach() functions return values.
CONFORMANCE & Stress
Tests a few times that joining a canceled thread and thread joining itself return the correct information.
CONFORMANCE
Basic testing of pthread_key_create(), pthread_setspecific(), pthread_getspecific() and pthread_key_delete(). It also tests that pthread_key_delete allows creation of more TSD keys.
CONFORMANCE
Simple test of TSD keys destructors. It verifies that the destructor is called when needed.
CONFORMANCE
This tests a feature not required by POSIX*. It checks that the TSD key destructor is called when the thread is cancelled.
STRESS
This test verifies that a new thread has empty keys values. It creates and destroys some threads. Half of the threads sets the key values and the other half reads the key values and check it was initialized with NULL.
CONFORMANCE
Sends an uncatched SIGUSR1 to a thread blocked in a pthread_cond_wait() call.
CONFORMANCE
It sends SIGUSR1 to a thread for which this signal is masked and then it checks that the thread does not terminate due to the signal.
CONFORMANCE
Checks that pthread_kill() sends the signal only to the target thread.
CONFORMANCE
This test uses some implementation-specific features. It sends a signal to a non-existent thread and checks that ESRCH is returned.
CONFORMANCE
Sends an inexistant signal to a thread and checks that EINVAL is returned.
CONFORMANCE & STRESS
Checks that a thread inherits signal handlers from his parent. It also sends a signal to several threads several times.
other
Tests that loading the pthread library does not interfere with locale features.
other
Tests that loading the pthread library does not interfere with argument parsing features.
CONFORMANCE
This basic test calls pthread_mutex_init(), pthread_mutex_lock(), pthread_mutex_unlock(), pthread_mutex_destroy() and checks their return values.
CONFORMANCE
This checks for MUTEX_ERRORCHECK mutexes operations detecting the required error cases.
CONFORMANCE
This checks for MUTEX_RECURSIVE mutexes operations detecting the required error cases.
CONFORMANCE
This test uses a feature not required by POSIX* (unlocking not done by the owner process). Checks that a PROCESS_SHARED mutex is really shared between processes.
CONFORMANCE
Tests the pthread_mutex_timedlock() function.
other
Tests that a normal mutex can deadlock when pthread_mutex_lock() is called twice, and that a signal is caught when the thread is inside a deadlock.
STRESS
Creates 100 threads, then each thread locks and unlocks the mutex 1000 times.
CONFORMANCE
This tests checks some behaviors not required by POSIX*. Tests destroying a mutex in several situations with several mutex types.
CONFORMANCE
Tests on a recursive process-shared mutex owned at the time of fork().
CONFORMANCE
Tests that calling pthread_once() twice in a single thread lets the routine execute only once.
STRESS
100 threads execute a call to pthread_once(), and then check that the routine was called once and only once.
CONFORMANCE
Tests that canceling a thread which is inside a pthread_once() call acts as if the function had not been called.
STRESS
Same as previous test, but an additionnal thread calls pthread_once() the second time.
other
Tests that a call to popen() does not break the pthread creation features.
CONFORMANCE
Tests that raise() returns when the signal handler has terminated.
CONFORMANCE
Tests calling pthread_rwlock_rdlock() twice and pthread_rwlock_wrlock() once - from a single thread.
CONFORMANCE
Tests calling pthread_rwlock_trywrlock() and pthread_rwlock_tryrdlock() with read lock and then with write lock taken.
CONFORMANCE
Tests that calling pthread_rwlock_rdlock() or pthread_rwlock_wrlock() after a call to pthread_rwlock_wrlock() returns EDEADLK.
CONFORMANCE
This test uses a feature not required by POSIX* (unlocking not done by the owner process). Checks that a process-shared read-write lock is really shared between processes.
CONFORMANCE
Checks that threads hung in pthread_mutex_lock() or pthread_rwlock_wrlock() are interruptible with signals.
CONFORMANCE
Tests pthread_rwlock_timedrdlock() with all kinds of locks in situation when it shall return EINVAL, EDEADLK or ETIMEDOUT.
CONFORMANCE
Same as previous but the rwlocks are locked for reading.
STRESS
Several threads try to call either pthread_rwlock_rdlock() or pthread_rwlock_wrlock() on a prefer-writer-nonrecursive read-write lock.
STRESS
Same as previous but with a prefer-reader lock.
STRESS
Same as tst-rwlock8.c but with pthread_rwlock_timedrdlock() and pthread_rwlock_timedwrlock() calls (loops when a timeout occurs).
STRESS
Same as previous but with a prefer-reader lock.
CONFORMANCE
A process calls pthread_rwlock_wrlock() on a process-shared rwlock, then another process checks that the pthread_rwlock_tryrdlock(), pthread_rwlock_timedrdlock(), pthread_rwlock_trywrlock() and pthread_rwlock_timedwrlock() functions fail and return correct error codes.
CONFORMANCE
Checks that pthread_rwlock_init() prepares the memory for the rwlock.
CONFORMANCE
Checks that a thread with PTHREAD_EXPLICIT_SCHED attribute will run.
CONFORMANCE
Simple calls to sem_wait(), sem_post() and sem_trywait(), with an unamed semaphore.
CONFORMANCE
Tests that while blocking in a sem_wait() call, a signal can interrupt the thread (unamed semaphore).
CONFORMANCE
Tests the process-shared unamed semaphore feature.
CONFORMANCE
Checks that a named semaphore is shared between processes.
CONFORMANCE
Tests for timeout in sem_timedwait() with an unamed semaphore.
CONFORMANCE
Checks that when a signal occurs, sem_wait() fails and errno is set to EINTR.
CONFORMANCE
Checks that calling sem_open() with the same name and with different flags results in the same address for the semaphore. It also checks that sem_close() can be called more than once.
CONFORMANCE
Checks that we can sem_open() and sem_close() several times a named semaphore.
CONFORMANCE
Same as previous but sem_unlink after each close.
CONFORMANCE
Tests sending a SIGINT signal to a process. In this process, the parent thread has a mask on this signal and the child thread has registered a handler. It also checks that pthread_barrier_initialize() initializes the memory.
CONFORMANCE
Same as previous but the child thread calls sigwait() to catch the signal.
STRESS
Different signals are sent to a process containing different threads. Each thread receives a different signal. On completion, it checks that no signal was lost or misdelivered.
CONFORMANCE
Tests for calling pthread_sigmask() with a bad first parameter.
CONFORMANCE
Checks that a child thread inherits the signal mask from his parent.
CONFORMANCE
Checks that an alternative stack specified with sigaltstack() is used.
CONFORMANCE
Simply calls the spin functions pthread_spin_init(), pthread_spin_lock(), pthread_spin_unlock() and pthread_spin_destroy().
CONFORMANCE
This test uses a feature not required by POSIX* (unlocking not done by the owner process). Basical test of pthread_spin_trylock() and of process-shared spinlock.
CONFORMANCE
Checks that a thread looping on pthread_spin_lock() can catch signals.
CONFORMANCE
Tests the feature which allows to specify the stack for a new thread.
CONFORMANCE
Tests if it is possible to create a thread with a PTHREAD_STACK_MIN stack size.
Other
Tests if pthread_create() and pthread_join() with a user-defined stack do not leak memory.
CONFORMANCE
Tests that flockfile() blocks when another thread previously got the lock.
CONFORMANCE
Tests that a FILE * can be locked with flockfile() several times (implicitely or not) within a thread.
CONFORMANCE
Checks that the system does not report a thread number limitation through PTHREAD_THREADS_MAX or sysconf(_SC_THREAD_THREADS_MAX).
other
Checks that a structure declared with __thread attribute is correctly initialized for each thread and that the values do not interfere from a thread to another.
CONFORMANCE & STRESS
Checks the behavior of a function pointer declared with __thread attribute.
CONFORMANCE & STRESS
Same as previous but a part of the code is in a module dynamicly loaded.
CONFORMANCE & STRESS
More sophisticated test dealing with shared objects dynamicly loaded and variables with __thread attribute.
CONFORMANCE
Checks alignment, overlapping and layout of TLS variables.
CONFORMANCE
Creates a thread specific data key and tests setting and getting its value.
CONFORMANCE
Checks that a destructor associated with a key is called on thread termination.
CONFORMANCE
Checks that the destructors are called again until the key value is null.
other
Checks that the destructors are called at least PTHREAD_DESTRUCTOR_ITERATIONS times and that they are not looping forever (POSIX* says it can loop forever).
CONFORMANCE
Checks that the umask() is set for every thread in the process.
other
Tests for non-unloading of libpthread.
PERFORMANCE
This sample allows measurements on conditionnal variables operations.
PERFORMANCE
Complex benchmark allowing to measure thread creation time and to stress some features..
PERFORMANCE
Complex benchmark using sockets and gd (graphics) library.
signal directory tests.CONFORMANCE
Basical test of the raise() function.
CONFORMANCE
Very simple test using raise() and signal().
CONFORMANCE
Tests the functions sigemptyset(), sigismember(), sigaddset() and sigdelset().
CONFORMANCE
Tests for bad parameters in calls to sighold() and sigrelse().
posix directory tests.CONFORMANCE
Child process created with vfork() calls a function then returns. The tests checks the child's return code.
CONFORMANCE
Tests for features such as PID and files operations after a fork().
* POSIX (R) is a registered trademark of the IEEE