#
# RCSID $Id: README,v 1.6 2002/05/30 07:11:13 dhr Exp $
#

PREAMBLE
========

This directory used to contain a number of obsolete test scripts.

It has been revived as a living concern.

The 'ji' sub-directory has been removed from CVS. If you need it, please
see version 1.91 or older, or get it from anon-cvs.

The 100, 103, 105, 110 and west sub-directories may disappear soon.

ENVIRONMENT
===========

The tests can be run either on a live system or under User-Mode-Linux (UML).
The User-Mode-Linux version is designed to run automated. 

If you do not have UML setup, you'll want to go to ../../testing/utils
and read "make-uml.sh". You need to have ../../umlsetup.sh configured.

It is feasible to adapt the console interaction to function over a
serial port, the "boot" functions to toggle a relay attached to a
power cord, and to swap "uml_netjig" for tcpdump+tcpreplay with real
network cards. (You'll probably have to be root though). This work has
not yet been automated. All of the tests can, however, be run manually
on real hardware.

ORGANIZATION
============

Each test lives in a seperate directory. In some cases there is a good
reason to have a sequence of tests. Each test is therefore given a number
(-XX). 

The script "dotests.sh" will run all tests that are described in the file
"TESTLIST". While TESTLIST is used as if it was a shell script (it is
sourced by dotests.sh) this is not to be depended upon.

The script "functions.sh" contains a series of shell functions which are
used to implement the test proceedures outlined in TESTLIST.

There are several other helper programs and scripts.
1)	../../testing/utils/uml_netjig/uml_netjig.
	This is a program to setup a quartet of sockets for use by UML.
	Documentation is currently at the top of the C file.

	The --startup option calls system with its argument after
	setting up the right sockets. Once the system call returns, 
	it starts to relay data, feeding data in/out, etc. 

	If called with --exitonempty, then once all the packets are
	inserted, uml_netjig exits.
	
2) 	../../testing/utils/host-test.tcl
	An expect script to startup a UML and feed it commands on stdin.
	This script takes two arguments: a script to start a UML (must
	stay in foreground) and a file of commands to feed in on
	stdin.

	Once the commands are fed in, the expect scripts forks into
	the background, and lets the parent continue. Usually, that is
	uml_netjig.
	
	The UML is started in single user mode!

3)	fixups.
	This is a directory of sed/perl/awk scripts used to massage
	the console output in to make it more uniform for regression 
	testing.

4)	inputs.
	A set of canned inputs that need not be repeated for each test.

Each test directory will have a shell script called "testparams.sh"
in it. This script is used to setup the appropriate inputs/outputs.
The test directory will be the current directory when the test is run.

At a minimum, the variable TESTNAME should be set. It will be used to
record success/failure in a database. (TBD)

Output files will be placed in a subdir "OUTPUT", which will be created.

Each test in TESTLIST must be one of the following:

a)	skiptest
	Do not run this test at all.	

b)	kerntest
	Run this test, but skip all network input/output.

	SCRIPT must be set to the console script

	REFCONSOLEOUTPUT mus tbe set to the reference console output.

c) 	klipstest

	Run this test with input and output configured.
	SCRIPT must be set to a console script to configure things.
	REFCONSOLEOUTPUT can be set to the reference console output.

	PRIVINPUT	a pcap file to play on private network
	PUBINPUT       a pcap file to play on the public network

	REFPRIVOUTPUT   if set, then the private network will be
			captured and compared against this (text) file.

	REFPUBOUTPUT    ditto for public network.

	TCPDUMPARGS     tcpdump is used to transform the packets to
			text, and you may need to specify flags to
			help tcpdump cope.

MORE TO COME.

#
# $Log: README,v $
# Revision 1.6  2002/05/30 07:11:13  dhr
#
# typo
#
# Revision 1.5  2002/04/24 07:36:13  mcr
# Moved from ./klips/test/README,v
#
# Revision 1.4  2002/02/20 07:25:35  rgb
# Corrected depluralized variable names.
#
# Revision 1.3  2001/11/23 01:08:12  mcr
# 	pullup of test bench from klips2 branch.
#
# Revision 1.2.6.1  2001/10/15 04:01:43  mcr
# 	beginnings of (internal) documentation on testbench
#
# Revision 1.2  1999/04/06 04:54:31  rgb
# Fix/Add RCSID Id: and Log: bits to make PHMDs happy.  This includes
# patch shell fixes.
#
#
