posixtestsuite: Delete from tree.

The Open POSIX Testsuite can now be found at
https://github.com/haiku/open_posix_testsuite - most of the patches
can be found in "master", and the full Git history of this directory
can be found in the "from_haiku_trunk" branch (the patches there
should eventually be merged to "master", whenever someone has time
to look at it.)
This commit is contained in:
Augustin Cavalier
2015-06-29 16:46:10 -04:00
parent fd2c0fa425
commit 26de45da21
2848 changed files with 0 additions and 237088 deletions
@@ -1,8 +0,0 @@
geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
inaky.perez-gonzalez REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
majid.awad REMOVE-THIS AT intel DOT com
rolla.n.selbak REMOVE-THIS AT intel DOT com
rusty.lynch REMOVE-THIS AT intel DOT com
salwan.searty REMOVE-THIS AT intel DOT com
sunyi REMOVE-THIS AT users DOT sourceforge DOT net
@@ -1,145 +0,0 @@
Build Notes for POSIX Test Suite
================================
Last update : 2004-04-04 updated for posixtestsuite-1.4.0
The POSIX Test Suite should be able to be run independently of any given
OS, so the OS-specific steps for configuring the POSIX Test Suite to run
are currently manual.
IN GENERAL
==========
In general, if you need to link in a library, place the -l or -L commands
in the LDFLAGS file in the same directory as the Makefile. This will
ensure that these libraries are linked in.
LINUX
=====
Notes for running POSIX Test Suite against Linux implementations of
POSIX functionality. (Note: If these implementations are accepted into
the kernel, then the manual intervention will no longer apply, and we will
update this document.)
Please refer to your linux distribution's manual for the kernel and
library information.
Notes for each test section are here. It is targeted for general linux
kernel 2.6 and glibc-2.3.3.
=============
Clocks/Timers
=============
Both Linux kernel 2.6 and Glibc support Clocks/Timers now.
Add the '-lrt' option to the LDFLAGS.
=======
Threads
=======
LinuxThreads
-------------
If LinuxThreads is the default POSIX thread implementation,
to build against LinuxThreads, add the line -lpthread to LDFLAGS.
NPTL
----
If NPTL is the default POSIX thread implementation,
add the line -lpthread to LDFLAGS.
Otherwise, to build against NPTL, export the following variable:
export GLIBCDIR=/path/to/NPTL/libc-build
Then in LDFLAGS, add the following lines:
$GLIBCDIR/nptl/libpthread.so.0 $GLIBCDIR/libc.so.6 -Wl,-rpath,$GLIBCDIR:$GLIBCDIR/nptl:$GLIBCDIR/elf,-dynamic-linker,$GLIBCDIR/elf/ld-linux.so.2
NGPT
----
To build against NGPT, export the following variables:
export LD_PRELOAD=libpthread.so.0
export LD_LIBRARY_PATH="/usr/lib:/lib:$LD_LIBRARY_PATH"
Then make sure to add the line -lpthread to the file LDFLAGS.
==============
Message Queues
==============
POSIX Message Queue (Wronski/Benedyczak's implementation) has been
included into linux kernel since 2.6.4-rc1-mm1.
But you still need to install a user library at the time of writing this
document.
posix1b
-------
To build against the posix1b message queues, see the semaphores information for posix1b.
Also, add -I/usr/include/posix1b/ to LDFLAGS.
Wronski/Benedyczak
------------------
To build against the Michal Wronski/Krzysztof Benedyczak message queues,
install the kernel patches from http://www.mat.uni.torun.pl/~wrona/posix_ipc/
and then build the user library from the same site. Add -lmqueue to
LDFLAGS to run tests.
To create the message queue file system, do:
# mkdir /dev/mqueue
# mount -t mqueue none /dev/mqueue
==========
Semaphores
==========
NPTL
----
If NPTL is installed as default POSIX thread library, use
'-lpthread' and '-lrt' flags.
Otherwise, to build against NPTL, export the following variable:
export GLIBCDIR=/path/to/NPTL/libc-build
Then in LDFLAGS, add the following lines:
$GLIBCDIR/nptl/libpthread.so.0 $GLIBCDIR/libc.so.6 -Wl,-rpath,$GLIBCDIR:$GLIBCDIR/nptl:$GLIBCDIR/elf,-dynamic-linker,$GLIBCDIR/elf/ld-linux.so.2
posix1b
-------
To run the semaphore test suite against posix1b, you will need to download
and install the posix1b library.
Start downloading it from: http://www.garret.ru/~knizhnik/posix1b.tar.gz
Once you have the library compiled and installed in /usr/lib.
Add the following library in the LDFLAGS:
-lposix1b
Make sure /usr/lib/ is in your PATH.
=======
Signals
=======
For the signals-related interfaces that start with "pthread_", refer to
the Threads section above to learn how to build those particular tests.
Also, please note that if you using version of gcc older that version 3.2-7,
you may run into lots of build and link errors since our Makefile uses the
compiler options "-std=c99" and "-std=gnu99". The solution to this is to
use gcc version 3.2-7 or newer.
=====
XCOFF
=====
Since the XCOFF main is called .main, the line:
64 nm -g --defined-only $< | grep -q " T main" || exit 0; \
needs to replace main with .main to get these tests to compile.
Maintainers: Julie Fleischer
Rolla Selbak
Salwan Searty
Majid Awad
Crystal Xiong
Adam Li
Contributors: Jerome Marchand
Ulrich Drepper
@@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
@@ -1,147 +0,0 @@
10-19-2005 1.5.2 Release
- Code cleanups by Sebastien Decugis
- Add a patch for cleaner build in cross environment from Joseph S. Myers
- Add a patch to _POSIX_CPUTIME and_POSIX_THREAD_CPUTIME handling from Joseph S. Myers
- Make the aio_read/write tests concerningthe offset maximum return PTS_UNTESTED by Sebastien Decugis
- A patch from Randy.Dunlap to fix shm conformance uninitialzedvariables
- A patch from Randy.Dunlap to fix 2 pthread conformance problems
- The patches for sem_post_5_1 and sem_post_8_1 from Yi Xu
- A patch for sem_close_1_1 from Yi Xu
- A patch from Randy.Dunlap for sem_lock to increase BUF_SIZE to prevent segment fault.
06-03-2005 1.5.1 Release
- conformance/interfaces/aio_* and
conformance/interface/lio_listio: add new cases and bug
fixes by Sebastien Decugis.
- add execute.sh by B. Thangaraju.
01-05-2005 1.5.0 Release
07-05-2004 1.4.3 Release
07-05-2004 [email protected]
- functional/schedule/1-1.c 1-2.c: New case by Abhijeet Bisain.
- stress/threads/pthread_cond_timedwait/stress1.c stress2.c:
New case by Sebastien Decugis.
07-01-2004 [email protected]
- pthread_attr_setschedparam/1-3.c 1-4.c:
Add test cases by Abhijeet Bisain.
- stress/threads/assertions.xml,
stress/threads/pthread_cond_timedwait/: New case by Sebastien Decugis
06-29-2004 [email protected]
- pthread_attr_setinheritsched/2-3.c, 2-4.c
- functional/threads/condvar/, README:
Add test cases by Abhijeet Bisain.
06-28-2004 [email protected]
- stress/threads/pthread_mutex_init/, pthread_mutex_lock/,
pthread_cond_init/: Add stress/scalability cases by Sebastien Decugis
06-22-2004 [email protected]
- pthread_cond_destroy/speculative/4-1.c, pthread_mutex_destroy/
speculative/4-2.c, pthread_exit/3-1.c:
Add new test case by Abhijeet Bisain
06-15-2004 [email protected]
- pthread_cond_init/1-2.c, 2-2.c,4-1.c 4-2.c: Add test case by
Sebastien Decugis.
- pthread_cancel/2-2.c, 2-3.c, 3-3.c: Add test case by
Abhijeet Bisain.
06-11-2004 [email protected]
- pthread_cond_signal: Add Sebastien DECUGIS's patch
06-07-2004 [email protected]
- locate-test: Remove -printf argument for 'find' for POSIX conformant.
- Makefile: Remove --defined-only option for 'nm' for POSIX conformant.
- sched_yield/1-1.c: Fix warning on 64-bit system.
- pthread_attr_setstacksize/1-1.c, pthread_attr_getstacksize/1-1.c:
Remove the output.
06-04-2004 [email protected]
- pthread_attr_getschedparam, pthread_attr_setschedparam:
Add new case by Abhijeet Bisain.
- pthread_attr_s(g)etschedpolicy: Fix. Misuse perror.
06-02-2004 [email protected]
- clock_getres/7-1.c,8-1.c: Fix incorrect output, compile warning.
05-27-2004 [email protected]
- sigaction/21-1.c: Fix. Add missing posixtest.h
- pthread_rwlock_trylock/3-1.c: Moved to speculative.
05-27-2004 1.4.2 Release
05-24-2004 [email protected]
- mmap/13-1.c: Fix. mmap() will update st_atime().
- sigaction/9-1.c: Fix. Select not block.
- strftime/1-1.c: Fix. %B judgement is not correct.
- mmap/32-1.c: Fix. Change the scenario.
05-20-2004 [email protected]
- sched_yield/1-1.c: Fix. Incorrect thread return
status.
- Add test case by Sebastien
Decugis([email protected])
pthread_mutex_unlock/5-1.c, 5-2.c
- pthread_mutexattr_settype/coverage.txt: Fix.
- behavior/signal.h/18-1.c,19-1.c,20-1.c,21-1.c: Fix
struct stack_t, struct siginfo_t.
05-13-2004 [email protected]
- Add case pthread_mutex_init/5-1.c,
pthread_mutex_init/speculative/5-2.c,
pthread_mutex_lock/3-1.c, 4-1.c, 5-1.c
by Sebastien Decugis([email protected])
- sem_post/8-1.c: Fix. Will leave Zombie process if fail.
05-10-2004 [email protected]
- Apply Ulrich Drepper's patch:
sem_post/8-1.c: Add error check and clean up code
pthread_attr_getstackaddr/1-1.c: Fix printf format.
pthread_attr_setstack/2-1.c, pthread_attr_setstackaddr/2-1.c,
pthread_attr_setstacksize/2-1.c: define _GNU_SOURCE correctly.
05-09-2004 [email protected]
- Add cases pthread_mutex_init/1-2.c, 3-2.c, 5-3.c
by Sebastien Decugis([email protected])
05-01-2004 1.4.1 Release
04-30-2004 [email protected]
- sigqueue/12-1.c: Use setuid() instead of seteuid()
- sigqueue/3-1.c: Same as above.
- shm_open/40-1.c: Remove it. This case cannot exit cleanly,
leaving zombie processes.
- shm_open/33-1.c: Remove. Improper scenario.
- shm_open/23-1.c: Rewrite the test scenario.
- pthread_attr_setinheritsched/2-2.c: Bug fix
- pthread_attr_setinheritsched/5-1.c: Remove. Not correct.
- pthread_attr_setscope/5-1.c: Return PTS_UNTESTED
- sched_setparam/23-6.c: Fix the case. It was untested before.
- sched_setscheduler/17-5.c: make -1 as a invalid policy.
- sched_setscheduler/20-1.c: Fix. It was untested before.
04-29-2004 [email protected]
- add mq_timedsend/16-1.c: Use CLOCK_REALTIME
- timer_getoverrun/2-3.c: Fix bug. It can pass on glibc now.
04-23-2004 [email protected]
- add mmap/11-4.c mmap/11-5.c
- mmap/11-2.c mmap/11-3.c: Misunderstand the spec. Fix.
04-22-2004 [email protected]
- pthread_mutexattr_settype/2-1.c: Bug fix
04-20-2004 [email protected]
- mmap/24-2.c 11-2.c 11-3.c: Bug fix
04-04-2004 1.4.0 Release
- Add test cases to implement tags: CS, CPT, TCT.
- Bug fix from Ulrich Drepper.
- Tested on Linux kernel 2.6, and fixed bugs exposed.
04-30-2003 1.0.0 Release
- Complete signals suite
- Complete <sched.h> process scheduling suite
- Snapshot of threads tests (most of the non-tag associated APIs)
- Bug fixes in all areas (including adding "_POSIX_C_SOURCE=200112L" to
the Makefile to make the actual test suite POSIX compliant)
- Added QUICK-START document to top-level dir
rolla.n.selbak REMOVE-THIS AT intel DOT com
03-21-2003 0.9.0 Release
- More timers bug fixes
- Complete semaphores suite (including bug fixes)
- snapshot of signals tests (including bug fixes)
- Complete message queues suite
- Snapshot of threads tests (most of the non-tag associated APIs)
- framework bug fixes. Added the ./run_tests script.
rolla.n.selbak REMOVE-THIS AT intel DOT com
02-10-2003 0.2.0 Release
- timers bug fixes
- snapshot of semaphores tests
- snapshot of signals tests
- snapshot of threads tests
- framework can build/run functional/stress tests
julie.n.fleischer REMOVE-THIS AT intel DOT com
12-16-2002 0.1.0 Release
- timers tests for TMR and CS tags (for timers)
julie.n.fleischer REMOVE-THIS AT intel DOT com
@@ -1,58 +0,0 @@
Coverage-Area: Message Queues (MSG)
Area-Code: msg
/*
COVERAGE DOCUMENT FOR MESSAGE QUEUES
====================================
This document lists the items that will be tested for POSIX message queues.
Item to Test Status
==========================================================
|| Definitions WON'T DO (for now) ||
|| Behavior DONE ||
|| Functionality WON'T DO (for now) ||
|| Stress WON'T DO (for now) ||
|| Performance WON'T DO (for now) ||
==========================================================
*/
// Function Complete? Priority Est. Completion
// ============================================================================
mq_close YES HIGH DONE
mq_getattr YES MED DONE
mq_notify YES LOW DONE
mq_open YES HIGH DONE
mq_receive YES HIGH DONE
mq_send YES HIGH DONE
mq_setattr YES MED DONE
mq_timedreceive YES LOW DONE
mq_timedsend YES LOW DONE
mq_unlink YES MED DONE
//msgctl NO LOW WON'T
//msgget NO LOW WON'T
//msgrcv NO LOW WON'T
//msgsnd NO LOW WON'T
// ===================================================
/*
Notes:
msgclt, msgget, msgrcv, msgsnd will not be tested at this time as they do
not apply to the MSG tag (apply to XSI).
BUILD INFO
==========
posix1b - See information in BUILD file (under Semaphores). You will
also need to add -I/usr/include/posix1b/ to LDFLAGS.
http://www.mat.uni.torun.pl/~wrona/posix_ipc/
- Install patches and compile/install binary.
- Add -lmqueue to LDFLAGS
- Create the mqueue FS:
mkdir /dev/mqueue
mount -t mqueue none /dev/mqueue
*/
Maintainer: Julie Fleischer
Contributor: Crystal Xiong
@@ -1,51 +0,0 @@
Coverage-Area: Semaphores (SEM)
/*
COVERAGE DOCUMENT FOR SEMAPHORES
============================
This document lists the items that will be tested for POSIX semaphore.
Item to Test Status
==========================================================
|| Definitions NOT STARTED ||
|| Behavior IN PROGRESS ||
|| Functionality NOT STARTED ||
|| Stress NOT STARTED ||
==========================================================
*/
// Function Complete? Priority
// =================================================
sem_close YES HIGH
sem_destroy YES HIGH
sem_getvalue YES MED
sem_init YES HIGH
sem_open YES HIGH
sem_post YES HIGH
sem_timedwait YES MED
sem_trywait YES HIGH
sem_wait YES HIGH
sem_unlink YES HIGH
// ===================================================
/*
Compile:
========
See the BUILD file in the main directory for the most up-to-date
information on how to compile tests from within the framework.
The way I'm compiling these test individually by:
root# gcc 1-1.c -o 1-1 /usr/lib/libposix1b.a
Clean up:
=========
file: cln.sh is a file to clean any open semaphores on the system if they remain
open after running such test.
*/
Maintainer: Majid Awad
@@ -1,78 +0,0 @@
Coverage-Area: Signals
Area-Code: sig
/*
This document lists the items that will be tested for POSIX signals.
Item to Test Status
==========================================================
|| Definitions DONE ||
|| Behavior see table below ||
|| Functionality see table below ||
|| Stress see table below ||
==========================================================
The signal functions that will be tested as well as the priority to
the POSIX Test Suite creators are listed below.
Columns are:
Function - function name
Tag - tag that applies to the function in the POSIX spec
Complexity - POSIX test suite owners' intuitions at complexity of the function
as well as complexity required to create a test suite (subjective)
Recommended? - set to "NO" if the POSIX spec recomments using *other*
functions instead of this one going forward; set to "YES" otherwise
Priority - POSIX test suite owners' intuitions at priorities of these
functions (subjective)
Behavior? - Has a behavior test been created? Set to DONE if finished. Set
to tester's name if in progress. Blank items are open.
Functional? - Has a functional test been created? Set to DONE if finished.
Set to tester's name if in progress. Blank items are open.
Stress? - Has a stress test been created? Set to DONE if finished. Set
to tester's name if in progress. Blank items are open.
*/
//Function Complete? Pri
//=============================================================================
bsd_signal WONT LOW
kill YES HIGH
killpg YES HIGH
pthread_kill YES MED
pthread_sigmask YES MED
raise YES HIGH
sigaction YES HIGH
sigaddset YES MED
sigaltstack YES LOW
sigdelset YES MED
sigemptyset YES MED
sigfillset YES MED
sighold YES MED
sigignore YES MED
siginterrupt WONT LOW
sigismember YES MED
sigpause YES MED
sigpending YES MED
sigprocmask YES MED
sigqueue YES LOW
sigrelse YES MED
sigsuspend YES MED
sigtimedwait YES LOW
sigwait YES MED
sigwaitinfo YES LOW
signal YES MED
sigset YES LOW
/*
Items left to prioritize:
- Any additional information listed in the POSIX System Interfaces document
on signals (Namely, any requirements in section 2.4.).
- Any functional requirements listed in the POSIX Base Definitions document.
(ex. Testing that each signal listed in the POSIX Base Definitions
document functionally performs in the manner in which that document
specifies.)
*/
Maintainer: Salwan Searty
Contributor: Rusty Lynch
Contributor: Rolla Selbak
Contributor: Julie Fleischer
@@ -1,94 +0,0 @@
Coverage-Area: Threads (THR)
Area-Code: thr
/*
COVERAGE DOCUMENT FOR TIMERS
============================
This document lists the items that will be tested for POSIX threads.
Item to Test Status
==========================================================
|| Definitions DONE ||
|| Interfaces see table below ||
|| Functionality NOT STARTED ||
|| Stress NOT STARTED ||
==========================================================
*/
// Function Complete? Priority
// =================================================
pthread_attr_destroy YES HIGH
pthread_attr_getdetachstate YES HIGH
pthread_attr_init YES HIGH
pthread_attr_setdetachstate YES HIGH
pthread_cancel YES HIGH
pthread_cond_broadcast YES MED
pthread_cond_destroy YES MED
pthread_cond_init YES MED
pthread_cond_signal YES MED
pthread_cond_timedwait YES MED
pthread_cond_wait YES MED
pthread_condattr_destroy YES LOW
pthread_condattr_init YES LOW
pthread_condattr_getpshared YES LOW
pthread_condattr_setpshared YES LOW
pthread_create YES HIGH
pthread_detach YES HIGH
pthread_equal YES HIGH
pthread_exit YES HIGH
pthread_join YES HIGH
pthread_mutex_destroy YES HIGH
pthread_mutex_init YES HIGH
pthread_mutex_lock YES HIGH
pthread_mutex_trylock YES HIGH
pthread_mutex_unlock YES HIGH
pthread_mutexattr_destroy YES HIGH
pthread_mutexattr_init YES HIGH
pthread_once YES HIGH
pthread_self YES HIGH
pthread_setcancelstate YES HIGH
pthread_setcanceltype YES HIGH
pthread_testcancel YES HIGH
// ===================================================
/*
NOTES
=====
*For now, didn't include definitions that have specific tags attributed to them.
(i.e. TPS, XSI, BAR, etc.)
*See BUILD file in top-level dir for info on how to build and execute threads on
different implementations on Linux.
=============================
NON-HIGH PRIORITY FUNCTIONS
=============================
// Function Complete? Priority
// =================================================
pthread_atfork YES LOW
pthread_attr_getschedparam YES MED
pthread_attr_setschedparam YES MED
pthread_cleanup_push YES MED
pthread_cleanup_pop YES MED
pthread_getspecific YES MED
pthread_key_create YES MED
pthread_key_delete YES MED
pthread_mutexattr_getpshared YES LOW
pthread_mutexattr_setpshared YES LOW
pthread_rwlock_destory YES LOW
pthread_rwlock_init YES LOW
pthread_rwlock_rdlock YES LOW
pthread_rwlock_timedrdlock YES LOW
pthread_rwlock_timedwrlock YES LOW
pthread_rwlock_tryrdlock YES LOW
pthread_rwlock_trywrlock YES LOW
pthread_rwlock_unlock YES LOW
pthread_rwlock_wrlock YES LOW
pthread_rwlockattr_destory YES LOW
pthread_rwlockattr_getpshared YES LOW
pthread_setspecific YES MED
*/
Maintainer: Rolla Selbak
@@ -1,80 +0,0 @@
Coverage-Area: Clocks and Timers (TMR)
Area-Code: tmr
/*
COVERAGE DOCUMENT FOR TIMERS
============================
This document lists the items that will be tested for POSIX timers.
Item to Test Status
==========================================================
|| Definitions DONE ||
|| Behavior DONE with TMR and CS ||
|| tags planned. ||
|| see table below ||
|| Functionality STOPPED FOR NOW ||
|| Stress STOPPED FOR NOW ||
==========================================================
*/
// Function Complete? Priority
// =================================================
clock YES MED
clock_getcpuclockid YES LOW
clock_getres YES MED
clock_gettime YES* MED
clock_settime YES* MED
clock_nanosleep YES* HIGH
nanosleep YES HIGH
timer_create YES* HIGH
timer_delete YES MED
timer_getoverrun YES HIGH
timer_gettime YES MED
timer_settime YES MED
// ===================================================
// *Incomplete because process time clocks functionality not in current version
// under test.
/*
NOTES
=====
See the BUILD file in the main directory for the most up-to-date
information on how to compile tests from within the framework.
Some additional notes:
If you want to get CLOCK_MONOTONIC, though, one option that worked
with HRT 2.5.54bk6 and below and RH7.3 was to include
/usr/src/linux/Documentation/high-res-timers/lib/posix_time.h
and turn on -D_POSIX_TIMERS.
Testing BIN List
================
Items which I'd like to test more in the future (possibly in functional or
stress tests).
- Absolute timers and clock changes:
- test setting the time for a timer where the interval is large
- also, test where the delta between old and new clock time is large
=> forces division of large numbers, could have inaccuracies (would
probably? be a stress test)
- test clock_nanosleep() or nanosleep() with a variety of different signals
being sent to interrupt it (esp. if they have no user-handler)
-> probably also stress
- Also, there may be some ideas for stress tests in the Base Definitions
document.
POSIX Timers Implementations
============================
glibc Timers in user-space - http://ftp.gnu.org/gnu/glibc/
High Res Timers - http://high-res-timers.sourceforge.net
Alternate High Res Timers - http://high-res-timers.sourceforge.net (look
on mailing list for Jim Houston's alternate
implementation -- patch that goes on top
of George Anzinger's HRT)
*/
Maintainer: Julie Fleischer
@@ -1,70 +0,0 @@
ASSERTIONS
==========
This document defines the format of assertions as well as the information
contained in the XML parameters.
Format
------
The general format of an assertion is:
<assertion id="<#>" tag="<string>">
</assertion>
ID
--
The ID is a unique number corresponding to the test case number (see the
README for more information).
Tag
---
The tag uses the conventions defined below.
The format of the tag is below.
Items in <> are replaced with the correct values.
Items in [] are optional.
()+ means the pattern can repeat and occurs at least once
(<type>:<source>:<start line>:<last line>)+ [pt:<POSIXtag>]
type - Refers to the type of source that the assertion was taken from.
Valid values are:
ref - For reference document (generally a POSIX specification)
oth - For any other material (design documents, analysis of
behavior, etc.)
source - Refers to the source that the assertion was taken from. Valid
values are:
For ref:
(Note: # refers to the document version number)
XBD# - POSIX Base Definitions document
XSH# - POSIX System Interfaces document
XCU# - POSIX Shell and Utilities document
XRAT# - POSIX Rationale document
When dealing with Technical Corrigendums, append TC# where # refers to
the technical corrigendum document number.
e.g. XSH6TC1, XBDTC2, etc.
For oth:
user defined - Ideally should be short (1-3 letters) to define the
source.
start line/ - Refers to the first and last line in the source where the
last line assertion is taken from. If the type is oth and there are no
line numbers, this should be the page number (or 0 if no
page numbers).
Note: If you do not have access to the line numbers in
the official POSIX Specs, then simply put in
brackets an unofficial reference
(ex. <section 3.4, third bullet>)
pt:<POSIXtag> - If the assertion is taken from a POSIX specification and there
is a POSIX tag (pt) associated with it, the additional string
pt:<POSIXtag> can designate this. <tag> is the three letter
POSIX tag.
Contributors: geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
ajosey REMOVE-THIS AT rdg DOT opengroup DOT org
rolla.n.selbak REMOVE-THIS AT intel DOT com
@@ -1,20 +0,0 @@
BOUNDARY TESTS
==============
It is sometimes useful to test parameter boundaries as part of API testing.
In the POSIX Test Suite Framework, variables cannot be assigned to values that
would cause warnings (because warnings are treated as errors), so the following
list of boundary values has been created for boundary testing.
These boundary values are those values that the gcc compiler would set an
invalid parameter to during compile time:
INT32_MAX+1 -2147483647 (gcc compiler gave -2147483648)
INT32_MIN-1 2147483647
unassigned val -1073743192
unassigned val 1075002478
Potentially the MAX+1/MIN-1 values are deterministic. The others are just
empirical examples.
Contributors: julie.n.fleischer REMOVE-THIS AT intel DOT com
geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
@@ -1,51 +0,0 @@
This document describes the process for reporting bugs found _by_ the
POSIX Test Test Suites.
A future document will cover how to report bugs found _within_ the
POSIX Test Test Suites.
This document describes the steps we'd like to take to ensure we are finding
new, important issues and reporting them in a clear, consice, and effective
manner.
1. Bug is found - i.e., Test case shows failure.
Ensure you were testing using:
- The latest version of the test case.
- The latest version of the code under test.
- Code under test that is targeted* for the POSIX Test Suite reporting.
2. Research.
Research as many of the following areas as possible to ensure the bug
is new:
- Mailing list for the code under test.
- Bug database for the code under test.
- LKML - (one archive: http://marc.theaimsgroup.com/?l=linux-kernel)
- Kernel bug database - http://bugme.osdl.org
3. Debug as much as possible.
Some steps include:
- Create a test case which clearly shows the bug.
- If possible, find the fault in the code under test causing the test case
failure.
- If possible, create a patch to fix the fault.
4. If the code under test is compatible with another POSIX version (e.g.,
1993), then determine whether this test case is for functionality
added by the 2001 spec.
If yes, document this in the assertions.xml file**.
5. Create an email bug report containing:
- description of the issue
- kernel used
- patches applied
- relevant configuration information
- hardware used
- test case to reproduce the issue (can be included in the email)
6. Send email bug report to the mailing list for the code under test (or
its bug database, if applicable). Copy LKML, if applicable. [If it
is a bug in the Linux Kernel, submit directly to the Linux Kernel
bug database.]
*targeted implementation = an implementation which POSIX Test Suite will
be run against; not yet formally defined
**Process for tracing a test case to previous POSIX specifications not
yet defined.
Contributors: geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
@@ -1,12 +0,0 @@
This document describes the coding guidelines for this project.
Since one of the most common uses of these API tests is to find bugs
with the Linux kernel and submit bug reports to the linux-kernel
mailing list with a pointer to the source code of the test case that
demonstrates the bug, it makes sense to follow the coding guidelines
followed by the Linux kernel. These are available at:
http://www.purists.org/linux/ or in linux/Documentation/CodingStyle
in a Linux distribution.
Contributors: rusty.lynch REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
@@ -1,93 +0,0 @@
Conformance Test: Definition and Structure
===========================================
This document describes what conformance tests are, how they are created,
and the structure they follow in CVS.
Conformance Test Definition
---------------------------
Conformance tests test conformance to the POSIX* specification. They test
both that the header files are correct and that the behavior defined in
the specification is implemented.
Directory Structure
-------------------
The directory structure for conformance tests is as follows.
All tests are located in the conformance/ directory off of posixtestsuite/.
Within this directory, there are the following three subdirectories:
definitions/ - This directory contains tests for each *.h file in the POSIX
spec. Tests are taken from the Base Definitions document.
interfaces/ - This directory contains tests for each function listed in the
POSIX spec. Tests are taken from the System Interfaces document.
behavior/ - This directory contains tests from any document that do not
directly correlate to functions (as in interfaces/) or header files
(as in definitions/).
The breakdown of these subdirectories is as follows:
definitions/
-----------
The definitions/ directory contains one subdirectory per *.h file. Each
subdirectory should have the name *_h (i.e., the *.h file name with "_"
replacing ".").
interfaces/
----------
The interfaces directory contains one subdirectory per function listed
in the System Interfaces document.
behavior/
--------
This directory is broken down by functional area in a manner similar to
functional and stress tests (see HOWTO_<TBD> - for now, see email discussions
on functional/stress test structure).
Writing Tests
-------------
Within each lowest level directory (definitions/*_h for definitions,
interfaces/<function> for interfaces, and behavior/<functional area> for
behavior), an assertions.xml file is used to describe the tests, and tests
have the structure M-N.c or M-N.sh. More details are below.
Speculative Tests
-----------------
Tests which the POSIX spec uses the words "may" or "implementation-defined"
to define are considered speculative by PTS and are created in a
speculative/ directory off of the functional area directory. (For
example, mq_timedsend/speculative.)
These tests attempt to determine which of the implementation-defined
alternatives the current implementation implements. PTS_PASS is always
returned if the test is able to finish.
assertions.xml
--------------
This file contains a list of assertions to be tested, an ID for each
assertion, and descriptive attributes to be used in categorizing
assertions. For more information on creating and using these files,
see HOWTO_Assertions.
Test Cases
----------
Test cases are numbered M-N.c or M-N.sh where M corresponds to the
assertion ID of the assertion being tested, and N is an ID for the specific
tests. (ex. assertion 8 may have test cases 8-1.c 8-2.c and 8-3.sh)
Generally, *.sh scripts are only used when the test case is trivial.
The following documents may be helpful in test case creation:
- HOWTO_DefinitionsTest - describes how to create definitions tests
- HOWTO_ResultCodes - describes the result codes test cases should return
- HOWTO_BoundaryTest - describes how to create boundary tests for functions
* POSIX (R) is a registered trademark of the IEEE
Contributors: rusty.lynch REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
@@ -1,93 +0,0 @@
COVERAGE FILES
==============
Every area of the POSIX spec that has tests written for it should be tracked by
a corresponding COVERAGE.<area> file in the Documentation directory. The first
example file is COVERAGE.timers, which I will keep up to date with the latest
format.
The idea with these files is to track the progress of test creation. Also, the
files will be parsed nightly to generate the Project Status web page at
http://posixtest.sf.net/status.html so they must conform to a certain format.
To simplify the creation of a tool to parse these files, the following rules
should be observed in creating the file.
Completion of POSIX Function Conformance Tests
----------------------------------------------
There should be one line for each POSIX function included in this area of the
POSIX spec. The tests for these functions are currently found in the
conformance/behavior/<function-name> directory. (They may be moved to
conformance/interfaces/<function-name> shortly.) The function test directory
need not exist yet, but the list of functions in the COVERAGE file should be
complete.
Each line should have this format:
<function-name> <complete?> <other-fields>
That is, spaces or tabs as whitespace separating the function name and complete
fields, and any other fields, if present. Other fields will be ignored by the
parser currently.
For example, from COVERAGE.timers:
clock_gettime NO* MED
Only the first letter of the complete? field will be read, and should be either
N or Y. (So you are free to have asterisks as Julie has done.)
She has a priority field after that HIGH/MED/LOW which is currently not used by
the parser.
Information Fields
------------------
Additional information should be provided with this format:
Field-Name: Value-Data
The field "Coverage-Area" MUST be provided with a description of this area of
the POSIX spec such as "Clocks & Timers (TMR)".
The field "Area-Code" MUST be provided, a unique code with no spaces to use
internally within the web page to link to the stats about this coverage area,
such as "tmr" or "sig".
The field "Maintainer" SHOULD be provided with the name of the active
maintainer of this area.
The field "Contributor" MAY be provided (one or more times) with a name of
someone who contributed to the tests in this area (other than the active
maintainer).
Comment Lines
-------------
Any line that is not of the type defined above must be denoted as a comment
line. There are three types of comment lines that will be ignored:
- Any blank line or line with whitespace only
- Any line beginning with //
- Any lines between an opening line of /* and a closing line of */ (inclusive)
For example, only the clock_gettime line would be parsed below:
// SAMPLE FILE: First Line
// The line above is whitespace only, and the line below is blank
/*
This section is for longer
comments.
*/
clock_gettime NO* MED
// SAMPLE FILE: Last Line
Other Tests: Definitions, Functional, Stress, etc.
--------------------------------------------------
These tests are not currently handled by the parser tool, and thus should be
included in comment fields if the information is present.
Future Extensions
-----------------
If other fields become required later, they will be moved to the front of the
text lines, so that optional fields can still appear after them.
Contributors: geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
@@ -1,73 +0,0 @@
DEFINITIONS TESTING
===================
A variety of header file definitions are listed in the POSIX Base Definitions
document. The steps below describe how to test the various types of
definitions that appear.
Definitions Testing -> STRUCTURES
---------------------------------
To test that a structure has been correctly defined, we add two tests into
one .c file. The first test tests that the structure has been declared, and
the second that all elements of the structure are correctly defined.
To make the first test and setup the second, delcare the structure as:
struct <structure under test> this_type_should_exist, t;
To make the second test, create a dummy function and assign elements of
the correct structure to t or assign t to certain elements:
int dummyfcn (void)
{
t.<field> = <value>;
<variable> = t.<field>;
}
For assignment, some rules of thumb are:
- For variables of a defined type, assign t.<field> to these values.
ex.
sigset_t *set;
set = &t.sa_mask;
- For variables which are other functions, assign a function to t.<field>.
ex.
extern void signal_handler(int);
t.sa_handler = signal_handler;
For examples, see posixtestsuite/conformance/definitions/signal/15-1.c
Definitions Testing -> MACROS
-----------------------------
Macros are tested to see if they are defined. This is done via the
#ifdef preprocessor lines.
ex.
#include <include file with definitions.h>
#ifndef <Macro name>
#error <Macro name> not defined
#endif
For examples, see posixtestsuite/conformance/definitions/signal/22-*.c
Definitions Testing -> FUNCTIONS
--------------------------------
To test functions, declare a typedef of a test function identical to the
function under test, create a variable of that typedef, and try to assign
it to the function under test.
ex.
typedef int (*fcn_test)(char *, char *);
int dummyfcn (void)
{
fcn_test dummyvar;
dummyvar = fcn;
return 0;
}
For examples, see posixtestsuite/conformance/definitions/signal/43-1.c
Contributors: Inaky.Perez-Gonzalez REMOVE-THIS AT intel DOT com
Julie.N.Fleischer REMOVE-THIS AT intel DOT com
@@ -1,79 +0,0 @@
Functional and Stress Tests: Definition and Structure
======================================================
This document describes what functional and stress tests are, how they
are created, and the structure that they follow in CVS.
Functional Test Definition
--------------------------
Functional tests test the behavior of functional areas of the POSIX*
specification. They do not relate directly to lines in the POSIX
specifications, but rather test that the overall behavior specified by
the functional area is present.
Stress Test Definition
----------------------
Stress tests are designed to monitor how the system behaves when it is
taxed by excessively using the functional areas in the POSIX specification
or monitoring how the functional areas in the POSIX specification behave
when the system is taxed.
Directory Structure
-------------------
Functional and stress tests follow the same structure.
The functional/ and stress directories off of posixtestsuite are where the
functional and stress tests, respectively, are stored.
Each of these are further subdivided into POSIX area (Timers, Semaphores,
etc.). For example, functional/timers.
Within the functional/<POSIX area> directory, you should create the
following files.
- Makefile - master Makefile which will make all tests within the area
- run.sh - file which will run all functional tests. The run.sh can run
conformance tests, functional tests from a different area (i.e.,
functional/threads/run.sh can call functional/timers/threadstests/test.c),
as well as functional tests in the current area. If there are tests that
apply to more than one area, they can go in either area and be called from
the other if needed.
Assume that the run.sh is called from the directory it is currently in
when writing path names to files.
- assertions.xml - This file maps test descriptions to test cases as in
conformance tests. The grammar for functional/stress tests is:
<?xml version "1.0"?>
<!DOCTYPE assertions [
<!ELEMENT assertion>
<!ATTLIST assertion
files CDATA #REQUIRED
tag CDATA #REQUIRED
>
]>
Where the tag follows the same structure outlined in HOWTO_Assertions, and
the files="..." field tags a comma delimited list of files which are
used to test the assertion. For example,
<assertion id="1" files="threadone,threadtwo,threadthree" tag="pt:THR">
Three threads can be run in parallel.
</assertion>
- coverage.txt - This document contain information on the completion of
test cases for assertions as in the conformance tests.
Content is lines with content:
<assertion ID> <YES/NO - for completed/not completed>
So long as the functional/stress tests follow these guidelines, they
can be built and run by the framework. How the directory is subdivided
is up to the area creator to define, but some suggestions have been:
- create directories corresponding to POSIX chapters (see .1-1990 or
.1-1996 specs)
- create a number corresponding to the assertion ID for each directory
* POSIX (R) is a registered trademark of the IEEE
Contributors: julie.n.fleischer REMOVE-THIS AT intel DOT com
ajosey REMOVE-THIS AT rdg DOT opengroup DOT org
geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
@@ -1,16 +0,0 @@
This is an index to the various HOWTO files in this directory.
HOWTO_Assertions - describes format of assertions.xml files
HOWTO_BoundaryTest - information about testing boundary conditions
HOWTO_BugReport - dealing with a test failure the suite finds
HOWTO_CodingGuidelines- describes coding guidelines for this project
HOWTO_ConformanceTest - info on creation and structure of conformance tests
HOWTO_Coverage - describes format of COVERAGE.<area> files
HOWTO_DefinitionsTest - ideas behind testing POSIX header files
HOWTO_Functional- - info on creation and structure of functional
StressTest and stress tests
HOWTO_INDEX - lists all HOWTO files with descriptions
HOWTO_Release - describes how to release a version of PTS
HOWTO_ResultCodes - standardized return codes for tests
HOWTO_RunTests - information on building/running tests
HOWTO_Tagging - describes how to tag files for inclusion in a release
@@ -1,34 +0,0 @@
HOWTO Release a Package of the POSIX Test Suite
===============================================
This document describes the procedure for releasing files for the POSIX
Test Suite. These actions should be taken to verify the integrity of the
released files.
=======================================================================
1. Pull all code on the developer tag and tag with the release tag (See
the HOWTO_Tagging document for more information on how to do this.).
2. Create a posixtestsuite-<major>.<minor>.<rev>.tar.gz file containing
everything with the release tag.
Note: Follow guidelines on:
http://en.tldp.org/HOWTO/Software-Release-Practice-HOWTO/distpractice.html
3. Use the SF admin interface to add this file to the project.
4. Download the *.tar.gz file from the SF interface and untar it in
a sandbox.
5. Run "make" to try to build and execute all files in the release, and
ensure that they all build and execute correctly.
6. Craft a release message and send to: posixtest-announce.
7. Send a copy of that release message to: LKML, cc: posixtest-discuss.
[This ensures discussions happen on the discuss mailing list, not
the announce mailing list.]
8. Update sourceforge homepage and project page with this information.
9. Update freshmeat.net with this information.
@@ -1,43 +0,0 @@
RESULT CODES
============
POSIX Test Suite tests all return standard result codes for ease in
interpreting the output. The result code terms are taken from
IEEE Test Methods for Measuring Conformance to POSIX (IEEE 1003.3-1991).
These result codes are a subset of the LSB result codes and, for
consistency with LSB, are given the same number.
Initial Contributors:
ajosey REMOVE-THIS AT rdg DOT opengroup DOT org
julie.n.fleischer REMOVE-THIS AT intel DOT com
geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
The PTS result codes are:
#define PTS_PASS 0
#define PTS_FAIL 1
#define PTS_UNRESOLVED 2
#define PTS_UNSUPPORTED 4
#define PTS_UNTESTED 5
A brief discussion of each of these follows:
PTP_PASS Used when the test executes fully with no problems and passes.
PTP_FAIL Used when the test executes fully, but fails.
PTP_UNRESOLVED Used when the test was blocked from fully completing and
the pass/failure results cannot be determined.
PTP_UNSUPPORTED Used if the test is for a conditional feature that is
not implemented.
PTP_UNTESTED Used when a feature does not have a test associated
with it because:
- The test is just a stub and doesn't do anything
- The test is only partially complete and can't really
finish the test
- The test is complete in some cases, but certain things
can happen that leave the test incomplete. When these
happen, it's PTP_UNTESTED.
These result codes are contained in the header file posixtest.h, located
in the include/ directory.
This header file should be included in each test suite created.
@@ -1,98 +0,0 @@
SECTIONS:
1. Overview
2. Framework Functionality
3. Building and Running the Tests
1. Overview
------------
This document describes how to run the tests in the POSIX Test Suite.
Our framework currently has the ability to build and run conformance,
functional, and stress tests. Only conformance and functional tests are
built when a user tries to "make all" as stress tests leave the system
in an indeterminate state and should generally be run manually.
2. Framework Functionality
----------------------------------------------------
* Conformance Tests
The build and execution process varies per conformance tests.
For definitions tests, the build and execution process is the same since
the "test" is that the file compiles. A definitions test will be compiled,
not linked, by the compiler.
For all other tests, they will have one test for the compile, one for the
link, and one for the execution of the test. Successfull tests return
PTS_PASS, which the compiler interprets as success. All other return
values are failures. [For more info, see HOWTO_ResultCodes.]
* Functional/Stress Tests
Functional and stress tests have their own Makefile and method for running,
and the framework merely calls these mechanisms. To build functional and
stress tests, the framework calls the main Makefile for each functional
area. To run these tests, the framework calls the run.sh file for each
functional area.
3. Building and Running the Tests
----------------------------------
**See the BUILD file for info on how to set up the build for the specific
area you are testing (threads, mqs, semaphores, etc.)
To build and run the tests, you should be in the main posixtestsuite/
directory.
From there, execute:
# make
This will build and run all conformance and functional tests [See above
for why stress tests are not built.].
If you'd like to build and run conformance tests for a specific area (threads,
timers, semaphores, message queues, signals), use the script run_tests and
run:
# ./run_tests [SIG|SEM|THR|TMR|MSG]
the argument is the 3 letter POSIX abbreviation for area
* Conformance-specific items
To run conformance tests for a specific directory, first export the
POSIX_TARGET variable to the directory desired.
Ex.
# export POSIX_TARGET=conformance/definitions/time_h
* Linking in a library
To link in a library or add any other flags at build or link time,
modify file LDFLAGS with the -L... -l... or -D... lines you would like
added.
To just build conformance tests, run:
# make build-tests
To just run conformance tests, run:
# make run-tests
* Functional/Stress-specific items
To run only functional tests, run:
# make functional-tests
To run only stress tests, run:
# make stress-tests
To make only functional tests, run:
# make functional-make
To make only stress tests, run:
# make stress-make
To only run functional tests, run:
# make functional-run
To only run stress tests, run:
# make stress-run
Contributors: rusty.lynch REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
rolla.n.selbak REMOVE-THIS AT intel DOT com
@@ -1,42 +0,0 @@
HOWTO Tag Software
==================
Releases of the POSIX Test Suite will happen at defined (TBD) intervals.
In order to get code included in the releases, the tagging scheme below
has been created.
Developer Tagging
=================
When the code a developer is working on is ready for a release, the developer
should tag it with the tag:
posixtestsuite__source
This code will then be pulled to make the official release.
Note: Before code should be considered to be ready for release, it should
follow all HOWTOs currently created.
Release Coordinator Tagging
===========================
The person responsible for gathering and tarring all the files for the
official release will grab all files with the posixtestsuite__source
tag and tag them with the tag:
Release__M_N_P__posixtestsuite__YYMMDD
where M.N.P is the version number, and YYMMDD is the current date.
The version numbering scheme is as follows:
M = Major release. The initial scope of the POSIX Test Suite corresponds
to M=1. That includes tests for all initially scoped POSIX areas (signals,
threads, semaphores, message queues, timers). M<1 is for releases before
the first major release. M>1 will happen when the scope changes.
N = Minor release. The various minor releases have yet to be determined,
but will most likely roughly correspond to the milestones defined.
P = Release number. This is incremented each time a new release is made.
Restarts at 0 for each new Major/Minor combination.
Contributors: rolla.n.selbak REMOVE-THIS AT intel DOT com
geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
julie.n.fleischer REMOVE-THIS AT intel DOT com
@@ -1,9 +0,0 @@
This package does not install yet ... it is intended to be run
directly.
See BUILD for information on how to configure your system to build
all tests.
See Documentation/HOWTO_RunTests for information on how to run all tests.
@@ -1,18 +0,0 @@
#This file contains all lines needed for linking the test suites.
#These may be on one line or multiple lines.
#
#Place the -l, -L, or -D piece before the item to link.
#Lines beginning with # are comments.
#
#For example,
#-lpthread -D_GNU_SOURCE
#
#Recommended flags:
#-D_XOPEN_SOURCE=600 -lpthread -lrt -lm
#
# For use with Linux, you may try the following flags to
# allow for the NPTL-specific compilation (used in some test cases)
# Note: this sometimes require the package nptl-devel.*.rpm to be installed.
#-I /usr/include/nptl -L /usr/lib/nptl -D_XOPEN_SOURCE=600 -lpthread -lrt -lm
-lposix_error_mapper -DB_USE_POSITIVE_POSIX_ERRORS
@@ -1,202 +0,0 @@
# Copyright (c) 2002, Intel Corporation. All rights reserved.
# Created by: inaky.perez-gonzalez REMOVE-THIS AT intel DOT com
# This file is licensed under the GPL license. For the full content
# of this license, see the COPYING file at the top level of this
# source tree.
#
# Kind of a little bit bastardized automakefile ... This is the
# temporary glue to hold it all together; once our needs change or we
# need something more advanced, we'll implement it.
#
# So far, I understand Make is not the best language, but I felt lazy
# today and wanted to use the default rules of automake [did I alredy
# mentioned I am bastardizing it?].
#
# Ok, I don't use Automake any more
#
# Added patch from dank REMOVE-THIS AT kegel DOT com
#
# Added tests timeout from Sebastien Decugis (http://nptl.bullopensource.org)
# Expiration delay is 240 seconds
TIMEOUT_VAL = 240
# The following value is the shell return value of a timedout application.
# with the bash shell, the ret val of a killed application is 128 + signum
# and under Linux, SIGALRM=14, so we have (Linux+bash) 142.
TIMEOUT_RET = $(shell cat $(top_builddir)/t0.val)
top_builddir = .
LOGFILE = $(top_builddir)/logfile
LDFLAGS := $(shell cat LDFLAGS | grep -v \^\#)
RUN_TESTS := $(shell $(top_builddir)/locate-test \
--execs $(top_builddir)/$(POSIX_TARGET))
BUILD_TESTS := $(shell $(top_builddir)/locate-test \
--buildable $(top_builddir)/$(POSIX_TARGET))
FUNCTIONAL_MAKE := $(shell $(top_builddir)/locate-test --fmake)
FUNCTIONAL_RUN := $(shell $(top_builddir)/locate-test --frun)
STRESS_MAKE := $(shell $(top_builddir)/locate-test --smake)
STRESS_RUN := $(shell $(top_builddir)/locate-test --srun)
PWD := $(shell pwd)
TIMEOUT = $(top_builddir)/t0 $(TIMEOUT_VAL)
all: build-tests run-tests
build-tests: $(BUILD_TESTS:.c=.test)
run-tests: $(RUN_TESTS:.test=.run-test)
functional-tests: functional-make functional-run
stress-tests: stress-make stress-run
tests-pretty:
$(MAKE) all | column -t -s:
CFLAGS = -g -O2 -Wall -Werror -D_POSIX_C_SOURCE=200112L
# add -std=c99, -std=gnu99 if compiler supports it (gcc-2.95.3 does not).
check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
CFLAGS += $(call check_gcc,-std=c99,)
CFLAGS += $(call check_gcc,-std=gnu99,)
INCLUDE = -Iinclude
# FIXME: exaust cmd line length
clean:
@rm -f $(LOGFILE)
# Timeout helper files
@rm -f $(top_builddir)/t0{,.val}
# Built runnable tests
@find $(top_builddir) -iname \*.test | xargs -n 40 rm -f {}
@find $(top_builddir) -iname \*~ -o -iname \*.o | xargs -n 40 rm -f {}
@$(foreach DIR,$(FUNCTIONAL_MAKE),make -C $(DIR) clean >> /dev/null 2>&1;) >> /dev/null 2>&1
# Rule to run a build test
# If the .o doesn't export main, then we don't need to link
.PRECIOUS: %.test
%.test: %.o
@COMPLOG=$(LOGFILE).$$$$; \
[ -f $< ] || exit 0; \
{ nm -g $< | grep -q " T main"; } || \
{ echo "$(@:.test=): link: SKIP" | tee -a $(LOGFILE) && exit 0; }; \
if $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) > $$COMPLOG 2>&1; \
then \
echo "$(@:.test=): link: PASS" | tee -a $(LOGFILE); \
else \
( \
echo "$(@:.test=): link: FAILED. Linker output: "; \
cat $$COMPLOG; \
) >> $(LOGFILE); \
echo "$(@:.test=): link: FAILED "; \
fi; \
rm -f $$COMPLOG;
# Rule to run an executable test
# If it is only a build test, then the binary exist, so we don't need to run
.PHONY: %.run-test
%.run-test: %.test $(top_builddir)/t0 $(top_builddir)/t0.val
@COMPLOG=$(LOGFILE).$$$$; \
[ -f $< ] || exit 0; \
$(TIMEOUT) $< > $$COMPLOG 2>&1; \
RESULT=$$?; \
if [ $$RESULT -eq 1 ]; \
then \
MSG="FAILED"; \
fi; \
if [ $$RESULT -eq 2 ]; \
then \
MSG="UNRESOLVED"; \
fi; \
if [ $$RESULT -eq 4 ]; \
then \
MSG="UNSUPPORTED"; \
fi; \
if [ $$RESULT -eq 5 ]; \
then \
MSG="UNTESTED"; \
fi; \
if [ $$RESULT -eq $(TIMEOUT_RET) ]; \
then \
MSG="HUNG"; \
fi; \
if [ $$RESULT -gt 5 -a $$RESULT -ne $(TIMEOUT_RET) ]; \
then \
MSG="INTERRUPTED"; \
fi; \
if [ $$RESULT -eq 0 ]; \
then \
echo "$(@:.run-test=): execution: PASS" | tee -a $(LOGFILE); \
else \
( \
echo "$(@:.run-test=): execution: $$MSG: Output: "; \
cat $$COMPLOG; \
) >> $(LOGFILE); \
echo "$(@:.run-test=): execution: $$MSG "; \
fi; \
rm -f $$COMPLOG;
$(top_builddir)/t0: $(top_builddir)/t0.c
@echo Building timeout helper files; \
$(CC) -O2 -o $@ $<
$(top_builddir)/t0.val: $(top_builddir)/t0
echo `$(top_builddir)/t0 0; echo $$?` > $(top_builddir)/t0.val
%.run-test: %.sh $(top_builddir)/t0 $(top_builddir)/t0.val
@COMPLOG=$(LOGFILE).$$$$; \
chmod +x $<; \
$(TIMEOUT) $< > $$COMPLOG 2>&1; \
RESULT=$$?; \
if [ $$RESULT -eq 0 ]; \
then \
echo "$(@:.run-test=): execution: PASS" | tee -a $(LOGFILE);\
else \
( \
echo "$(@:.run-test=): execution: FAILED: Output: ";\
cat $$COMPLOG; \
) >> $(LOGFILE); \
echo "$(@:.run-test=): execution: FAILED "; \
fi; \
rm -f $$COMPLOG;
.PRECIOUS: %.o
%.o: %.c
@COMPLOG=$(LOGFILE).$$$$; \
if $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ $(LDFLAGS) > $$COMPLOG 2>&1; \
then \
echo "$(@:.o=): build: PASS" | tee -a $(LOGFILE); \
else \
( \
echo "$(@:.o=): build: FAILED: Compiler output: "; \
cat $$COMPLOG; \
) >> $(LOGFILE); \
echo "$(@:.o=): build: FAILED "; \
fi; \
rm -f $$COMPLOG;
# Functional/Stress test build and execution
functional-make:
$(foreach DIR,$(FUNCTIONAL_MAKE),make -C $(DIR);)
.PHONY: $(FUNCTIONAL_RUN)
functional-run: $(FUNCTIONAL_RUN)
$(FUNCTIONAL_RUN):
cd $@; ./run.sh
cd $(PWD)
stress-make:
$(foreach DIR,$(STRESS_MAKE),make -C $(DIR);)
.PHONY: $(STRESS_RUN)
stress-run: $(STRESS_RUN)
$(STRESS_RUN):
cd $@; ./run.sh
cd $(PWD)
@@ -1,29 +0,0 @@
RELEASE DATES:
---------------
-June 03, 2005 Version 1.5.1 Released
PTS-1.5.1 has a plenty of AIO interface test additions and bug-fixes by Sebastien Decugis. Also there are a lot of bug fixes by other people. Thanks to Sebastien Decugis and other people for continued support and contributions.
This release has been tested on glibc-2.3.3 and kernel 2.6.10 with libposix-aio-0.3. The test result for this release can be found here: http://posixtest.sourceforge.net/testpass/PTS_1.5.1-2.6.10-PAIO_ia32.htm
-December 17, 2004 Version 1.5.0 Released
A much anticipated release with plenty of interface test additions and bug-fixes. Added AIO test suite by Laurent Vivier. Special thanks to Sebastien Decugis and Ulrich Drepper for continued support and contributions. Also exciting news about OSDL and Bull integrating PTS into OSDL's Scalable Test Platform (STP).
-July 06, 2004 Version 1.4.3 Released
Here goes posixtest-1.3. Besides many bug fixes, this release includes new pthread test cases (conformance, functional, stress) by Sebastien Decugis and Abhijeet Bisain. Special thanks goes to people who made contributions. And we are glad that PTS is helping kernel, library and application developers and OSDs on their POSIX related work. Please see the release page for downloads and more information.
-May 27, 2004 Version 1.4.2 Released
Posixtestsuite-1.4.2 adds several pthread test cases by Sebastien Decugis. Also there are a lot of bug fixes by Ulrich Drepper and other people. This suite has been run on latest glibc and linux kernel 2.6.5. All the failed cases has been analyzed. Please see the release page for downloads and more information.
-May 01, 2004 Version 1.4.1 Released
posixtestsuite-1.4.1 fixes a bunch of bugs in 1.4.0 version. This release has been tested on glibc-2004-04-29 cvs pull (NPTL enabled) and linux-2.6.5-mm6 kernel.It is noted that "POSIX Message Queues" has been integrated into linux kernel and glibc. Please see the release page for downloads and more information. The test result for this release can be found here: test results - PTS 1.4.1, Kernel 2.6.5-mm6, ia32 .
-April 15, 2004 Version 1.4.0 Released
POSIX Test Suite 1.4.0 includes more pthread conformance test cases. Now we have test cases covering almost all pthread APIs. Conformance test cases for options like CPT, TCT, TMR are also added. There are also a lot of bug fixes made from the previous 1.3.0 version (thanks for Ulrich Drepper's patches and to everyone who made contributions). Please see the release page for downloads and more information.
-March 11, 2004 Test Pass Results - (CVS pull 3-04-04)
POSIX Test Suite test pass results available for [CVS pull 3-04-04, Kernel 2.6.1, libc-2004-02-15 and message queue 4.17 patch on IA64 platform]. The results can be found here: test results - cvs 3-04-04, Kernel 2.6.1, ia64 .
-March 1, 2004 Test Pass Results - (CVS pull 2-20-04)
POSIX Test Suite test pass results available for [CVS pull 2-20-04, Kernel 2.6.1, libc-2004-02-01 and message queue 4.17 patch on IA32 platform]. We are currently in the process of setting up a main test results page, but until then, the results can be found here: test results - cvs 2-20-04, Kernel 2.6.1 .
@@ -1,65 +0,0 @@
QUICK-START
***********
So you're in a hurry and don't feel like reading all those docs in the Documentation section that we have worked so hard to write huh?
No worries! Here's a quick doc to help you around POSIX** Test Suite.
========================
Setting up your machine
========================
* There is nothing to install, the suite is intended to be run directly.
* See the "BUILD" file for info on how to set up the Makefile and your developer machine,
depending on what specific area you are concentrating on.
(Signals, Semaphores, Threads, Timers or Message Qs).
* "LDFLAGS" is a file used by the Makefile to link to what you specify in it. e.g. if you want to link with lpthread, you would open LDFLAGS and insert the line "-lpthread". LDFLAGS has a few
simple examples contained in it.
===================
Running the tests
===================
* Easiest way to run all the tests is to do a "make" in the top-level directory.
* To run tests for a specific directory, first export the POSIX_TARGET variable
to the directory you want, then perform a "make". e.g.:
# export POSIX_TARGET=conformance/interfaces/pthread_create
# make
* An easy way to run all tests specific to your area of focus, run:
# ./run_tests [MEM|MSG|SEM|SIG|THR|TMR|TPS]
the argument is the 3 letter POSIX abbreviation for area
* For additional information on how to build and run the tests in this
suite, see Documentation/HOWTO_RunTests.
==========================
Documentation & Resources
==========================
POSIX* Test Suite project page: http://posixtest.sf.net
BUILD - describes how to set up your developer machine to build and test
LDFLAGS - File that Makefile uses to link to what you specify
The following files give developers information on how to write test
cases for the project (under Documentation):
HOWTO_Assertions - describes format of the assertions files used to
map test case descriptions to test cases
HOWTO_BoundaryTest - information about testing boundary conditions
HOWTO_CodingGuidelines - describes coding guidelines for this project
HOWTO_Coverage - describes format of COVERAGE.<area> files
HOWTO_DefinitionsTest - ideas behind testing POSIX header files
HOWTO_ResultCodes - standardized return codes for tests
HOWTO_Tagging - describes how to tag files for inclusion in a release
HOWTO_RunTests - describes how to build and run the tests
** POSIX (R) is a registered trademark of the IEEE
Maintainer: Ling Yu ([email protected])
@@ -1,122 +0,0 @@
SECTIONS:
1. Open POSIX* Test Suite Overview
2. Design Goals
3. Implementation
4. Developer Docs & Resources
5. How to Contribute
6. Who are you?
7. Disclaimer
1. Open POSIX* Test Suite Overview
-----------------------------------
The POSIX Test Suite is an open source test suite with the goal of
performing conformance, functional, and stress testing of the IEEE
1003.1-2001 System Interfaces specification in a manner that is
agnostic to any given implementation.
While active development and testing is currently happening on Linux,
our choice of portable tools should make this test suite usable on any
POSIX operating system.
All code is distributed under the GNU General Public License v2. A
copy of this license is contained in the COPYING file.
This document gives a brief overview of the test suite, including its
design goals, implementation, and how to contribute. Within these
sections, we describe where to find more detailed information.
2. Design Goals
----------------
This project was created with the following design goals:
- Enable assertion based traceability for conformance testing of POSIX
specifications. We wanted to capture enough data to make deterministic
statements about our coverage of the POSIX specification.
- Give the ability to send test case source to bug reports to appropriate
open source projects when our test cases revealed bugs in those projects.
(Meaning we wanted fairly simple, self-contained test cases which
illuminated a single failure.)
- Make it easy for test cases to be contributed.
3. Implementation
------------------
This project will cover conformance, functional, stress, performance,
and speculative testing. Conformance, functional, and stress tests are
the only tests formally documented and enabled by our framework, with our
focus mainly on conformance; however, the other types of testing will be
added as the need arises.
For more information on these types of testing, under 'Documenation' see:
HOWTO_ConformanceTest - info on creation and structure of conformance tests
HOWTO_Functional- - info on creation and structure of functional
StressTest and stress tests
For additional information on how to build and run the tests in this
suite, see Documentation/HOWTO_RunTests.
4. Developer Docs & Resources
------------------------------
The following files give developers information on how to write test
cases for the project (under Documentation):
HOWTO_Assertions - describes format of the assertions files used to
map test case descriptions to test cases
HOWTO_BoundaryTest - information about testing boundary conditions
HOWTO_CodingGuidelines- describes coding guidelines for this project
HOWTO_Coverage - describes format of COVERAGE.<area> files
HOWTO_DefinitionsTest - ideas behind testing POSIX header files
HOWTO_ResultCodes - standardized return codes for tests
HOWTO_Tagging - describes how to tag files for inclusion in a release
For additional information on how to build and run the tests in this
suite, see HOWTO_RunTests.
5. How to Contribute
---------------------
* Patches welcome!
* When you create a new test, please fill out an assertion description
if none is available. Create a simple C [.c] or shell script [.sh]
snippet that exploits the assertion and returns 0 or !0
[passes/fails].
Please name the file after the assertion it tests-dash-the number of
the test [up to you, we can do the naming for you also].
The code snippets need to be as simple as possible, for the sake of
all. Please start them with a commentary briefly describing how
you will test the assertion. The idea is that at the end, we can have
automatic tools extracting the data from the XML and source files to
generate reports.
6. Who are you?
---------------
We are the ones currently developing this:
julie.n.fleischer REMOVE-THIS AT intel DOT com
rusty.lynch REMOVE-THIS AT intel DOT com
geoffrey.r.gustafson REMOVE-THIS AT intel DOT com
inaky.perez-gonzalez REMOVE-THIS AT intel DOT com
rolla.n.selbak REMOVE-THIS AT intel DOT com
majid.awad REMOVE-THIS AT intel DOT com
salwan.searty REMOVE-THIS AT intel DOT com
sunyi REMOVE-THIS AT users DOT sourceforge DOT net
Some like to say 'Nih!' from time to time ...
7. Disclaimer
--------------
The Open POSIX Test Suite is not affiliated with the IEEE or The Open Group.
* POSIX (R) is a registered trademark of the IEEE
@@ -1,38 +0,0 @@
/*
Test case for assertion #1 of the WIFEXITED macro defined in sys/wait.h
by forking a new process, having the process return -1, and then
verifying WIFEXITED returns a non-zero value.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include "posixtest.h"
int main()
{
if (fork() == 0) {
/* child */
return -1;
} else {
int s;
/* parent */
if (wait(&s) == -1) {
perror("Unexpected error while setting up test "
"pre-conditions");
return PTS_UNRESOLVED;
}
if (WIFEXITED(s)) {
printf("Test PASSED\n");
return PTS_PASS;
}
}
printf("Test FAILED\n");
return PTS_FAIL;
}
@@ -1,37 +0,0 @@
/*
Test case for assertion #1 of the WIFEXITED macro defined in sys/wait.h
by forking a new process, having the process return 0, and verifying
WIFEXITED returns a non-negative value.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
int main()
{
if (fork() == 0) {
/* child */
return 0;
} else {
int s;
/* parent */
if (wait(&s) == -1) {
perror("Unexpected error while setting up test "
"pre-conditions");
return -1;
}
if (WIFEXITED(s)) {
printf("Test PASSED\n");
return 0;
}
}
printf("Test FAILED\n");
return -1;
}
@@ -1,40 +0,0 @@
/*
Test case for assertion #1 of the WIFEXITED macro defined in sys/wait.h
by forking a new process, having the child SIGABRT, and verifying
WIFEXITED returns zero.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
int main()
{
if (fork() == 0) {
/* child */
raise(SIGABRT);
/* shouldn't get here */
return 0;
} else {
int s;
/* parent */
if (wait(&s) == -1) {
perror("Unexpected error while setting up test "
"pre-conditions");
return -1;
}
if (!WIFEXITED(s)) {
printf("Test PASSED\n");
return 0;
}
}
printf("Test FAILED\n");
return -1;
}
@@ -1,7 +0,0 @@
<assertions>
<assertion id="1" type="ct:S:48708:48710">
Evaluates to a non-zero value if status was returned for a child process
that terminated normally.
</assertion>
</assertions>
@@ -1,36 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*
* Test that TIMER_MAX timers can be created.
*
* For this test, clock CLOCK_REALTIME will be used.
*/
#include <time.h>
#include <stdio.h>
#include <limits.h>
#include <unistd.h>
#include "posixtest.h"
int main(int argc, char *argv[])
{
timer_t tid;
int i;
long scTIMER_MAX=0;
scTIMER_MAX=sysconf(_SC_TIMER_MAX);
for (i=0; i<scTIMER_MAX;i++) {
if (timer_create(CLOCK_REALTIME, NULL, &tid) != 0) {
perror("timer_create() did not return success\n");
return PTS_FAIL;
}
}
printf("Test PASSED\n");
return PTS_PASS;
}
@@ -1,37 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*
* Test that TIMER_MAX >= _POSIX_TIMER_MAX
*
* For this test, clock CLOCK_REALTIME will be used.
*/
#include <time.h>
#include <stdio.h>
#include <limits.h>
#include <unistd.h>
#include "posixtest.h"
int main(int argc, char *argv[])
{
long scTIMER_MAX=0;
scTIMER_MAX=sysconf(_SC_TIMER_MAX);
#ifdef DEBUG
printf("TIMER_MAX = %ld\n_POSIX_TIMER_MAX=%ld\n",
scTIMER_MAX, (long) _POSIX_TIMER_MAX);
#endif
if ((scTIMER_MAX != -1) && (scTIMER_MAX < _POSIX_TIMER_MAX)) {
printf("Test FAILED (%ld < %ld)\n", scTIMER_MAX, (long)_POSIX_TIMER_MAX);
return PTS_FAIL;
}
printf("Test PASSED\n");
return PTS_PASS;
}
@@ -1,9 +0,0 @@
<assertions>
<assertion id="1" tag="ref:XBD6:8774:8775">
TIMER_MAX in limits.h defines the maximum number of processes that
the implementation supports
</assertion>
<assertion id="2" tag="ref:XBD6:8776:8776">
TIMER_MAX must be &gt;= _POSIX_TIMER_MAX
</assertion>
</assertions>
@@ -1,5 +0,0 @@
This file defines the coverage for the behavior/timers section.
ASSERTION COVERED?
1 YES
2 YES
@@ -1,11 +0,0 @@
/*
* Copyright (c) 2004, Bull SA. All rights reserved.
* Created by: [email protected]
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*/
/* test if aio.h exists and can be included */
#include <aio.h>
@@ -1,13 +0,0 @@
/*
* Copyright (c) 2004, Bull SA. All rights reserved.
* Created by: [email protected]
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*/
/* test if struct aiocb is defined in <aio.h> */
#include <aio.h>
struct aiocb dummy;
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2004, Bull SA. All rights reserved.
* Created by: [email protected]
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*/
/* test if aio.h exists and can be included */
#include <aio.h>
int main(void)
{
struct aiocb aiocb;
struct sigevent sigevent;
aiocb.aio_fildes = -1;
aiocb.aio_offset = -1;
aiocb.aio_buf = NULL;
aiocb.aio_nbytes = 0;
aiocb.aio_sigevent = sigevent;
aiocb.aio_reqprio = -1;
}
@@ -1,20 +0,0 @@
/*
* Copyright (c) 2004, Bull SA. All rights reserved.
* Created by: [email protected]
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*/
/* test if aio.h exists and can be included */
#include <aio.h>
int dummy0 = AIO_ALLDONE;
int dummy1 = AIO_CANCELED;
int dummy2 = AIO_NOTCANCELED;
int dummy3 = LIO_NOP;
int dummy4 = LIO_NOWAIT;
int dummy5 = LIO_READ;
int dummy6 = LIO_WAIT;
int dummy7 = LIO_WRITE;
@@ -1,25 +0,0 @@
/*
* Copyright (c) 2004, Bull SA. All rights reserved.
* Created by: [email protected]
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
*/
#include <aio.h>
int (*dummy0)(int, struct aiocb *) = aio_cancel;
int (*dummy1)(const struct aiocb *) = aio_error;
int (*dummy2)(int, struct aiocb *) = aio_fsync;
int (*dummy3)(struct aiocb *) = aio_read;
ssize_t (*dummy4)(struct aiocb *) = aio_return;
int (*dummy5)(const struct aiocb *const[], int,
const struct timespec *) = aio_suspend;
int (*dummy6)(struct aiocb *) = aio_write;
int (*dummy7)(int, struct aiocb *const [],
int, struct sigevent *restrict) = lio_listio;
int main()
{
return 0;
}
@@ -1,40 +0,0 @@
<assertions>
<assertion id="1" tag="ref:BD6TC2:7287:7287">
An AIO control block structure aiocb is used in many asynchronous I/O
functions. It is defined in &lt;aio.h&gt;
</assertion>
<assertion id="2" tag="ref:BD6TC2:7287:7295">
The AIO control block structure aiocb has following members:
int aio_fildes
off_t aio_offset
volatile void* aio_buf
size_t aio_nbytes
int aio_reqprio
struct sigevent aio_sigevent
int aio_lio_opcode
</assertion>
<assertion id="3" tag="ref:BD6TC2:7297:7312">
The header &lt;aio.h&gt; shakk include following constants:
AIO_ALLDONE
AIO_CANCELED
AIO_NOTCANCELED
LIO_NOP
LIO_NOWAIT
LIO_READ
LIO_WAIT
LIO_WRITE
</assertion>
<assertion id="4" tag="ref:BD6TC2:7313:7324">
The header &lt;aio.h&gt; shall defines following functions or macros:
int aio_cancel(int, struct aiocb *);
int aio_error(const struct aiocb *);
int aio_fsync(int, struct aiocb *);
int aio_read(struct aiocb *);
ssize_t aio_return(struct aiocb *);
int aio_suspend(const struct aiocb *const[], int,
const struct timespec *);
int aio_write(struct aiocb *);
int lio_listio(int, struct aiocb *restrict const[restrict],
int, struct sigevent *restrict);
</assertion>
</assertions>
@@ -1,6 +0,0 @@
/*
* This test tests if error.h is exist and useble
*author:[email protected]
*/
#include <errno.h>
@@ -1,16 +0,0 @@
/*
*The <errno.h> header shall provide a
*declaration for errno
*author:[email protected]
*/
#include <errno.h>
int errno_test;
int dummyfcn (void)
{
errno_test = errno;
return 0;
}
@@ -1,86 +0,0 @@
/*
*Following symbles need to be defined in errno.h
*author:[email protected]
*/
#include <errno.h>
int dummy1 = E2BIG;
int dummy2 = EACCES;
int dummy3 = EADDRINUSE ;
int dummy4 = EADDRNOTAVAIL;
int dummy5 = EAFNOSUPPORT;
int dummy6 = EAGAIN;
int dummy7 = EALREADY;
int dummy8 = EBADF;
int dummy9 = EBADMSG;
int dummy10 = EBUSY;
int dummy11 = ECANCELED;
int dummy12 = ECHILD;
int dummy13 = ECONNABORTED;
int dummy14 = ECONNREFUSED;
int dummy15 = ECONNRESET;
int dummy16 = EDEADLK;
int dummy17 = EDESTADDRREQ;
int dummy18 = EDOM;
int dummy19 = EDQUOT;
int dummy20 = EEXIST;
int dummy21 = EFAULT;
int dummy22 = EFBIG;
int dummy23 = EHOSTUNREACH;
int dummy24 = EIDRM;
int dummy25 = EILSEQ;
int dummy26 = EINPROGRESS;
int dummy27 = EINTR;
int dummy28 = EINVAL;
int dummy29 = EIO;
int dummy30 = EISCONN;
int dummy31 = EISDIR;
int dummy32 = ELOOP;
int dummy33 = EMFILE;
int dummy34 = EMLINK;
int dummy35 = EMSGSIZE;
int dummy36 = EMULTIHOP;
int dummy37 = ENAMETOOLONG;
int dummy38 = ENETDOWN;
int dummy39 = ENETRESET;
int dummy40 = ENETUNREACH;
int dummy41 = ENFILE;
int dummy42 = ENOBUFS;
int dummy43 = ENODATA;
int dummy44 = ENODEV;
int dummy45 = ENOENT;
int dummy46 = ENOEXEC;
int dummy47 = ENOLCK;
int dummy48 = ENOLINK;
int dummy49 = ENOMEM;
int dummy50 = ENOMSG;
int dummy51 = ENOPROTOOPT;
int dummy52 = ENOSPC;
int dummy53 = ENOSR;
int dummy54 = ENOSTR;
int dummy55 = ENOSYS;
int dummy56 = ENOTCONN;
int dummy57 = ENOTDIR;
int dummy58 = ENOTEMPTY;
int dummy59 = ENOTSOCK;
int dummy60 = ENOTSUP;
int dummy61 = ENOTTY;
int dummy62 = ENXIO;
int dummy63 = EOPNOTSUPP;
int dummy64 = EOVERFLOW;
int dummy65 = EPERM;
int dummy66 = EPIPE;
int dummy67 = EPROTO;
int dummy68 = EPROTONOSUPPORT;
int dummy69 = EPROTOTYPE;
int dummy70 = ERANGE;
int dummy71 = EROFS;
int dummy72 = ESPIPE;
int dummy73 = ESRCH;
int dummy74 = ESTALE;
int dummy75 = ETIME;
int dummy76 = ETIMEDOUT;
int dummy77 = ETXTBSY;
int dummy78 = EWOULDBLOCK;
int dummy79 = EXDEV;
@@ -1,89 +0,0 @@
/*
* The most of error symbles shall have unique value
* I try to test every symble in a loop. There
* are two kind symbles, one have unique value, the others
* can have same value with certain other symbles
* Author:[email protected]
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#define PTP_PASS 0
#define PTP_FAIL 1
#define PTP_UNRESOLVED 2
#define PTP_NOTINUSE 3
#define PTP_UNSUPPORTED 4
#define PTP_UNTESTED 5
#define PTP_UNINITIATED 6
#define PTP_NORESULT 7
struct unique {
int value;
char *name;
int duplicate;
} sym[] = {{E2BIG,"E2BIG",E2BIG},{EACCES,"EACCES",EACCES},
{EADDRINUSE,"EADDRINUSE",EADDRINUSE},
{EADDRNOTAVAIL,"EADDRNOTAVAIL",EADDRNOTAVAIL},
{EAFNOSUPPORT,"EAFNOSUPPORT",EAFNOSUPPORT},
{EAGAIN,"EAGAIN",EWOULDBLOCK},
{EALREADY,"EALREADY",EALREADY}, {EBADF,"EBADF",EBADF},
{EBADMSG,"EBADMSG",EBADMSG},{EBUSY,"EBUSY",EBUSY},
{ECANCELED,"ECANCELED",ECANCELED},{ECHILD,"ECHILD",ECHILD},
{ECONNABORTED,"ECONNABORTED",ECONNABORTED},
{ECONNREFUSED,"ECONNREFUSED",ECONNREFUSED},
{ECONNRESET,"ECONNRESET",ECONNRESET},{EDEADLK,"EDEADLK",EDEADLK,},
{EDESTADDRREQ,"EDESTADDRREQ",EDESTADDRREQ},{EDOM,"EDOM",EDOM},
{EDQUOT,"EDQUOT",EDQUOT},{EEXIST,"EEXIST",EEXIST},
{EFAULT,"EFAULT",EFAULT},{EFBIG,"EFBIG",EFBIG},
{EHOSTUNREACH,"EHOSTUNREACH",EHOSTUNREACH},
{EIDRM,"EIDRM",EIDRM},{EILSEQ,"EILSEQ",EILSEQ},
{EINPROGRESS,"EINPROGRESS",EINPROGRESS},
{EINTR,"EINTR",EINTR},{EINVAL,"EINVAL",EINVAL},
{EIO,"EIO",EIO},{EISCONN,"EISCONN",EISCONN},
{EISDIR,"EISDIR",EISDIR},{ELOOP,"ELOOP",ELOOP},
{EMFILE,"EMFILE",EMFILE},{EMLINK,"EMLINK",EMLINK},
{EMSGSIZE,"EMSGSIZE",EMSGSIZE},{EMULTIHOP,"EMULTIHOP",EMULTIHOP},
{ENAMETOOLONG,"ENAMETOOLONG",ENAMETOOLONG},
{ENETDOWN,"ENETDOWN",ENETDOWN},
{ENETRESET,"ENETRESET",ENETRESET},{ENETUNREACH,"ENETUNREACH",ENETUNREACH},
{ENFILE,"ENFILE",ENFILE},{ENOBUFS,"ENOBUFS",ENOBUFS},
{ENODATA,"ENODATA",ENODATA},{ENODEV,"ENODEV",ENODEV},
{ENOENT,"ENOENT",ENOENT},{ENOEXEC,"ENOEXEC",ENOEXEC},
{ENOLCK,"ENOLCK",ENOLCK},{ENOLINK,"ENOLINK",ENOLINK},
{ENOMEM,"ENOMEM",ENOMEM},{ENOMSG,"ENOMSG",ENOMSG},
{ENOPROTOOPT,"ENOPROTOOPT",ENOPROTOOPT},{ENOSPC,"ENOSPC",ENOSPC},
{ENOSR,"ENOSR",ENOSR},{ENOSTR,"ENOSTR",ENOSTR},
{ENOSYS,"ENOSYS",ENOSYS},{ENOTCONN,"ENOTCONN",ENOTCONN},
{ENOTDIR,"ENOTDIR",ENOTDIR},{ENOTEMPTY,"ENOTEMPTY",ENOTEMPTY},
{ENOTSOCK,"ENOTSOCK",ENOTSOCK},{ENOTSUP,"ENOTSUP",ENOTSUP},
{ENOTTY,"ENOTTY",ENOTTY},{ENXIO,"ENXIO",ENXIO},
{EOPNOTSUPP,"EOPNOTSUPP",EOPNOTSUPP},{EOVERFLOW,"EOVERFLOW",EOVERFLOW},
{EPERM,"EPERM",EPERM},{EPIPE,"EPIPE",EPIPE},{EPROTO,"EPROTO",EPROTO},
{EPROTONOSUPPORT,"EPROTONOSUPPORT",EPROTONOSUPPORT},
{EPROTOTYPE,"EPROTOTYPE",EPROTOTYPE},
{ERANGE,"ERANGE",ERANGE},{EROFS,"EROFS",EROFS},
{EWOULDBLOCK,"EWOULDBLOCK",EAGAIN},{EXDEV,"EXDEV",EXDEV},
{0,0,0}
};
int main() {
struct unique *tst;
int i,ret = PTP_PASS;
tst = sym;
while (tst->name) {
for(i = 0; sym[i].name; i++) {
if (tst->value == sym[i].value
&& tst->duplicate != sym[i].value
&& strcmp(tst->name,sym[i].name)) {//In case EAGAIN is not equal to EWOULDBLOCK,compare the name
printf("%s has a duplicate value with %s\n",
tst->name,sym[i].name);
ret = PTP_FAIL;
}
}
tst++;
}
return ret;
}
@@ -1,77 +0,0 @@
/*
*errno.h shall give positive values for the
*error number symbolic constants
*author:[email protected]
*/
#include <stdio.h>
#include <errno.h>
#define PTP_PASS 0
#define PTP_FAIL 1
#define PTP_UNRESOLVED 2
#define PTP_NOTINUSE 3
#define PTP_UNSUPPORTED 4
#define PTP_UNTESTED 5
#define PTP_UNINITIATED 6
#define PTP_NORESULT 7
struct unique {
int value;
char *name;
} sym[] = {{E2BIG,"E2BIG"},{EACCES,"EACCES"},
{EADDRINUSE,"EADDRINUSE"},
{EADDRNOTAVAIL,"EADDRNOTAVAIL"},
{EAFNOSUPPORT,"EAFNOSUPPORT"},
{EAGAIN,"EAGAIN"},
{EALREADY,"EALREADY"}, {EBADF,"EBADF"},
{EBADMSG,"EBADMSG"},{EBUSY,"EBUSY"},
{ECANCELED,"ECANCELED"},{ECHILD,"ECHILD"},
{ECONNABORTED,"ECONNABORTED"},
{ECONNREFUSED,"ECONNREFUSED"},
{ECONNRESET,"ECONNRESET"},{EDEADLK,"EDEADLK"},
{EDESTADDRREQ,"EDESTADDRREQ"},{EDOM,"EDOM"},
{EDQUOT,"EDQUOT"},{EEXIST,"EEXIST"},
{EFAULT,"EFAULT"},{EFBIG,"EFBIG"},
{EHOSTUNREACH,"EHOSTUNREACH"},
{EIDRM,"EIDRM"},{EILSEQ,"EILSEQ"},
{EINPROGRESS,"EINPROGRESS"},
{EINTR,"EINTR"},{EINVAL,"EINVAL"},
{EIO,"EIO"},{EISCONN,"EISCONN"},
{EISDIR,"EISDIR"},{ELOOP,"ELOOP"},
{EMFILE,"EMFILE"},{EMLINK,"EMLINK"},
{EMSGSIZE,"EMSGSIZE"},{EMULTIHOP,"EMULTIHOP"},
{ENAMETOOLONG,"ENAMETOOLONG"},
{ENETDOWN,"ENETDOWN"},
{ENETRESET,"ENETRESET"},{ENETUNREACH,"ENETUNREACH"},
{ENFILE,"ENFILE"},{ENOBUFS,"ENOBUFS"},
{ENODATA,"ENODATA"},{ENODEV,"ENODEV"},
{ENOENT,"ENOENT"},{ENOEXEC,"ENOEXEC"},
{ENOLCK,"ENOLCK"},{ENOLINK,"ENOLINK"},
{ENOMEM,"ENOMEM"},{ENOMSG,"ENOMSG"},
{ENOPROTOOPT,"ENOPROTOOPT"},{ENOSPC,"ENOSPC"},
{ENOSR,"ENOSR"},{ENOSTR,"ENOSTR"},
{ENOSYS,"ENOSYS"},{ENOTCONN,"ENOTCONN"},
{ENOTDIR,"ENOTDIR"},{ENOTEMPTY,"ENOTEMPTY"},
{ENOTSOCK,"ENOTSOCK"},{ENOTSUP,"ENOTSUP"},
{ENOTTY,"ENOTTY"},{ENXIO,"ENXIO"},
{EOPNOTSUPP,"EOPNOTSUPP"},{EOVERFLOW,"EOVERFLOW"},
{EPERM,"EPERM"},{EPIPE,"EPIPE"},{EPROTO,"EPROTO"},
{EPROTONOSUPPORT,"EPROTONOSUPPORT"},
{EPROTOTYPE,"EPROTOTYPE"},
{ERANGE,"ERANGE"},{EROFS,"EROFS"},
{EWOULDBLOCK,"EWOULDBLOCK"},{EXDEV,"EXDEV"},
{0,0}
};
int main() {
struct unique *tst=sym;
int ret = PTP_PASS;
while(tst->name){
if (tst->value < 0){
printf("Value of symbol %s is less than zero\n",tst->name);
ret = PTP_FAIL;
}
tst++;
}
return ret;
}
@@ -1,174 +0,0 @@
<assertions>
<assertion id="1" tag="ref:BD:{Headers:error.h:SYNOPSIS}">
The errno.h header file exists.
</assertion>
<assertion id="2" tag="ref:BD:{Headers:error.h,DESCRIPTION}">
The errno.h header shall provide a declaration for errno
</assertion>
<assertion id="3" tag="ref:SH:{Section 2.3}">
All values listed in this section shall be unique integer constant
expressions with type int suitable for
use in #if preprocessing directives.
[E2BIG]
[EACCES]
[EADDRINUSE]
[EADDRNOTAVAIL]
[EAFNOSUPPORT]
[EAGAIN]
[EALREADY]
[EBADF]
[EBADMSG]
[EBUSY]
[ECANCELED]
[ECHILD]
[ECONNABORTED]
[ECONNREFUSED]
[ECONNRESET]
[EDEADLK]
[EDESTADDRREQ]
[EDOM]
[EDQUOT]
[EEXIST]
[EFAULT]
[EFBIG]
[EHOSTUNREACH]
[EIDRM]
[EILSEQ]
[EINPROGRESS]
[EINTR]
[EINVAL]
[EIO]
[EISCONN]
[EISDIR]
[ELOOP]
[EMFILE]
[EMLINK]
[EMSGSIZE]
[EMULTIHOP]
[ENAMETOOLONG]
[ENETDOWN]
[ENETRESET]
[ENETUNREACH]
[ENFILE]
[ENOBUFS]
[ENODATA]
[ENODEV]
[ENOENT]
[ENOEXEC]
[ENOLCK]
[ENOLINK]
[ENOMEM]
[ENOMSG]
[ENOPROTOOPT]
[ENOSPC]
[ENOSR]
[ENOSTR]
[ENOSYS]
[ENOTCONN]
[ENOTDIR]
[ENOTEMPTY]
[ENOTSOCK]
[ENOTSUP]
[ENOTTY]
[ENXIO]
[EOPNOTSUPP]
[EOVERFLOW]
[EPERM]
[EPIPE]
[EPROTO]
[EPROTONOSUPPORT]
[EPROTOTYPE]
[ERANGE]
[EROFS]
[ESPIPE]
[ESRCH]
[ESTALE]
[ETIME]
[ETIMEDOUT]
[ETXTBSY]
[EWOULDBLOCK]
[EXDEV]
</assertion>
<assertion id="4" tag="ref:BD:{headers:error.h:DESCRIPTION}">
errno.h shall give positive values for the following symbolic constants
[E2BIG]
[EACCES]
[EADDRINUSE]
[EADDRNOTAVAIL]
[EAFNOSUPPORT]
[EAGAIN]
[ELREADY]
[EBADF]
[EBADMSG]
[EBUSY]
[ECANCELED]
[ECHILD]
[ECONNABORTED]
[ECONNREFUSED]
[ECONNRESET]
[EDEADLK]
[EDESTADDRREQ]
[EDOM]
[EDQUOT]
[EEXIST]
[EFAULT]
[EFBIG]
[EHOSTUNREACH]
[EIDRM]
[EILSEQ]
[EINPROGRESS]
[EINTR]
[EINVAL]
[EIO]
[EISCONN]
[EISDIR]
[ELOOP]
[EMFILE]
[EMLINK]
[EMSGSIZE]
[EMULTIHOP]
[ENAMETOOLONG]
[ENETDOWN]
[ENETRESET]
[ENETUNREACH]
[ENFILE]
[ENOBUFS]
[ENODATA]
[ENODEV]
[ENOENT]
[ENOEXEC]
[ENOLCK]
[ENOLINK]
[ENOMEM]
[ENOMSG]
[ENOPROTOOPT]
[ENOSPC]
[ENOSR]
[ENOSTR]
[ENOSYS]
[ENOTCONN]
[ENOTDIR]
[ENOTEMPTY]
[ENOTSOCK]
[ENOTSUP]
[ENOTTY]
[ENXIO]
[EOPNOTSUPP]
[EOVERFLOW]
[EPERM]
[EPIPE]
[EPROTO]
[EPROTONOSUPPORT]
[EPROTOTYPE]
[ERANGE]
[EROFS]
[ESPIPE]
[ESRCH]
[ESTALE]
[ETIME]
[ETIMEDOUT]
[ETXTBSY]
[EWOULDBLOCK]
[EXDEV]
</assertion>
</assertions>
@@ -1,15 +0,0 @@
/*
Test for the existance and valid format
of the mq_attr structure as specified on
line 9678 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Not Implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_timedsend function as specified on
line 9694 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_unlink function as specified on
line 9696 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_close function as specified on
line 9684 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
/*
Test for the existance and valid prototype
of the mq_getattr function as specified on
line 9685 of the Base Definitions document
*/
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,14 +0,0 @@
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
/*
Test for the existance and valid prototype
of the mq_notify function as specified on
line 9686 of the Base Definitions document
*/
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_open function as specified on
line 9687 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_receive function as specified on
line 9688 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_send function as specified on
line 9689 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_setattr function as specified on
line 9690 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,15 +0,0 @@
/*
Test for the existance and valid prototype
of the mq_timedreceive function as specified on
line 9692 of the Base Definitions document
*/
#include <mqueue.h>
#include "posixtest.h"
#include <stdio.h>
int main()
{
fprintf(stderr, "Test not implemented!\n");
return PTS_UNTESTED;
}
@@ -1,32 +0,0 @@
<assertions>
<assertion id="1" tag="pt:MSG ct:B:9674:9681">
A valid mq_attr structure is defined.
</assertion>
<assertion id="2" tag="pt:MSG">
A valid mq_close function is defined.
</assertion>
<assertion id="3" tag="pt:MSG">
A valid mq_getattr function is defined.
</assertion>
<assertion id="4" tag="pt:MSG">
A valid mq_notify function is defined.
</assertion>
<assertion id="5" tag="pt:MSG">
A valid mq_open function is defined.
</assertion>
<assertion id="6" tag="pt:MSG">
A valid mq_receive function is defined.
</assertion>
<assertion id="7" tag="pt:MSG">
A valid mq_send function is defined.
</assertion>
<assertion id="8" tag="pt:MSG">
A valid mq_setattr function is defined.
</assertion>
<assertion id="9" tag="pt:MSG">
A valid mq_timedreceive function is defined.
</assertion>
<assertion id="10" tag="pt:MSG">
A valid mq_timedsend function is defined.
</assertion>
</assertions>
@@ -1,13 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test the header file pthread.h exists and can be included
*/
#include <pthread.h>
@@ -1,22 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_attr_init(pthread_attr_t *);
*/
#include <pthread.h>
pthread_attr_t a;
void dummy_func ()
{
pthread_attr_init(&a);
return;
}
@@ -1,22 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_attr_destroy(pthread_attr_t *);
*/
#include <pthread.h>
pthread_attr_t a;
void dummy_func ()
{
pthread_attr_destroy(&a);
return;
}
@@ -1,25 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
*/
#include <pthread.h>
pthread_attr_t a;
int *detachstate;
void dummy_func ()
{
pthread_attr_getdetachstate(&a, detachstate);
return;
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_attr_setdetachstate(const pthread_attr_t *, int);
*/
#include <pthread.h>
pthread_attr_t a;
void dummy_func ()
{
pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED);
return;
}
@@ -1,25 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutex_init(pthread_mutex_t *restrict, const pthread_mutexattr_t
*restrict);
*/
#include <pthread.h>
pthread_mutex_t a;
void dummy_func ()
{
pthread_mutex_init(&a, NULL);
return;
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutex_destroy(pthread_mutex_t *);
*/
#include <pthread.h>
pthread_mutex_t a;
void dummy_func ()
{
pthread_mutex_destroy(&a);
return;
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutex_lock(pthread_mutex_t *);
*/
#include <pthread.h>
pthread_mutex_t a;
void dummy_func ()
{
pthread_mutex_lock(&a);
return;
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutex_trylock(pthread_mutex_t *);
*/
#include <pthread.h>
pthread_mutex_t a;
void dummy_func ()
{
pthread_mutex_trylock(&a);
return;
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutex_unlock(pthread_mutex_t *);
*/
#include <pthread.h>
pthread_mutex_t a;
void dummy_func ()
{
pthread_mutex_unlock(&a);
return;
}
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutexattr_init(pthread_mutexattr_t *);
*/
#include <pthread.h>
pthread_mutexattr_t a;
void dummy_func ()
{
pthread_mutexattr_init(&a);
return;
}
@@ -1,68 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test the following symbols are defined by pthread.h
*/
#include <pthread.h>
#ifndef PTHREAD_CANCEL_ASYNCHRONOUS
#error PTHREAD_CANCEL_ASYNCHRONOUS not defined
#endif
#ifndef PTHREAD_CANCEL_ENABLE
#error PTHREAD_CANCEL_ENABLE not defined
#endif
#ifndef PTHREAD_CANCEL_DEFERRED
#error PTHREAD_CANCEL_DEFERRED not defined
#endif
#ifndef PTHREAD_CANCEL_DISABLE
#error PTHREAD_CANCEL_DISABLE not defined
#endif
#ifndef PTHREAD_CANCELED
#error PTHREAD_CANCELED not defined
#endif
#ifndef PTHREAD_COND_INITIALIZER
#error PTHREAD_COND_INTIALIZER not defined
#endif
#ifndef PTHREAD_CREATE_DETACHED
#error PTHREAD_CREATE_DETACHED not defined
#endif
#ifndef PTHREAD_CREATE_JOINABLE
#error PTHREAD_CREATE_JOINABLE not defined
#endif
#ifndef PTHREAD_EXPLICIT_SCHED
#error PTHREAD_EXPLICIT_SCHED not defined
#endif
#ifndef PTHREAD_INHERIT_SCHED
#error PTHREAD_INHERIT_SCHED not defined
#endif
#ifndef PTHREAD_MUTEX_INITIALIZER
#error PTHREAD_MUTEX_INITIALIZED not defined
#endif
#ifndef PTHREAD_ONCE_INIT
#error PTHREAD_ONCE_INIT not defined
#endif
#ifndef PTHREAD_PROCESS_SHARED
#error PTHREAD_PROCESS_SHARED not defined
#endif
#ifndef PTHREAD_PROCESS_PRIVATE
#error PTHREAD_PROCESS_PRIVATE not defined
#endif
@@ -1,63 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test the following symbols are defined by pthread.h
*/
#include <pthread.h>
/* BAR */
#ifndef PTHREAD_BARRIER_SERIAL_THREAD
#error PTHREAD_BARRIER_SERIAL_THREAD not defined
#endif
/* XSI */
#ifndef PTHREAD_MUTEX_DEFAULT
#error PTHREAD_MUTEX_DEFAULT not defined
#endif
/* XSI */
#ifndef PTHREAD_MUTEX_ERRORCHECK
#error PTHREAD_MUTEX_ERRORCHECK not defined
#endif
/* XSI */
#ifndef PTHREAD_MUTEX_NORMAL
#error PTHREAD_MUTEX_NORMAL not defined
#endif
/* XSI */
#ifndef PTHREAD_MUTEX_RECURSIVE
#error PTHREAD_MUTEX_RECURSIVE not defined
#endif
/* TPP|TPI */
#ifndef PTHREAD_PRIO_INHERIT
#error PTHREAD_PRIO_INHERIT not defined
#endif
/* TPP|TPI */
#ifndef PTHREAD_PRIO_NONE
#error PTHREAD_PRIO_NONE not defined
#endif
/* TPP|TPI */
#ifndef PTHREAD_PRIO_PROTECT
#error PTHREAD_PRIO_PROTECT not defined
#endif
/* TPS */
#ifndef PTHREAD_SCOPE_PROCESS
#error PTHREAD_SCOPE_PROCESS not defined
#endif
/* TPS */
#ifndef PTHREAD_SCOPE_SYSTEM
#error PTHREAD_SCOPE_SYSTEM not defined
#endif
@@ -1,24 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_mutexattr_destroy(pthread_mutexattr_t *);
*/
#include <pthread.h>
pthread_mutexattr_t a;
void dummy_func ()
{
pthread_mutexattr_destroy(&a);
return;
}
@@ -1,14 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_attr_t
*/
#include <pthread.h>
pthread_attr_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_rwlock_t
*/
#include <pthread.h>
pthread_rwlock_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_rwlockattr_t
*/
#include <pthread.h>
pthread_rwlockattr_t dummy;
@@ -1,17 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_spinlock_t
SPI
*/
#include <pthread.h>
pthread_spinlock_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_t
*/
#include <pthread.h>
pthread_t dummy;
@@ -1,14 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_barrier_t
BAR
*/
#include <pthread.h>
pthread_barrier_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_barrierattr_t
BAR
*/
#include <pthread.h>
pthread_barrierattr_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_cond_t
*/
#include <pthread.h>
pthread_cond_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_condattr_t
*/
#include <pthread.h>
pthread_condattr_t dummy;
@@ -1,14 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_key_t
*/
#include <pthread.h>
pthread_key_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_mutex_t
*/
#include <pthread.h>
pthread_mutex_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_mutexattr_t
*/
#include <pthread.h>
pthread_mutexattr_t dummy;
@@ -1,16 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test pthread_once_t
*/
#include <pthread.h>
pthread_once_t dummy;
@@ -1,29 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
void *(*)(void *), void *restrict);
*/
#include <pthread.h>
void * thread_function(void * arg)
{
return NULL;
}
void dummy_func()
{
pthread_t a_thread;
pthread_create(&a_thread, NULL, thread_function, NULL);
return;
}
@@ -1,20 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
void pthread_exit(void *);
*/
#include <pthread.h>
void dummy_func ()
{
pthread_exit(NULL);
return;
}
@@ -1,21 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
pthread_t pthread_self(void);
*/
#include <pthread.h>
void dummy_func ()
{
pthread_t ptid = pthread_self();
if (ptid == 0)
return;
}
@@ -1,23 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_equal(pthread_t, pthread_t);
*/
#include <pthread.h>
pthread_t a,b;
int tmp;
void dummy_func ()
{
tmp = pthread_equal(a,b);
return;
}
@@ -1,22 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_join(pthread_t, void **);
*/
#include <pthread.h>
pthread_t a;
void dummy_func ()
{
pthread_join(a,NULL);
return;
}
@@ -1,22 +0,0 @@
/*
* Copyright (c) 2002, Intel Corporation. All rights reserved.
* Created by: rolla.n.selbak REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test this function is defined:
int pthread_detach(pthread_t);
*/
#include <pthread.h>
pthread_t a;
void dummy_func ()
{
pthread_detach(a);
return;
}
@@ -1,118 +0,0 @@
<assertions>
<assertion id="1" tag="ref:XBD6:10174:10176 pt:THR">
The pthread.h file exists and can be included.
</assertion>
<assertion id="2" tag="ref:XBD6:10179:10202">
pthread.h header shall define the following symbols
PTHREAD_BARRIER_SERIAL_THREAD BAR
PTHREAD_CANCEL_ASYNCHRONOUS
PTHREAD_CANCEL_ENABLE
PTHREAD_CANCEL_DEFERRED
PTHREAD_CANCEL_DISABLE
PTHREAD_CANCELED
PTHREAD_COND_INITIALIZER
PTHREAD_CREATE_DETACHED
PTHREAD_CREATE_JOINABLE
PTHREAD_EXPLICIT_SCHED
PTHREAD_INHERIT_SCHED
PTHREAD_MUTEX_DEFAULT XSI
PTHREAD_MUTEX_ERRORCHECK XSI
PTHREAD_MUTEX_INITIALIZER
PTHREAD_MUTEX_NORMAL XSI
PTHREAD_MUTEX_RECURSIVE XSI
PTHREAD_ONCE_INIT
PTHREAD_PRIO_INHERIT TPP|TPI
PTHREAD_PRIO_NONE TPP|TPI
PTHREAD_PRIO_PROTECT TPP|TPI
PTHREAD_PROCESS_SHARED
PTHREAD_PROCESS_PRIVATE
PTHREAD_SCOPE_PROCESS TPS
PTHREAD_SCOPE_SYSTEM TPS
</assertion>
<assertion id="3" tag="ref:XBD:10205:10217">
Type 'pthread_attr_t' shall be defined as described in sys/types.h
Type 'pthread_barrier_t' shall be defined as described in sys/types.h
Type 'pthread_barrierattr_t' shall be defined as described in sys/types.h
Type 'pthread_cond_t' shall be defined as described in sys/types.h
Type 'pthread_condattr_t' shall be defined as described in sys/types.h
Type 'pthread_key_t' shall be defined as described in sys/types.h
Type 'pthread_mutex_t' shall be defined as described in sys/types.h
Type 'pthread_mutexattr_t' shall be defined as described in sys/types.h
Type 'pthread_once_t' shall be defined as described in sys/types.h
Type 'pthread_rwlock_t' shall be defined as described in sys/types.h
Type 'pthread_rwlockattr_t' shall be defined as described in sys/types.h
Type 'pthread_spinlock_t' shall be defined as described in sys/types.h
Type 'pthread_t' shall be defined as described in sys/types.h
</assertion>
<assertion id="4" tag="ref:XBD:10280:10280">
This function is defined:
pthread_create(pthread_t *restrict, const pthread_attr_t *restrict,
void *(*)(void *), void *restrict);
</assertion>
<assertion id="5" tag="ref:XBD:10284:10284">
This function is defined:
void pthread_exit(void *);
</assertion>
<assertion id="6" tag="ref:XBD:10338:10338">
This function is defined:
pthread_t pthread_self(void);
</assertion>
<assertion id="7" tag="ref:XBD:10283:10283">
This function is defined:
int pthread_equal(pthread_t, pthread_t);
</assertion>
<assertion id="8" tag="ref:XBD:10290:10290">
This function is defined:
int pthread_join(pthread_t, void **);
</assertion>
<assertion id="9" tag="ref:XBD:10282:10282">
This function is defined:
int pthread_detach(pthread_t);
</assertion>
<assertion id="10" tag="ref:XBD:10240:10240">
This function is defined:
int pthread_attr_init(pthread_attr_t *);
</assertion>
<assertion id="11" tag="ref:XBD:10222:10222">
This function is defined:
int pthread_attr_destroy(pthread_attr_t *);
</assertion>
<assertion id="12" tag="ref:XBD:10223:10223">
This function is defined:
int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
</assertion>
<assertion id="13" tag="ref:XBD:10241:10241">
This function is defined:
int pthread_attr_setdetachstate(pthread_attr_t *, int);
</assertion>
<assertion id="14" tag="ref:XBD:10296:10297">
This function is defined:
int pthread_mutex_init(pthread_mutex_t *restrict, const pthread_mutexattr_t
*restrict);
</assertion>
<assertion id="15" tag="ref:XBD:10293:10293">
This function is defined:
int pthread_mutex_destroy(pthread_mutex_t *);
</assertion>
<assertion id="16" tag="ref:XBD:10298:10298">
This function is defined:
int pthread_mutex_lock(pthread_mutex_t *);
</assertion>
<assertion id="17" tag="ref:XBD:10303:10303">
This function is defined:
int pthread_mutex_trylock(pthread_mutex_t *);
</assertion>
<assertion id="18" tag="ref:XBD:10304:10304">
This function is defined:
int pthread_mutex_unlock(pthread_mutex_t *);
</assertion>
<assertion id="19" tag="ref:XBD:10314:10314">
This function is defined:
int pthread_mutexattr_init(pthread_mutexattr_t *);
</assertion>
<assertion id="20" tag="ref:XBD:10305:10305">
This function is defined:
int pthread_mutexattr_destroy(pthread_mutexattr_t *);
</assertion>
</assertions>
@@ -1,30 +0,0 @@
This document defines the coverage for
conformance/definitions/pthread_h
testing
Assertion # Covered? Notes
1 YES
2 YES The symbols with tags associated with them
usually fail on my implementaion of linux (e.g.
BAR, XSI, etc.)
3 YES #2,3,10,11,12 fail on my implemention of linux
#2 and 3 with BAR tag, #12 with
SPI tag, and #11 and 12 with no tag.
4 YES
5 YES
6 YES
7 YES
8 YES
9 YES
10 YES
11 YES
12 YES
13 YES
14 YES
15 YES
16 YES
17 YES
18 YES
19 YES
20 YES
@@ -1,14 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Test the existence of the sched.h file and that it can be included.
*/
#include <sched.h>
@@ -1,62 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* The policies symbols shall have unique value
* I try to test every symbol in a loop.
*/
#include <stdio.h>
#include <string.h>
#include <sched.h>
#include <unistd.h>
#include "posixtest.h"
struct unique {
int value;
char *name;
} sym[] = {
{
SCHED_FIFO, "SCHED_FIFO"
},
{
SCHED_RR, "SCHED_RR"
},
#if defined(_POSIX_SPORADIC_SERVER) || defined(_POSIX_THREAD_SPORADIC_SERVER)
{
SCHED_SPORADIC,"SCHED_SPORADIC"
},
#endif
{
SCHED_OTHER, "SCHED_OTHER"
},
{
0, 0
}
};
int main()
{
struct unique *tst;
int i, ret = PTS_PASS;
tst = sym;
while (tst->name) {
for (i = 0; sym[i].name; i++) {
if (tst->value == sym[i].value
&& strcmp(tst->name, sym[i].name)) {
printf("%s has a duplicate value with %s\n",
tst->name, sym[i].name);
ret = PTS_FAIL;
}
}
tst++;
}
return ret;
}
@@ -1,25 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Test that the function:
* int sched_get_priority_max(int);
* is declared.
*/
#include <sched.h>
typedef int (*sched_get_priority_max_test) (int);
int dummyfcn(void)
{
sched_get_priority_max_test dummyvar;
dummyvar = sched_get_priority_max;
return 0;
}
@@ -1,25 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Test that the function:
* int sched_get_priority_min(int);
* is declared.
*/
#include <sched.h>
typedef int (*sched_get_priority_min_test) (int);
int dummyfcn(void)
{
sched_get_priority_min_test dummyvar;
dummyvar = sched_get_priority_min;
return 0;
}
@@ -1,26 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* Test that the function:
* int sched_getparam(pid_t, struct sched_param *);
* is declared.
*/
#include <sched.h>
#include <sys/types.h>
typedef int (*sched_getparam_test) (pid_t, struct sched_param *);
int dummyfcn(void)
{
sched_getparam_test dummyvar;
dummyvar = sched_getparam;
return 0;
}

Some files were not shown because too many files have changed in this diff Show More