[lsb-discuss] Unresolved result in LSB test

Xie Ruohong xieruohong at gmail.com
Wed Feb 1 03:20:21 UTC 2012


I have run LSB distribution checker for certification. In running core
tests (4.0.6-1), I received two 'unresolved' results:

*/tset/ANSI.os/genuts/abort/T.abort 11*
Message from the test:
child process still active 15 seconds after calling abort()
unexpected signal 15 (SIGTERM) received

*/tset/POSIX.os/devclass/i_ctty/T.i_ctty 6*
Message from the test:
child process timed out

I checked test code and found the two tests have similar process that lead
to unresolved results. A brief process of the test are listed below:

Using fork() to create a new process;
In child process:

1) Create two pseudo-terminal. For convenience, called *tty* and *loop*,
master/slave of *tty* call PTM1/PTS1, master/slave of *loop* call
 PTM2/PTS2. The controlling terminal is *tty.* VINTR is set to 0x03 in
*tty*side, while VINTR is set to vdisable in
*loop* side;
2) Connect two master pty's by forking two child process: child-1 copy the
output of PTM1 to PTM2's input, and child-2 copy the output of PTM2 to
PTM1's input;
3) Set the signal handler sig_catch() to handle the SIGINT;
4) Write 0x03 to PTS2;
5) pause();
...


Test program may expect to received SIGINT that cause pause() function
return. But I think the program does not guarantee that. When writing
character 0x03 to PTS2, this character will be sent to PTM2, then copied to
PTM1 by child-2. Then *tty* will generate a SIGINT signal and send to all
processes in the foreground process group because it is the controlling
terminal and its VINTR is set to 0x03. The character will be discarded
after processing and no longer copied to PTM2 again.

There is not any measure to ensure pause function has been executed when
the SIGINT signal is sent. So the pause function unable to return and cause
a timeout.

I'm not sure whether this is an problem that need to fix in
our distribution, or only a defect of the test program.  Is there anybody
can help me confirm that?

Thanks.

-- 
Xie Ruohong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lsb-discuss/attachments/20120201/b2d8b208/attachment.html>


More information about the lsb-discuss mailing list