(Existing) Test Coverage
of NPTL functions
||Mar 08, 2004
||Apr 05, 2004
- Added Introduction.
- Conform the document structure to the site style.
- Changes in paragraphes order and contents.
||Apr 06, 2004
- Added tests from directories
posix in the NPTL source included tests paragraph.
This paper is an analysis of the test coverage for NPTL function.
The analysed tests come from the Open POSIX Test Suite,
the Linux Test Project and the glibc source tree.
This analysis is based on the Feb 2004 testsuits.
NPTL source included tests
The libc source tree contains 162 test programs for NPTL functions in the
subdirectory, plus 4 in the
signal subdirectory, plus 2 in the
subdirectory, for a total of 168 files.
A brief overview of each test is located in this document.
Once you have successfully compiled the glibc, you can run those tests by doing:
Linux Test Project
The LTP test suite contains (almost) every tests from the
Open POSIX Test Suite.
It also contains some other tests, described here:
- Complex test creating a tree of threads, synchronizing them.
It uses mutex and conditional variables.
- Creates recursively N threads, then exits.
- Create a tree of threads does calculations, and
returns result to parent. This sample is the same as
pth_str01.c, plus 3 lines for the calculation stuff.
Open POSIX Test Suite
According to the Open POSIX Test Suite homepage,
this project tests every POSIX THR functions.
This document contains the complete description for coverage.
Comparing to those from NPTL, missing functions are:
- pthread_tryjoin_np (GNU extension)
- pthread_timedjoin_np (GNU extension)
- pthread_attr_getstack (XOPEN2K extension)
- pthread_attr_setstack (XOPEN2K extension)
- pthread_attr_setaffinity_np (GNU extension)
- pthread_attr_getaffinity_np (GNU extension)
- pthread_attr_getattr_np (GNU extension)
- pthread_setconcurrency (UNIX98 extension)
- pthread_getconcurrency (UNIX98 extension)
- pthread_yield (GNU extension)
- pthread_setaffinity_np (GNU extension)
- pthread_getaffinity_np (GNU extension)
- pthread_cleanup_push_defer_np (GNU extension)
- pthread_cleanup_pop_restore_np (GNU extension)
- pthread_rwlockattr_getkind_np (UNIX98 extension)
- pthread_rwlockattr_setkind_np (UNIX98 extension)
- pthread_getcpuclockid (XOPEN2K extension)