The version of TET used by the LSB test suites is 3.3g. Further documentation on the use of TET and programmer APIs available for it are available from the TETworks website. The version of VSXgen used is 1.5 and the specification is available together with an overview of the current LSB test architecture .
Before attempting to write new TET based test suites for the LSB or convert existing test suites you should first familiarise yourself with the fundamentals of how to use TET. The TETware user guide is a good place to start and the source based LSB test suites can be used for experimentation of the various commands to build and run installed testcases. I recommend you do this concentrating on working out how to build and run individual testcases as well as getting the harness to output extra debug information. These skills are invaluable in debugging test failures.
If you are not familiar with the TET programming APIs you will also have to read the TET programmers guide. It describes in detail how to build TET based testcases and contains example code. TET supports C, C++, shell and Perl interfaces and it is possible to reuse some existing test programs by using the shell interface and wrapping existing test binaries.
ASSERT(foo==5, "Foo was not 5");
then the macro can be changed to call the appropriate TET calls making
the test suite TET aware without a lot of intrusive code changes. If
this is not possible then it is of course still possible to manually
add the TET calls.
$TET_ROOT whose default value is /home/tet.
vsx0, vsx1 and vsx2 users and
vsxg0, vsxg1 and vsxg2 groups. Also
NGROUP_MAX supplementary groups are created. The test
suites are nominally executed as the vsx0 user but the
other users and groups are needed to test functionality such as
permissions.
tet_vsxgen*.tgz tarball is unpacked into
$TET_ROOT
lts_* test suite tarballs are unpacked into
$TET_ROOT/test_sets. Thus it is important that the
test suite tarballs should be packed such that the root directory of
the files to be unpacked is $TET_ROOT/test_sets.
$TET_ROOT).
$TET_ROOT/test_sets/scripts/<test_suite_name>/display_licence_brief.sh
and executes it. It is expected that this shell script handles
the display of the licence information for that test suite. The
directory $TET_ROOT/test_sets/script/<test_suite_name> is
where the installation scripts look for test suite specific actions at
various stages of the installation and building process.
vsx0 user and
run the script $TET_ROOT/setup.sh which starts the next stage
the configuration and build process.
$TET_ROOT/setup.sh script is run as the vsx0 user
but at various stages of configuration and building of the test suites
super-user privileges are acquired (the user has to enter the root
password).
$TET_ROOT/src is built
and then installed into $TET_ROOT/bin. The makefile in
the TET/VSXgen tarball is configured so that a thread aware version of
TET is built.
gcc is used to compile the test
suites and the gcc includes directory is added to the list of
directories that TET looks in for header files.
$TET_ROOT/test_sets/scripts/locks . The
files in here are generally used to ensure that setup code which
common across multiple test suites is only run once per configuration
or setup run.
$TET_ROOT/test_sets/scripts/*/ which are called
pre-config.sh. This is the first hook that test suites
can use to have test suite specific setup code invoked. For example
the VSX-PCTS test suite sets up a loopback filesystem on which to do
filesystem tests that cannot be run on the native filesystem such as
testing that ENOSPC is returned correctly.
UNIX98 and the binary version
of the test suites are compiled with this mode. All further test
suites written must support this mode.
$TET_ROOT/test_sets/scripts/*/ which are called
post-config.sh. An example of a test suite using this
hook is the VSX-PCTS test suite which performs the installation of the
pseudo languages needed by the test suite.
$TET_ROOT/test_sets/scripts/*/ which are called
post-build.sh. An example of a test suite using this
hook is the VSX-PCTS test suite which installs wrapper scripts for its
tar format tests allowing for either tar and cpio or pax to be used.
$TET_ROOT/test_sets/scripts/*/
which are called parameterisations.sh. These scripts should write the
parameterisation values which required for testing on a Linux
platform. It is valid for a parameterisation script to ask for further
input from the user. New parameter values should be written to
$1.
run_testsets.sh script
which starts the process of building an executing the testcase
binaries.
lts_<test_suite_name>-A.B.X.Y.tgz where
$TET_ROOT/test_sets.
scripts/<test_suite_name>. Valid names for scripts are:
display_licence_brief.sh (Required)
pre-config.sh
post-config.sh
post-build.sh
parameterisations.sh
scripts/common directory to ensure consistency.
SRC/common) between test suites then they should be
placed in the main TET/VSXgen tarball to avoid consistency
problems. Otherwise they should be supplied by the test suite tarball.
$TET_ROOT, which is commonly /home/tet. This
is not an exhaustive description of all the directories, but should give
you an idea of how things fit together.
/src, /include - TET framework source and
include files.
/bin - TET framework binaries are installed
here.
/test_sets/tset - Source code for individual
testcases reside under here. The directory hierarchy under this point
is reflected in the scen.bld and scen.exec
files which tell TET/VSXgen which testcases to build and run.
/test_sets/TESTROOT/tset - This hierarchy is
a copy of the one under /test_sets/tset. It is
automatically constructed and populated when the test suites are
built.
/test_sets/MAN/tset - This is also of
identical structure to /test_sets/tset and contains the
manual pages for individual testcases. These correspond to the test
assertions. Very useful information can be found here when attempting
to debug testcase failures.
/test_sets/scripts - scripts supplied in the
test suite tarballs which are used during the installation and
configuration of the test suite. Scripts here are also supplied with
the binary package to setup the correct environment prior to the
testcases being executed.
/test_sets/results - journal files recording
the results of building and executing the testcases are placed
here. Directories ending in a 'b' contain build results,
those ending in an 'e' contain execution results.
/test_sets/SRC/common - directories in here
contain helper library code. Some of these are supplied by VSXgen
others are test suite specific.
The VSX-PCTS and LSB-OS test suites contain many examples of how to test C library interfaces. There are many scenarios which involve the test setting up complex situations to test certain aspects of an interface's functionality.
lsb-test@lists.linuxbase.org