blob: 83f156634b418aeb5dc2e85220067af5335b849b [file] [log] [blame]
subrata_modakf43b3802009-08-28 05:33:40 +00001$Id: INSTALL,v 1.25 2009/08/28 05:33:40 subrata_modak Exp $
subrata_modakaba85b92008-12-11 10:30:33 +00002
3About configuration
4-------------------
subrata_modak16147ad2009-01-21 11:30:52 +00005If you want to use auto configuration, be sure autoconf-2.61 & automake-1.10 are installed.
subrata_modak3960cc82009-01-20 10:47:29 +00006
subrata_modak16147ad2009-01-21 11:30:52 +00007(Latest automake sources can be downloaded from:
8ftp://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.gz,
9
10Latest autoconf sources can be downloaded from:
11ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz,
12ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2,
13
14Autoconf also requires certain higher version(s) of m4, which can be found from:
15http://ftp.gnu.org/gnu/m4/,
16http://ftp.gnu.org/gnu/m4/m4-1.4.12.tar.bz2).
subrata_modak3960cc82009-01-20 10:47:29 +000017
subrata_modakaba85b92008-12-11 10:30:33 +000018Then run:
subrata_modak3960cc82009-01-20 10:47:29 +000019 $ make autotools
subrata_modakaba85b92008-12-11 10:30:33 +000020 $ ./configure
21 $ make all
subrata_modak16147ad2009-01-21 11:30:52 +000022 $ make install
subrata_modakaba85b92008-12-11 10:30:33 +000023
subrata_modak40455172009-01-05 08:35:21 +000024If you get a build error, please report it to ltp-list@lists.sf.net with
25following information,
26
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
32
33
subrata_modakaba85b92008-12-11 10:30:33 +000034If 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
38
39If make all is failed even if you use the auto configuration, please, report it to
40ltp developers with config.log, generated by running the configure script.
alaffine15dd682000-05-08 20:31:30 +000041
nstraz0312c252000-09-26 20:59:21 +000042Quick Start
43-----------
whrb973f2b2000-05-05 19:34:50 +000044
robbiew57404482001-09-19 16:11:23 +0000451> tar xzf ltp-XXXXXXXX.tar.gz
nstraz0312c252000-09-26 20:59:21 +0000462> cd ltp
robbiew0eea3522004-02-05 17:33:10 +0000473> make
robbiew502f4ca2003-02-05 16:30:06 +0000484> make install
495> ./runalltests.sh
whrb973f2b2000-05-05 19:34:50 +000050
robbiew0eea3522004-02-05 17:33:10 +000051*NOTE: The LTP assumes the existence of the nobody, bin, and daemon users and
52their groups. If these IDs do not exist, certain tests will fail. The users
53and groups IDs should be the same, i.e. if user "nobody" is 99, then it's
54group should also be "99". The names of the groups are irrelevant.
robbiew5be3ca52001-10-12 20:21:49 +000055
whrb973f2b2000-05-05 19:34:50 +000056
nstraz0312c252000-09-26 20:59:21 +000057Detailed Installation
58---------------------
59
60Beyond the "Quick Start" instructions, there are only a few other things
61that should be done. The Linux Test Project build process uses a
62minimalist approach. There is a lot of room for improvement and
63contributions are welcome.
64
robbiewb6c5fe72001-09-18 20:44:30 +0000651. Log in as root.
66
672. Untar the ltp tarball into a spare directory. There is not a
robbiewfc0708b2004-03-01 22:16:02 +000068 standard location for it yet. We put it in our home directory
robbiew0eea3522004-02-05 17:33:10 +000069 while we're working on it.
subrata_modakf43b3802009-08-28 05:33:40 +000070 Note that the full path to this location must be accessible for
71 unprivileged users, as some tests are run as a different user than root.
72 Hence /root is not a good choice on several distributions.
nstraz0312c252000-09-26 20:59:21 +000073
robbiew0eea3522004-02-05 17:33:10 +0000743. Run "make" to build everything.
75 *NOTE: Some of the Makefiles (example: pan/Makefile) require the lex (or
76 flex) package to be installed.
nstraz0312c252000-09-26 20:59:21 +000077
nstraz0312c252000-09-26 20:59:21 +0000784. You can run all of the tests sequentially by using the example test
79 script runalltests.sh. The script is there just to get you started.
subrata_modakdddeb902009-05-29 10:06:08 +000080 See ltp-pan(1) for more information on the test driver we have provided.
robbiew0eea3522004-02-05 17:33:10 +000081 It is simple, but it can do a lot of stuff.
robbiewb6c5fe72001-09-18 20:44:30 +000082
robbiew0eea3522004-02-05 17:33:10 +000083 NOTE: The diskio and network tests will NOT be run by the runalltests.sh
84 script. We chose to separate these tests because of their required setup
85 overhead.
nstraz0312c252000-09-26 20:59:21 +000086
robbiew0eea3522004-02-05 17:33:10 +0000875. The disk i/o tests can be run by executing the diskio.sh script. In order
robbiewba422042001-09-19 15:25:43 +000088 for these tests to successfully operate a writable high-density 3.5" floppy
89 must be in the disk drive and a CD-ROM with more than 100Mb of data must be
90 in the CD-ROM drive. The corresponding tests will fail if either disk is
91 missing.
nstraz0312c252000-09-26 20:59:21 +000092
robbiewba422042001-09-19 15:25:43 +0000936. The network tests are executed by running the networktests.sh script. The
94 network tests require some configuration for them to work correctly:
95
96 i) First, there MUST be another test machine setup to act as the server
97 to these client side tests. This machine MUST have the LTP installed
98 in the same exact location, i.e. if the client has /root/ltp, then the
99 server must have /root/ltp. This is required because certain tests
100 expect to find server files in certain locations. Make sure to compile
101 the LTP on this server machine also.
102
robbiew0eea3522004-02-05 17:33:10 +0000103 ii) Second, the server must be setup to allow the client to connect using
subrata_modak08978d22008-12-18 04:58:57 +0000104 the "r" commands, such as rsh. This is done by simply creating/editing
105 the ".rhosts" file under /root. Place the hostname of the client
106 machine in this file to allow root to remotely connect without the use
107 of a password. If server has the PAM system security tool, you need
108 to add the following lines to /etc/securetty:
109 rlogin
110 rsh
111 rexec
112 pts/0
113 pts/1
114 :
115 pts/9
robbiewba422042001-09-19 15:25:43 +0000116
robbiew0eea3522004-02-05 17:33:10 +0000117 iii) Next, certain services must be activated in order for certain tests to
robbiewba422042001-09-19 15:25:43 +0000118 execute. The following services are activated via inetd/xinetd:
119 rlogind
120 ftpd
121 telnetd
122 echo (stream)
123 fingerd
124 rshd
subrata_modak08978d22008-12-18 04:58:57 +0000125 Also, because certain RPC programs are tested, the "portmapper" daemon
126 MUST be started, as well as NFS server AND lock services.
robbiewba422042001-09-19 15:25:43 +0000127
robbiew0eea3522004-02-05 17:33:10 +0000128 iv) Finally, before running the networktests.sh script, two variables must
subrata_modak08978d22008-12-18 04:58:57 +0000129 be set within the script file. The "RHOST" variable should be set to
130 the hostname of the server. The "PASSWD" variable should be set to
131 root's password on the server machine. This is necessary for tests
132 such as telnet01 and ftp01.
robbiewba422042001-09-19 15:25:43 +0000133
134 You can now successfully execute the networktests.sh script.
subrata_modak08978d22008-12-18 04:58:57 +0000135 When you would like to run the whole network tests, specify -w option:
136 # ./networktests.sh -w
137
138 When you would like to run the same tests which networktests.sh ran till
139 2008, specify no option or -d option:
140 # ./networktests.sh
141
142 You can run the test category which you are interested in, -h option shows
143 the list of the test category:
144 # ./netwoktests.sh -h
vapier36ab22f2009-01-19 03:37:35 +0000145
146
147Cross compiling
148---------------
149
150To cross compile, override one or more of CC, AR, CROSS_CFLAGS,
151LOADLIBES, LDFLAGS, & LIB_DIR and be sure to always build from the top level.
152
153To override them from the make commandline, do something like this:
154$ CROSS_COMPILER=/opt/cegl-1.4/hardhat/devkit/ppc/405/bin/powerpc-linux-
155$ make \
156 CROSS_CFLAGS="-mcpu=403 -D__PPC405__" \
157 LDFLAGS=-static \
158 LOADLIBES="-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc"
159
160Alternately, to override them by editing this file, uncomment the
161following lines:
162 CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
163 CROSS_CFLAGS= -mpowerpc64
164 LDFLAGS=-static
165 LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
166 LIB_DIR=/lib64
167 export LOADLIBES LIB_DIR
168
169Or, you can save all your settings into the local 'config.mk' file.
170The defaults will not be usable in that case; you will need to
171override things explicitly.
172
173uClinux Users: make sure you add -DUCLINUX to your CFLAGS
174
175Note: If you override a variable from the commandline all
176assignments to it in the Makefiles will be ignored. To set it both
177in the commandline and in the Makefiles use a dummy variable like in
178CFLAGS.
179
180Variables in Makefile
181----------------------
182
183The conventions enforced are the standard ones. LTP isnt redefining any
184of the flags from their normal meaning. here's a quick summary:
185
186CFLAGS - used when compiling/linking C code (no CPPFLAGS!)
187
188CXXFLAGS - used when compiling/linking C++ code (no CPPFLAGS!)
189
190CPPFLAGS - used when preprocessor is run (so C/C++ compiling an $(CPP)
191 checks)
192
193LDFLAGS - linker flags (no libraries) used when linking
194
195LDLIBS - libraries listed after objects during link
196
197Above list is ideal: Many codes in LTP violates above list especially
198about CPPFLAGS. e.g. -I and -D are passed to CFLAGS.
199
200Currently the violation isn't critical. However, it should be fixed.
201Patches are welcome.