TETware for Realtime and Embedded Systems
TETware is designed to operate on systems that support at least the functionality described in POSIX 1003.1 (1990) or Win32 systems. TETware/RT is an addon to TETware, that allows the use of TETware with embedded systems such as those supporting the POSIX standard for Embedded Realtime Systems (POSIX 1003.13) and embedded Linux systems. These typically contain only a subset of the functionality of a full multi-purpose operating system, perhaps without a file system, and multiple processes. These typically require cross compilation of tests on a host system, with downloading and execution of the tests on the remote target device.
In a ‘‘normal’’ non-distributed testing setup, both TETware, and the test cases that it processes, run on the same system. The whole process is driven by a list of test cases contained in the scenario file. A Test Case Manager (TCM) module is linked into each test case executable. The TCM calls each Test Purpose (TP) function in turn. Each TP completes whatever processing is necessary to perform the test, and then calls an API function to record a result. When all the TP functions have been called, the Test Case Manager exits. Finally, TETware gathers the results of each TP, writes them to the result file and moves on to the next test case.
Figure 1: Simple TETware Testing Model
When testing embedded systems, this model needs to be modified. This is mainly for the following reasons:
Figure 2: Simple TETware Realtime and Embedded System Testing Model
The required modification is accomplished by using TETware’s exec tool facility to run the TETware RT Test Manager on the host system (that is: the system on which TETware runs). The Test Manager acts as an agent for the test case that is running on the embedded system.
TETware RT Test Manager
TETware executes a new instance of the Test Manager each time it executes a test case. The Test Manager performs the following operations:
TETware RT TCM and API
Each test case that is to run on the embedded system is linked with the TETware RT versions of the C TCM and API library. As in TETware, both single-threaded and thread-safe versions of these components are supplied. A substantial subset of the API functions implemented in TETware Lite is available in the TETware RT version of the API library.
Although the supported API functions are the same, in many cases the implementations are quite different. For example, functions that write information to the execution results file in TETware instead send the information to the Test Manager in TETware RT. When the Test Manager receives this information, it writes the information to the execution results file on the host system.
Manufacturer Specific Subsystems
An interface has been defined which enables TETware RT components to send requests to other hardware and software subsystems. The implementation of the underlying functionality is specific to the hardware and/or software involved, and is implemented by (or on behalf of) the suppliers of these components.
The subsystems are described in more detail below. For additional information please refer to the TETware Realtime and Embedded Systems Extension; Installation, User, Demonstration and Programmers Guide.
Functions that are implemented on the host system are used by the Test Manager, and functions that are implemented on the realtime system are used by the TETware version of the Test Case Manager and API library.
Provides two-way communication between the Test Manager on the host system and the TETware RT TCM/API on the realtime system.
This subsystem consists of two parts; one part on the host system and the other on the realtime system. Each part is responsible for establishing a communication channel to the other part, and for exchanging fixed length message packets over the channel. Typically this subsystem is implemented using TCP/IP (if the realtime system supports it) or a connection between serial ports on each system.
Loads a test case executable on to the realtime system and executes it; and, provides a profile-independent mechanism for test case termination on the realtime system.
This subsystem consists of two parts; one part on the host system and the other on the realtime system.
The part on the host system is responsible for copying a program image file onto the realtime system and executing it. The part on the realtime system is used to terminate a running program, as if exit() has been called by the program.
Resets the realtime system.
This subsystem consists of a single part on the host system. It is responsible for initializing the realtime system to a known state.
The following operations are defined: Soft reset; Hard reset.
Normally the Test Manager requests a soft reset if a test purpose times out, or if it is necessary to interrupt the currently running test purpose for some reason. If the soft reset operation fails, the Test Manager requests a hard reset. This process is analogous to sending a SIGTERM signal to a process running on a UNIX system, followed up by a SIGKILL signal if the process has not terminated within a reasonable time. If only one type of reset is possible for a particular realtime system, then it should be performed in response to both types of reset request.
Products using TETware/RT
The Open Group has the following test suites that provide embedded systems test coverage: