|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1442 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 1442.
Report 1442 Actions
Problem Report Number 1442 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0724 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1995-12-15 08:00 Product Standard Internationalised System Calls and Libraries Extended (UNIX 95) Certification Program The Open Brand certification program Test Suite VSU version 4.0.2 Test Identification CAPIbase/sigaction 30 Problem Summary TSD4U.00091 The test may fail on implementations because the signal handler in a race condition may catch the child process exiting. Problem Text
The test may fail on implementations because the signal handler in a
race condition may catch the child process exiting.
The purpose of the sigaction 30 test (test30A()) is to verify that
a SIGCHLD signal and associated siginfo data is received by the
parent process when a child process which is stopped as a result
of job control is continued via the SIGCONT signal.
The sigaction 30 test fails due to an error in the test program.
Specifically, the test needs to reset or disable the SIGCHLD signal
handler after the second SIGCHLD signal is sent. A SIGCHLD signal will
be posted to the parent test process 3 times during the test -- once
when the child process is stopped, once when the child process is
continued and once when the child process exits. Each time the SIGCHLD
signal is posted, different data will be passed to the signal handler
via the siginfo structure. Since the test program does not reset the
signal handler for SIGCHLD after the second SIGCHLD signal is received
(on process continue), the third SIGCHLD signal (on process exit) causes
the same signal handler (sh_30A()) to incorrectly be invoked again. The
signal handler incorrectly checks for a siginfo si_code value of
CLD_CONTINUED and gets an si_code value of CLD_EXITED. The test program
should either disable or reset the SIGCHLD signal handler after the
second SIGCHLD signal is received (on process continue).
The incorrect behavior of the test program is evident from the test
output (see my comments following the '#' character):
PREP: Set up action for SIGCHLD # set up handler for proc stop
PREP: fork() a child that stops itself
PREP: Set up action for SIGCHLD # set handler to sh_30A() for proc continue
TEST: Send SIGCONT to child
TEST: signal = SIGCHLD # parent gets SIGCLD after SIGCONT sent
TEST: si_code = CLD_CONTINUED # si_code correctly set to CLD_CONTINUED
TEST: si_status = SIGCONT # si_status correctly set to SIGCONT
TEST: signal = SIGCHLD # parent gets 3rd SIGCLD after child exits
TEST: si_code = CLD_CONTINUED # sh_30A handler still installed and
# incorrectly tests for CLD_CONTINUED again...
ERROR: si_code incorrect. Expected 6,Received 1 # and finds CLD_EXITED
TEST: si_status = SIGCONT # should be testing for exit value here
ERROR: si_status incorrect. Expected SIGCONT,Received Unknown signal (0)
To fix the test in a manner that will prevent race conditions in the
test program, the signal handler should be disabled or reset from within
the signal handler (sh_30A()).Test Output
TEST PURPOSE #30
After a call to int sigaction(int sig, const struct
sigaction *act, struct sigaction *oact) with
SA_SIGINFO set in the sa_flags member of the sigaction
structure pointed to by act and sig equal to SIGCHLD,
on entry to the signal catching function specified by
the sa_handler member when the stopped child has
continued the si_code member of the structure pointed
to by the siginfo argument shall contain
CLD_CONTINUED, the si_pid member shall contain the
child process ID, the si_status member shall contain
the child's signal and the si_uid member
shall contain the real user ID of the process that
sent the signal.
PREP: Set up action for SIGCHLD
PREP: fork() a child that stops itself
PREP: Set up action for SIGCHLD
TEST: Send SIGCONT to child
TEST: signal = SIGCHLD
TEST: si_code = CLD_CONTINUED
TEST: si_status = SIGCONT
TEST: signal = SIGCHLD
TEST: si_code = CLD_CONTINUED
ERROR: si_code incorrect. Expected 6,Received 1
TEST: si_status = SIGCONT
ERROR: si_status incorrect. Expected SIGCONT,Received Unknown signal (0)
30 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 test
suite version(s) listed.
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 1442
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority