Correct the cleanup procedure in clone02
[ltp-debian.git] / INSTALL
blob98883fb3642bd3cc1432d803d342c363732ee46b
1 $Id: INSTALL,v 1.24 2009/05/29 10:06:08 subrata_modak Exp $
3 About configuration
4 -------------------
5 If you want to use auto configuration, be sure autoconf-2.61 & automake-1.10 are installed.
7 (Latest automake sources can be downloaded from:
8 ftp://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.gz,
10 Latest autoconf sources can be downloaded from:
11 ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz,
12 ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2,
14 Autoconf also requires certain higher version(s) of m4, which can be found from:
15 http://ftp.gnu.org/gnu/m4/,
16 http://ftp.gnu.org/gnu/m4/m4-1.4.12.tar.bz2).
18 Then run: 
19         $ make autotools 
20         $ ./configure   
21         $ make all      
22         $ make install
24 If you get a build error, please report it to ltp-list@lists.sf.net with
25 following information,
27  1. the error output of build tools(make, gcc, etc...)
28  2. the output of ./configure 
29  3. include/config.h
30  4. config.mk
31  5. config.log
34 If you want to use default configuration, autoconf is not needed. Just run:          
35         $ touch include/config.h.default 
36         $ make config.h                  
37         $ make all                       
39 If make all is failed even if you use the auto configuration, please, report it to  
40 ltp developers with config.log, generated by running the configure script.          
42 Quick Start
43 -----------
45 1> tar xzf ltp-XXXXXXXX.tar.gz
46 2> cd ltp
47 3> make
48 4> make install
49 5> ./runalltests.sh
51 *NOTE: The LTP assumes the existence of the nobody, bin, and daemon users and
52 their groups.  If these IDs do not exist, certain tests will fail. The users
53 and groups IDs should be the same, i.e. if user "nobody" is 99, then it's
54 group should also be "99". The names of the groups are irrelevant.
57 Detailed Installation
58 ---------------------
60 Beyond the "Quick Start" instructions, there are only a few other things
61 that should be done.  The Linux Test Project build process uses a
62 minimalist approach.  There is a lot of room for improvement and
63 contributions are welcome.
65 1. Log in as root.
67 2. Untar the ltp tarball into a spare directory.  There is not a
68    standard location for it yet.  We put it in our home directory
69    while we're working on it.
71 3. Run "make" to build everything.
72    *NOTE: Some of the Makefiles (example: pan/Makefile) require the lex (or
73    flex) package to be installed.
75 4. You can run all of the tests sequentially by using the example test
76    script runalltests.sh.  The script is there just to get you started.
77    See ltp-pan(1) for more information on the test driver we have provided.
78    It is simple, but it can do a lot of stuff.
80    NOTE: The diskio and network tests will NOT be run by the runalltests.sh
81    script.  We chose to separate these tests because of their required setup
82    overhead.
84 5. The disk i/o tests can be run by executing the diskio.sh script.  In order
85    for these tests to successfully operate a writable high-density 3.5" floppy
86    must be in the disk drive and a CD-ROM with more than 100Mb of data must be
87    in the CD-ROM drive.  The corresponding tests will fail if either disk is
88    missing.
90 6. The network tests are executed by running the networktests.sh script. The
91    network tests require some configuration for them to work correctly:
93      i) First, there MUST be another test machine setup to act as the server
94         to these client side tests.  This machine MUST have the LTP installed
95         in the same exact location, i.e. if the client has /root/ltp, then the
96         server must have /root/ltp.  This is required because certain tests
97         expect to find server files in certain locations.  Make sure to compile
98         the LTP on this server machine also.
100     ii) Second, the server must be setup to allow the client to connect using
101         the "r" commands, such as rsh.  This is done by simply creating/editing
102         the ".rhosts" file under /root.  Place the hostname of the client
103         machine in this file to allow root to remotely connect without the use
104         of a password. If server has the PAM system security tool, you need
105         to add the following lines to /etc/securetty:
106                 rlogin
107                 rsh
108                 rexec
109                 pts/0
110                 pts/1
111                   :
112                 pts/9
114    iii) Next, certain services must be activated in order for certain tests to
115         execute.  The following services are activated via inetd/xinetd:
116                 rlogind
117                 ftpd
118                 telnetd
119                 echo (stream)
120                 fingerd
121                 rshd
122          Also, because certain RPC programs are tested, the "portmapper" daemon
123          MUST be started, as well as NFS server AND lock services.
125     iv) Finally, before running the networktests.sh script, two variables must
126         be set within the script file.  The "RHOST" variable should be set to
127         the hostname of the server.  The "PASSWD" variable should be set to
128         root's password on the server machine.  This is necessary for tests
129         such as telnet01 and ftp01.
131    You can now successfully execute the networktests.sh script.
132    When you would like to run the whole network tests, specify -w option:
133         # ./networktests.sh -w
135    When you would like to run the same tests which networktests.sh ran till
136    2008, specify no option or -d option:
137         # ./networktests.sh
139    You can run the test category which you are interested in, -h option shows
140    the list of the test category:
141         # ./netwoktests.sh -h
144 Cross compiling
145 ---------------
147 To cross compile, override one or more of CC, AR, CROSS_CFLAGS,
148 LOADLIBES, LDFLAGS, & LIB_DIR and be sure to always build from the top level.
150 To override them from the make commandline, do something like this:
151 $ CROSS_COMPILER=/opt/cegl-1.4/hardhat/devkit/ppc/405/bin/powerpc-linux-
152 $ make \
153     CROSS_CFLAGS="-mcpu=403 -D__PPC405__" \
154     LDFLAGS=-static \
155     LOADLIBES="-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc"
157 Alternately, to override them by editing this file, uncomment the 
158 following lines:
159   CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
160   CROSS_CFLAGS= -mpowerpc64
161   LDFLAGS=-static 
162   LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
163   LIB_DIR=/lib64
164   export LOADLIBES LIB_DIR
166 Or, you can save all your settings into the local 'config.mk' file.
167 The defaults will not be usable in that case; you will need to
168 override things explicitly.
170 uClinux Users: make sure you add -DUCLINUX to your CFLAGS
172 Note: If you override a variable from the commandline all
173 assignments to it in the Makefiles will be ignored. To set it both 
174 in the commandline and in the Makefiles use a dummy variable like in
175 CFLAGS.
177 Variables in Makefile
178 ----------------------
180 The conventions enforced are the standard ones.  LTP isnt redefining any
181 of the flags from their normal meaning.  here's a quick summary:
183 CFLAGS   - used when compiling/linking C code (no CPPFLAGS!)
185 CXXFLAGS - used when compiling/linking C++ code (no CPPFLAGS!)
187 CPPFLAGS - used when preprocessor is run (so C/C++ compiling an $(CPP)
188            checks) 
190 LDFLAGS  - linker flags (no libraries) used when linking
192 LDLIBS   - libraries listed after objects during link
194 Above list is ideal: Many codes in LTP violates above list especially
195 about CPPFLAGS. e.g. -I and -D are passed to CFLAGS.
197 Currently the violation isn't critical. However, it should be fixed.
198 Patches are welcome.