OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / klips / test / README
1 #
2 # RCSID $Id: README,v 1.4 2002/02/20 07:25:35 rgb Exp $
3 #
4
5 PREAMBLE
6 ========
7
8 This directory used to contain a number of obsolete test scripts.
9
10 It has been revived as a living concern.
11
12 The 'ji' sub-directory has been removed from CVS. If you need it, please
13 see version 1.91 or older, or get it from anon-cvs.
14
15 The 100, 103, 105, 110 and west sub-directories may disappear soon.
16
17 ENVIRONMENT
18 ===========
19
20 The tests can be run either on a live system or under User-Mode-Linux (UML).
21 The User-Mode-Linux version is designed to run automated. 
22
23 If you do not have UML setup, you'll want to go to ../../testing/utils
24 and read "make-uml.sh". You need to have ../../umlsetup.sh configured.
25
26 It is feasible to adapt the console interaction to function over a
27 serial port, the "boot" functions to toggle a relay attached to a
28 power cord, and to swap "uml_netjig" for tcpdump+tcpreplay with real
29 network cards. (You'll probably have to be root though). This work has
30 not yet been automated. All of the tests can, however, be run manually
31 on real hardware.
32
33 ORGANIZATION
34 ============
35
36 Each test lives in a seperate directory. In some cases there is a good
37 reason to have a sequence of tests. Each test is therefore given a number
38 (-XX). 
39
40 The script "dotests.sh" will all tests that are described in the file
41 "TESTLIST". While TESTLIST is used as if it was a shell script (it is
42 sourced by dotests.sh) this is not to be depended upon.
43
44 The script "functions.sh" contains a series of shell functions which are
45 used to implement the test proceedures outlined in TESTLIST.
46
47 There are several other helper programs and scripts.
48 1)      ../../testing/utils/uml_netjig/uml_netjig.
49         This is a program to setup a quartet of sockets for use by UML.
50         Documentation is currently at the top of the C file.
51
52         The --startup option calls system with its argument after
53         setting up the right sockets. Once the system call returns, 
54         it starts to relay data, feeding data in/out, etc. 
55
56         If called with --exitonempty, then once all the packets are
57         inserted, uml_netjig exits.
58         
59 2)      ../../testing/utils/host-test.tcl
60         An expect script to startup a UML and feed it commands on stdin.
61         This script takes two arguments: a script to start a UML (must
62         stay in foreground) and a file of commands to feed in on
63         stdin.
64
65         Once the commands are fed in, the expect scripts forks into
66         the background, and lets the parent continue. Usually, that is
67         uml_netjig.
68         
69         The UML is started in single user mode!
70
71 3)      fixups.
72         This is a directory of sed/perl/awk scripts used to massage
73         the console output in to make it more uniform for regression 
74         testing.
75
76 4)      inputs.
77         A set of canned inputs that need not be repeated for each test.
78
79 Each test directory will have a shell script called "testparams.sh"
80 in it. This script is used to setup the appropriate inputs/outputs.
81 The test directory will be the current directory when the test is run.
82
83 At a minimum, the variable TESTNAME should be set. It will be used to
84 record success/failure in a database. (TBD)
85
86 Output files will be placed in a subdir "OUTPUT", which will be created.
87
88 Each test in TESTLIST must be one of the following:
89
90 a)      skiptest
91         Do not run this test at all.    
92
93 b)      kerntest
94         Run this test, but skip all network input/output.
95
96         SCRIPT must be set to the console script
97
98         REFCONSOLEOUTPUT mus tbe set to the reference console output.
99
100 c)      klipstest
101
102         Run this test with input and output configured.
103         SCRIPT must be set to a console script to configure things.
104         REFCONSOLEOUTPUT can be set to the reference console output.
105
106         PRIVINPUT       a pcap file to play on private network
107         PUBINPUT       a pcap file to play on the public network
108
109         REFPRIVOUTPUT   if set, then the private network will be
110                         captured and compared against this (text) file.
111
112         REFPUBOUTPUT    ditto for public network.
113
114         TCPDUMPARGS     tcpdump is used to transform the packets to
115                         text, and you may need to specify flags to
116                         help tcpdump cope.
117
118 MORE TO COME.
119
120 #
121 # $Log: README,v $
122 # Revision 1.4  2002/02/20 07:25:35  rgb
123 # Corrected depluralized variable names.
124 #
125 # Revision 1.3  2001/11/23 01:08:12  mcr
126 #       pullup of test bench from klips2 branch.
127 #
128 # Revision 1.2.6.1  2001/10/15 04:01:43  mcr
129 #       beginnings of (internal) documentation on testbench
130 #
131 # Revision 1.2  1999/04/06 04:54:31  rgb
132 # Fix/Add RCSID Id: and Log: bits to make PHMDs happy.  This includes
133 # patch shell fixes.
134 #
135 #