(Existing) Test Coverage
of NPTL functions
| Revision |
Date |
Changes |
| A |
Mar 08, 2004 |
Initial release |
| B |
Apr 05, 2004 |
- Added Introduction.
- Conform the document structure to the site style.
- Changes in paragraphes order and contents.
|
| C |
Apr 06, 2004 |
- Added tests from directories
signal and
posix in the NPTL source included tests paragraph.
|
Back
Introduction
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 nptl
subdirectory, plus 4 in the signal subdirectory, plus 2 in the posix
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:
make check
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:
- testcases/kernel/sched/pthreads/pth_str01.c
- Complex test creating a tree of threads, synchronizing them.
It uses mutex and conditional variables.
- testcases/kernel/sched/pthreads/pth_str02.c
- Creates recursively N threads, then exits.
- testcases/kernel/sched/pthreads/pth_str03.c
- 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_getguardsize
- pthread_attr_setguardsize
- pthread_attr_getinheritsched
- pthread_attr_setinheritsched
- pthread_attr_getscope
- pthread_attr_setscope
- pthread_attr_getstackaddr
- pthread_attr_setstackaddr
- pthread_attr_getstacksize
- pthread_attr_setstacksize
- 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_setschedparam
- pthread_getschedparam
- 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)