EVMS Test Suite
===============

This directory tree contains a wide variety of tests that can be run to
verify the correct operation of EVMS after it is installed on a system.

The "Evms" directory contains perl modules with common routines used by
the test scripts. The "Tests" directory contains subdirectories for each
set of tests. Most of these subdirectories are meant to test a specific
plugin's functionality. Each of these subdirectories contains one or more
"test" scripts. The top-level "run_tests" script iterates through all the 
directories in "Tests", running all of the "test" scripts, passing them
the list of disks specified on the command-line. The "Tests/directories"
file contains a list specifying the order in which the "Tests" subdirectories
will be processed.  The "prerequisites" file contains a list of command-line
tools that the test-suite needs in order to run properly.

Run the whole set of tests using:
./run_tests <disk_name>+

Run a single test using:
./Tests/dos/test1 <disk_name>+

If you wish to only run a subset of the test directories, edit the
"Tests/directories" file and comment-out the directories you want to
exclude.

The test-suite expects whole-disks to be specified on the command-line.
Some tests may not run properly if a segment or other intermediate object
is specified. If you don't have a full disk to devote to the test, you
may use a loop device to simulate a full disk.
- Create a large file using dd (this creates a 4GB file):
  dd if=/dev/zero of=/tmp/evms_test_file bs=1M count=4096
- Activate a loop device on this file:
  losetup /dev/loop0 /tmp/evms_test_file
- If running a 2.4 kernel, add "loop?" to the legacy_devices.include line
  in your /etc/evms.conf file.
- Run the test suite with:
  ./run_tests loop0
- Deactivate the loop device with:
  losetup -d /dev/loop0

The test-suite requires a number of command-line tools to be installed in
order for all the tests to run correctly. Here is a list of these tools, and
the location where each one can be downloaded if it's not already installed.
- evms: EVMS command-line UI. Available in EVMS source package.
- evms_clean: Tool for erasing all volumes and objects from a disk. Available
              in the "tests" directory in the EVMS source package.
- dmsetup: Low-level tool for talking to Device-Mapper. Part of the
           device-mapper package at ftp://sources.redhat.com/pub/dm/.
- blockdev: Tool for getting information about block-device files. Part of the
            util-linux package at
            http://www.kernel.org/pub/linux/utils/util-linux/
- stat: Tool for getting information about files. Part of the coreutils
        package at ftp://ftp.gnu.org/pub/gnu/coreutils/
- seq_dd: Tool for writing and validating numerical sequences on block-devices.
          Available in the "tests" directory in the EVMS source package.
- wget: Generic, non-interactive network downloader.
        ftp://ftp.gnu.org/pub/gnu/wget/

