POSIX Threads Test Suite
- VSTH verifies the IEEE Std POSIX® 1003.1c-1995 Threads (pthreads)
extension and the the X/Open CAE System Interfaces & Headers, Issue 5 Threads (aspen threads)
- The Westwood version additionally covers UNIX 03 and IEEE Std 1003.1, 2003 Edition
- Built upon the proven VSXgen harness, yielding a configurable and productive tool.
- Using the VSXgen architecture, this suite is provided as a VSXgen testset.
- Coverage for functions and header file tests.
- Includes coverage for thread safety and re-entrancy
- Test modes for UNIX 98 and pthreads
- The Westwood version contains additional Test modes for UNIX 03 and POSIX 1003.1, 2003 Edition
- POSIX-style assertions have been developed for all tests, greatly aiding failure analysis.
- Mandatory for testing the Single UNIX® Specification Version 2 and 3.
- An embedded derivative VSTH-PSE is available for separate licensing.
If your organization is developing a pthreads implementation then this
test suite gives significant test coverage and is recommended for in-house
quality-assurance as well as part of your branding campaign.
Keywords: POSIX® Threads, UNIX® 98, Threads, Pthreads,
Aspen Threads, Testing, POSIX, X/Open.
The IEEE POSIX Threads standard known as pthreads is a general
threads API, specifying a robust set of threads facilities, including
new thread specific APIs for the following:
- Thread management
- Thread-specific data
- Thread cancellation
- Thread synchronization
- Thread execution scheduling
- Thread synchronization scheduling
Pthreads is incorporated into CAE Specification System Interfaces &
Headers Issue 5 (XSH5) and later, part of the Single UNIX Specification, Version.
XSH adds the following extensions:
- the ability to set and get level of thread concurrency, this is an
efficiency issue which can lead to better program performance.
- implements reader/writer locks, allows simultaneous read-only access
to data, which is very useful.
- extended mutex attribute types.
- extended mutex locking.
- extended scheduling policies.
- set guard size for stacks.
The Open Group Threads Test Suite, known as VSTH, is a stand alone test
suite covering POSIX 1003.1c and the X/Open threads extension included
in the Single UNIX Specification.
VSTH uses the robust VSXgen test harness, which in turn uses the industry
standard Test Environment Toolkit (TET3) . The benefits of using VSXgen,
which is derived from VSX4, is that the harness is familiar to existing
users of X/Open Test suites, it has proven portability and robustness
characteristics and it allows the VSTH tests to be integrated with other
testsets that run under VSXgen, making the test suites easily useable
for in-house quality assurance and automated regression testing.
TET3 is the latest version of the Test Environment Toolkit and supports
multi-threaded testing. More information on the Test Environment Toolkit
is described on the TETworks
The test suite can be run in the following modes
- POSIX 1003.1-1996 mode, covering Pthreads only.
- UNIX 98 mode, covering Pthreads and the XSH5 extensions
- POSIX 1003.1-2003 mode
- UNIX 03 mode
This allows the test suite to easily be used during development of your
threads implementation, for example initially you might only want to run
the POSIX 1003.1-1996 subset.
The assertion counts are as follows:
- POSIX 96 MODE: PTHR.hdr 286, PTHR.os 445
UNIX98 MODE: PTHR.hdr 365, PTHR.os 563
The test suite covers the following functional areas in the IEEE POSIX
- Base _POSIX_THREADS functions:
- Base _POSIX_THREAD_SAFE_FUNCTIONS
- Functions in the _XOPEN_REALTIME_THREADS feature group
- X/Open threads extensions:
VSTH is modular, both at the implementation level and at the user level.
The testing process is divided into clear stages -
Each stage is clearly documented in the User and Installation Guide, which
accompanies the product.
This stage includes setting up user-ids and groups for testing, and
reading the tape. This stage includes configuring and installing the TET
harness, which is used to control building, execution and cleanup of VSTH
VSTH automatically installs on most common platforms. Where system dependencies
may vary, these are isolated into clearly defined user changeable sections
of the test suite. During this stage VSTH builds the test harness and
VSTH separates the building of the test harness and tools from the testsets
themselves. The test suite may be built completely or in sub-sections, which
decrease in granularity from test sections and areas down to individual
Once built, the test suite may be run as a whole in one pass, or in sub-sections
which decrease in granularity from test areas down to individual tests within
testsets. If you are producing an X/Open branding application the test suite
must run in a single uninterrupted pass.
VSTH generates an intermediate level journal file in a TET compliant
format. This is sufficient for debugging purposes. When a formal report
is required, such as for X/Open branding then the formal report writers
provided with VSTH are used to process the journal file.
POSIX is a registered trademark of the IEEE.