Working with the gfs2-utils test suite
--------------------------------------

The test suite in the tests directory of the gfs2-utils source tree is based on
the Autotest framework provided by Autoconf. The basic idea is that the
testsuite.at file is the main source file for the tests, written in m4 and
generating a bourne shell script called testsuite.

When run, either using 'make check' or directly from within the tests
directory, the testsuite script sources atconfig and atlocal for configuration
and then runs the whole testsuite or a specified set of tests (see ./testsuite
-h for help).

A number of GFS2-specific convenience macros have been defined in testsuite.at
to make defining new tests quick and easy. Also, some variables have been
defined in atlocal.in so that full paths to programs do not have to be included
in each test. Configuration should be specified in atlocal.in as atconfig is
generated by the configure script and atlocal is generated from atlocal.in at
build time.

To keep the test suite organised, the testsuite.at file sources the actual
tests from other files, e.g. mkfs.at.

A single test, specified as a test group in Autotest terms, follows the form

    AT_SETUP([Test title])
    ...test goes here...
    AT_CLEANUP

so, when adding tests, this is generally all that is required unless the tests
do not fit into an existing category, in which case AT_BANNER can be used to
group them, and they can be organised into a new .at file and sourced from
testsuite.at.

Since the tests can be run individually (e.g. ./testsuite 15) any new tests
which require the dummy volume $GFS_TGT to be present should call GFS_TGT_REGEN
before attempting to use it.

Documentation for Autotest, including the AT_* macros used to define tests, can
be found in the autoconf manual at:

    http://www.gnu.org/software/autoconf/manual/index.html
