|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1370 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 1370.
Report 1370 Actions
Problem Report Number 1370 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0652 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1996-11-21 08:00 Product Standard Internationalised System Calls and Libraries Extended (UNIX 95) Certification Program The Open Brand certification program Test Suite VSU version 4.1.0 Test Identification Base/sigaction 14,19 Problem Summary TSD4U.00165 This test may fail intermittently on some implementations. Problem Text
Both of these tests are highly timing dependent and as a result may fail on an
intermittent basis.
In both sigaction #14 and sigaction #19, the tests set up the action for the
SIGCHLD signal. In the case of sigaction #14, the test sets the signal handler
to SIG_DFL and also sets the SA_NOCLDWAIT flag. For sigaction #19, the signal
handler is set to SIG_IGN.
After calling sigaction(), the tests fork a child that exits and then fork a
child that sleeps. In all except for the first test case in sigaction #14
(wait()), this sleep is for 1 second. The tests then call time(&time1), then
one of wait(), waitpid(), wait3(), or waitid() expecting a return of -1 and
errno set to ECHILD. The tests then call time(&time2), expecting that
time2-time1 >= 1. If the value returned is less than one, the tests fail on
the assumption that the wait function under test did not block.
The sleep(1) in the child does not guarantee that the parent will have time to
block for a full second. The calls to the wait() functions are returning the
expected results, however depending on what the scheduler does, the timing can
fall on either side of the tested time interval. Increasing the sleep time
will more likely guarantee that the assertion under test will not be subject
to implementation specific timing/scheduling differences. The real problem
however, is that as the tests are currently written, there is a race condition
between the parent and child and as such there is no guarantee that the
the call time(&time1) will occur before the sleep(). A way to guarantee that
this will occur is to move the first call to time() to before the call to
fork().Test Output
TEST CASE: sigaction
TEST PURPOSE #14
After a call to int sigaction(int sig, const struct
sigaction *act, struct sigaction *oact) when
SA_NOCLDWAIT is set in the sa_flags member of the
structure pointed to by act and sig is SIGCHLD, if the
calling process subsequently waits for its children
and the process has no unwaited for children that were
transformed into zombie processes it shall block until
all its children terminate, and wait(), wait3(),
waitid(), and waitpid() shall fail and set errno to
ECHLD.
PREP: Set up action for SIGCHLD
PREP: fork() a child that exits
PREP: fork() a child that sleeps
TEST: wait() returns -1 and errno = ECHILD
TEST: wait() blocks until child exits
PREP: fork() a child that sleeps
TEST: waitpid() returns -1 and errno = ECHILD
TEST: waitpid() blocks until child exits
PREP: fork() a child that sleeps
TEST: wait3() returns -1 and errno = ECHILD
TEST: wait3() blocks until child exits
PREP: fork() a child that sleeps
TEST: waitid() returns -1 and errno = ECHILD
TEST: waitid() blocks until child exits
ERROR: waitid() did not block
14 FAIL
TEST PURPOSE #19
After a call to int sigaction(int sig, const struct
sigaction *act, struct sigaction *oact) when the
action for SIGCHLD is set to SIG_IGN if the calling
process subsequently waits for its children and the
process has no unwaited for children that were
transformed into zombie processes it shall block until
all its children terminate, and wait(), wait3(),
waitid(), and waitpid() shall fail and set errno to
ECHILD.
PREP: Set SIG_IGN for SIGCHLD
PREP: fork() a child that exits
PREP: fork() a child that sleeps
TEST: wait() returns -1 and errno = ECHILD
TEST: wait() blocks until child exits
PREP: fork() a child that sleeps
TEST: waitpid() returns -1 and errno = ECHILD
TEST: waitpid() blocks until child exits
PREP: fork() a child that sleeps
TEST: wait3() returns -1 and errno = ECHILD
TEST: wait3() blocks until child exits
ERROR: wait3() did not block
PREP: fork() a child that sleeps
TEST: waitid() returns -1 and errno = ECHILD
TEST: waitid() blocks until child exits
19 FAILReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We agree this is a test suite deficiency in the version(s)
listed.
In the future, in order for a vendor to site this TSD in
support of a test report showing failures of these tests,
the vendor must also provide results for these tests
from a run in which they did not fail, so as to illustrate the
intermittent failure documented here is in fact the problem
encountered.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 1370
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority