How to handle POSIX signals in a C language test case
This information is not applicable to Win32 systems.
I'm using the C API to port some legacy test code to TET.
The code issues a signal 14
during normal execution and this
is trapped by the TCM, terminating the test prematurely.
I've tried setting
in the execute mode configuration
but the TCM tells me this is an illegal entry.
Are there any workarounds?
signal; that is: a signal whose behaviour is
defined by POSIX.
The TCM does not permit the handling of standard signals to be altered
by the configuration variables that you mention because the way that
such signals are to be handled is considered to be a matter for the test
suite author rather than for the user.
If you want to change the TCM's default signal handling in a particular
test purpose function, you can add code to change the signal's disposition
in the function itself.
This is the preferred solution - it enables each test purpose function
to be self-contained and not rely on the execution (or non-execution) of
a previous test purpose function.
Alternatively you can change the signal's disposition in the test case
startup function, then set the API's global variable
to a non-zero value in the startup function.
When you do this, the TCM does not reset the dispositions of signals
before it calls each test purpose function and so these dispositions
remain unchanged (by the TCM, at least) throughout the life of the test
The descriptions of
in Chapter 8 of the TETware Programmers Guide.
"The Test Case Manager'' in the TETware Programmers Guide.