11.1. Test Banners#
All test output banners or strings are embedded in each test and the test outputs the banners to the BSP’s console as it executes. The RTEMS Tester captures the BSP’s console and uses this information to manage the state of the executing test. The banner strings are:
*** BEGIN TEST <name> ***The test has loaded, RTEMS has initialized and the test specific code is about to start executing. The
<name>field is the name of the test. The test name is internal to the test and may not match the name of the executable. The test name is informative and not used by the RTEMS Tester.
*** END TEST <name> ***The test has finished without error and has passed. The
<name>field is the name of the test. See the Test Begin Banner for details about the name.
*** TEST VERSION: <version>The test prints the RTEMS version return by the RTEMS Version API as
<version>. All tests must match the first test’s version or the Wrong Version error count is incremented.
*** TEST STATE: <state>The test is tagged in the RTEMS sources with a special
<state>for this BSP. See Test States for the list of possible states. The state banner lets the RTEMS Tester categorize and manage the test. For example a user input test typically needing user interaction may never complete producing an invalid test result. A user input test is terminated to avoid extended delays in a long test run.
*** TEST BUILD: <build>The test prints the RTEMS build as a space separated series of labels as
<build>. The build labels are created from the configuration settings in the Super Score header filertems/score/cputops.h. All tests must match the first test’s build or the Wrong Build error count is incremented.
*** TEST TOOLS: <version>The test prints the RTEMS tools version returned the GGC internal macro
_VERSION_as<version>. All tests must match the first test’s tools version string or the Wrong Tools error count is incremented.
11.2. Test Controls#
The tests in the RTEMS kernel testsuite can be configured for each BSP. The expected state of the test can be set as well as any configuration parameters a test needs to run on a BSP.
The test states are:
passedThe test start and end banners have been sent to the console.
failureThe test start banner has been sent to the console and no end banner has been seen when a target restart is detected.
excepted-failThe test is tagged as
expected-failin the RTEMS sources for this BSP and outputs the banner*** TEST STATE: EXPECTED_FAIL. The test is known not to pass on this BSP. The RTEMS Tester will let the test run as far as it can and if the test passes it is recorded as a pass in the test results otherwise it is recorded as expected-fail.
indeterminateThe test is tagged as
indeterminatein the RTEMS sources for this BSP and outputs the banner*** TEST STATE: INDETERMINATE. The test may or may not pass so the result is not able to be determined. The RTEMS Tester will let the test run as far as it can and record the result as indeterminate.
user-inputThe test is tagged as
user-inputin the RTEMS sources and outputs the banner*** TEST STATE: USER_INPUT. The RTEMS Tester will reset the target if the target’s configuration provides a target reset command.
benchmarkThe test is tagged as
benchmarkin the RTEMS sources and outputs the banner*** TEST STATE: BENCHMARK. Benchmarks can take a while to run and performance is not regression tested in RTEMS. The RTEMS Tester will reset the target if the target’s configuration provides a target reset command.
timeoutThe test start banner has been sent to the console and no end banner is seen within the timeout period and the target has not restart. A default timeout can be set in a target configuration, a user configuration or provide on the RTEMS Tester’s command line using the
--timeoutoption.
invalidThe test did not output a start banner and the RTEMS Tester has detected the target has restarted. This means the executable did not load correctly, the RTEMS kernel did not initialize or the RTEMS kernel configuration failed for this BSP.
11.2.1. Expected Test States#
A test’s expected state is set in the RTEMS kernel’s testsuite. The default for
a tested is to pass. If a test is known to fail it can have it’s state set
to expected-fail. Setting tests that are known to fail to expected-fail
lets everyone know a failure is not to be countered and consider a regression.
Expected test states are listed in test configuration files
11.2.2. Test Configuration#
Tests can be configured for each BSP using test configuration files. These
files exist under the spec directory and have the form tst*.yml. Global
default test states exist as part of the tests themselves and are applied to
all BSPs. BSPs can provide a test configuration that applies to just that BSP
and these files can include subsets of test configurations.
The configuration supports:
Including test configuration files to allow sharing of common configurations.
Excluding tests from being built that do not build for a BSP.
Setting the test state if it is not
passed.Specifing a BSP specific build configuration for a test.
The test configuration file format is described in the engineering manual.
Expected test state is configured using set-test-state action blocks in
build type YAML configuration files. These set-test-state action blocks
contain one or more sub blocks that each describe a reason, an expected
state, and a list of tests to which the state and reason apply.
The reason is a text description of why the expected test state is being
changed from the default and will typically include a ticket number that further
documents the status of the listed tests.
The state is one of:
includeThe test list is the name of a test configuration file to include
excludeThe tests listed are not build. This can happen if a BSP cannot support a test. For example it does not have enough memory.
expected-failThe tests listed are set to expected fail. The test will fail on the BSP being built.
user-inputThe tests listed require user input to run and are not supported by automatic testers.
indeterminateThe tests listed may pass or may not, the result is not reliable.
benchmarkThe tests listed are benchmarks. Benchmarks are flagged and not left to run to completion because they may take too long.
By default all tests are included, specific excluded tests using the
exclude state are excluded and cannot be included again.
11.3. Test Builds#
The test reports the build of RTEMS being tested. The build are:
defaultThe build is the default. No RTEMS configure options have been used.
posixThe build includes the POSIX API. The RTEMS configure option
--enable-posixhas been used. Thecpuopts.hdefineRTEMS_POSIXhas defined and it true.
smpThe build is an SMP kernel. The RTEMS configure option
--enable-smphas been used. Thecpuopts.hdefineRTEMS_SMPhas defined and it true.
mpThe build is an MP kernel. The RTEMS configure option
--enable-multiprocessinghas been used. Thecpuopts.hdefineRTEMS_MULTIPROCESSINGhas defined and it true.
paravirtThe build is a paravirtualization kernel. The
cpuopts.hdefineRTEMS_PARAVIRThas defined and it true.
debugThe build includes kernel debugging support. The RTEMS configure option
--enable-debughas been used. Thecpuopts.hdefineRTEMS_DEBUGhas defined and it true.
profilingThe build include profiling support. The RTEMS configure option
--enable-profilinghas been used. Thecpuopts.hdefineRTEMS_PROFILINGhas defined and it true.