|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2419 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2419.
Report 2419 Actions
Problem Report Number 2419 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0662 Raised 2004-08-27 04:30 Updated 2004-09-01 19:53 Published 2004-09-01 19:53 Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03) Certification Program The Open Brand certification program Test Suite VSTH version 5.4.2 Test Identification PTHR.os/cancel/pthread_cancel 8 Specification Base Definitions Issue 6 Problem Summary pthread_cancel 8 subtest for select() fails because helper function
select_ctf() contains an illegal call to select().Problem Text The subtest for select uses the following helper function:
int
select_ctf()
{
int rval;
int errs;
int fails;
struct timeval to;
errs = 0;
fails = 0;
to.tv_sec = 0;
to.tv_usec = 0;
(void) select(-1, &Vsth_select_fdset, NULL, NULL, &to);
rval = 1;
if ( fails )
{
rval = 2;
}
else if (( errs == 0 ) && ( fails == 0 ))
{
rval = 0;
}
return(rval);
}
The call to select() in this function is illegal. From SUSv3:
int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
fd_set *restrict
The nfds argument specifies the range of descriptors to be tested. The
first
nfds descriptors shall be checked in each set; that is, the descriptors
from
zero through nfds-1 in the descriptor sets shall be examined.
Under the following conditions, pselect() and select() shall fail and
set errno
to:
[EINVAL]
The nfds argument is less than 0 or greater than FD_SETSIZE.
The EINVAL occurs before and cancellation can occur, causing the test
to fail.
Changing -1 to 0 results in the test passing.Test Output **************************************************************
/tset/PTHR.os/cancel/pthread_cancel/T.pthread_cancel 8 Failed
Test Description:
For PSE52 and POSIX test modes:
Not in use.
For other test modes:
A cancellation point shall occur when a thread is executing
any one of the following functions:
getmsg(), getpmsg(), lockf(), msgrcv(), msgsnd(),
poll(), pread(), putmsg(), putpmsg(), pwrite(),
readv(), select(), sigpause(), usleep(),
waitid(), writev().
Note: in UNIX98 mode the wait3() function is also tested.
XCAE ref: Component PTHREAD_CANCEL Assertion 8(A)
Test Information:
select() did not handle the cancellation request
***************************************************************Review Information
Review Type TSMA Review Start Date 2004-08-27 04:30 Last Updated 2004-08-31 23:51 Completed 2004-08-31 23:51 Status Complete Review Recommendation Rejected (REJ) Review Response SUSv3 states in section 2.9.5.2 Cancellation Points:
"Whenever a thread has cancelability enabled and a cancellation request
has been made with that thread as the target, and the thread then calls
any function that is a cancellation point (such as pthread_testcancel()
or read()), the cancellation request shall be acted upon before the
function returns."
The use of the word "whenever" makes it clear that functions which are
required to be cancellation points must act on a cancellation request
regardless of whether the function call would have succeeded or failed.
The only situation in which such a function need not act on a
cancellation request is when the application has done something that
results in undefined behaviour. However, that is not the case in this
test - the select() call is required to return an EINVAL error (in the
absence of a cancellation request).
Therefore this implementation of select() does not comply with SUSv3.
In order to comply, it needs to check for cancellation before doing any
checks for error conditions.
Review Type SA Review Start Date 2004-08-31 22:51 Last Updated 2004-09-01 00:38 Completed 2004-09-01 00:38 Status Complete Review Resolution Rejected (REJ) Review Conclusion The TSMA has concluded that the test operates correctly with respect
to the specification and thus that the implementation is at fault.
This PR is thus rejected as a TSD.
Problem Reporting System Options:
- View Report 2419
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority