blob: 98883fb3642bd3cc1432d803d342c363732ee46b [file] [log] [blame]
subrata_modakdddeb902009-05-29 10:06:08 +00001$Id: INSTALL,v 1.24 2009/05/29 10:06:08 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.
nstraz0312c252000-09-26 20:59:21 +000070
robbiew0eea3522004-02-05 17:33:10 +0000713. Run "make" to build everything.
72 *NOTE: Some of the Makefiles (example: pan/Makefile) require the lex (or
73 flex) package to be installed.
nstraz0312c252000-09-26 20:59:21 +000074
nstraz0312c252000-09-26 20:59:21 +0000754. 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.
subrata_modakdddeb902009-05-29 10:06:08 +000077 See ltp-pan(1) for more information on the test driver we have provided.
robbiew0eea3522004-02-05 17:33:10 +000078 It is simple, but it can do a lot of stuff.
robbiewb6c5fe72001-09-18 20:44:30 +000079
robbiew0eea3522004-02-05 17:33:10 +000080 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.
nstraz0312c252000-09-26 20:59:21 +000083
robbiew0eea3522004-02-05 17:33:10 +0000845. The disk i/o tests can be run by executing the diskio.sh script. In order
robbiewba422042001-09-19 15:25:43 +000085 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.
nstraz0312c252000-09-26 20:59:21 +000089
robbiewba422042001-09-19 15:25:43 +0000906. The network tests are executed by running the networktests.sh script. The
91 network tests require some configuration for them to work correctly:
92
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.
99
robbiew0eea3522004-02-05 17:33:10 +0000100 ii) Second, the server must be setup to allow the client to connect using
subrata_modak08978d22008-12-18 04:58:57 +0000101 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
robbiewba422042001-09-19 15:25:43 +0000113
robbiew0eea3522004-02-05 17:33:10 +0000114 iii) Next, certain services must be activated in order for certain tests to
robbiewba422042001-09-19 15:25:43 +0000115 execute. The following services are activated via inetd/xinetd:
116 rlogind
117 ftpd
118 telnetd
119 echo (stream)
120 fingerd
121 rshd
subrata_modak08978d22008-12-18 04:58:57 +0000122 Also, because certain RPC programs are tested, the "portmapper" daemon
123 MUST be started, as well as NFS server AND lock services.
robbiewba422042001-09-19 15:25:43 +0000124
robbiew0eea3522004-02-05 17:33:10 +0000125 iv) Finally, before running the networktests.sh script, two variables must
subrata_modak08978d22008-12-18 04:58:57 +0000126 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.
robbiewba422042001-09-19 15:25:43 +0000130
131 You can now successfully execute the networktests.sh script.
subrata_modak08978d22008-12-18 04:58:57 +0000132 When you would like to run the whole network tests, specify -w option:
133 # ./networktests.sh -w
134
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
138
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
vapier36ab22f2009-01-19 03:37:35 +0000142
143
144Cross compiling
145---------------
146
147To cross compile, override one or more of CC, AR, CROSS_CFLAGS,
148LOADLIBES, LDFLAGS, & LIB_DIR and be sure to always build from the top level.
149
150To 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"
156
157Alternately, to override them by editing this file, uncomment the
158following 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
165
166Or, you can save all your settings into the local 'config.mk' file.
167The defaults will not be usable in that case; you will need to
168override things explicitly.
169
170uClinux Users: make sure you add -DUCLINUX to your CFLAGS
171
172Note: If you override a variable from the commandline all
173assignments to it in the Makefiles will be ignored. To set it both
174in the commandline and in the Makefiles use a dummy variable like in
175CFLAGS.
176
177Variables in Makefile
178----------------------
179
180The conventions enforced are the standard ones. LTP isnt redefining any
181of the flags from their normal meaning. here's a quick summary:
182
183CFLAGS - used when compiling/linking C code (no CPPFLAGS!)
184
185CXXFLAGS - used when compiling/linking C++ code (no CPPFLAGS!)
186
187CPPFLAGS - used when preprocessor is run (so C/C++ compiling an $(CPP)
188 checks)
189
190LDFLAGS - linker flags (no libraries) used when linking
191
192LDLIBS - libraries listed after objects during link
193
194Above list is ideal: Many codes in LTP violates above list especially
195about CPPFLAGS. e.g. -I and -D are passed to CFLAGS.
196
197Currently the violation isn't critical. However, it should be fixed.
198Patches are welcome.