subrata_modak | dddeb90 | 2009-05-29 10:06:08 +0000 | [diff] [blame^] | 1 | $Id: INSTALL,v 1.24 2009/05/29 10:06:08 subrata_modak Exp $ |
subrata_modak | aba85b9 | 2008-12-11 10:30:33 +0000 | [diff] [blame] | 2 | |
| 3 | About configuration |
| 4 | ------------------- |
subrata_modak | 16147ad | 2009-01-21 11:30:52 +0000 | [diff] [blame] | 5 | If you want to use auto configuration, be sure autoconf-2.61 & automake-1.10 are installed. |
subrata_modak | 3960cc8 | 2009-01-20 10:47:29 +0000 | [diff] [blame] | 6 | |
subrata_modak | 16147ad | 2009-01-21 11:30:52 +0000 | [diff] [blame] | 7 | (Latest automake sources can be downloaded from: |
| 8 | ftp://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.gz, |
| 9 | |
| 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, |
| 13 | |
| 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). |
subrata_modak | 3960cc8 | 2009-01-20 10:47:29 +0000 | [diff] [blame] | 17 | |
subrata_modak | aba85b9 | 2008-12-11 10:30:33 +0000 | [diff] [blame] | 18 | Then run: |
subrata_modak | 3960cc8 | 2009-01-20 10:47:29 +0000 | [diff] [blame] | 19 | $ make autotools |
subrata_modak | aba85b9 | 2008-12-11 10:30:33 +0000 | [diff] [blame] | 20 | $ ./configure |
| 21 | $ make all |
subrata_modak | 16147ad | 2009-01-21 11:30:52 +0000 | [diff] [blame] | 22 | $ make install |
subrata_modak | aba85b9 | 2008-12-11 10:30:33 +0000 | [diff] [blame] | 23 | |
subrata_modak | 4045517 | 2009-01-05 08:35:21 +0000 | [diff] [blame] | 24 | If you get a build error, please report it to ltp-list@lists.sf.net with |
| 25 | following 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_modak | aba85b9 | 2008-12-11 10:30:33 +0000 | [diff] [blame] | 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 |
| 38 | |
| 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. |
alaffin | e15dd68 | 2000-05-08 20:31:30 +0000 | [diff] [blame] | 41 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 42 | Quick Start |
| 43 | ----------- |
whr | b973f2b | 2000-05-05 19:34:50 +0000 | [diff] [blame] | 44 | |
robbiew | 5740448 | 2001-09-19 16:11:23 +0000 | [diff] [blame] | 45 | 1> tar xzf ltp-XXXXXXXX.tar.gz |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 46 | 2> cd ltp |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 47 | 3> make |
robbiew | 502f4ca | 2003-02-05 16:30:06 +0000 | [diff] [blame] | 48 | 4> make install |
| 49 | 5> ./runalltests.sh |
whr | b973f2b | 2000-05-05 19:34:50 +0000 | [diff] [blame] | 50 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 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. |
robbiew | 5be3ca5 | 2001-10-12 20:21:49 +0000 | [diff] [blame] | 55 | |
whr | b973f2b | 2000-05-05 19:34:50 +0000 | [diff] [blame] | 56 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 57 | Detailed Installation |
| 58 | --------------------- |
| 59 | |
| 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. |
| 64 | |
robbiew | b6c5fe7 | 2001-09-18 20:44:30 +0000 | [diff] [blame] | 65 | 1. Log in as root. |
| 66 | |
| 67 | 2. Untar the ltp tarball into a spare directory. There is not a |
robbiew | fc0708b | 2004-03-01 22:16:02 +0000 | [diff] [blame] | 68 | standard location for it yet. We put it in our home directory |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 69 | while we're working on it. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 70 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 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. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 74 | |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 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. |
subrata_modak | dddeb90 | 2009-05-29 10:06:08 +0000 | [diff] [blame^] | 77 | See ltp-pan(1) for more information on the test driver we have provided. |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 78 | It is simple, but it can do a lot of stuff. |
robbiew | b6c5fe7 | 2001-09-18 20:44:30 +0000 | [diff] [blame] | 79 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 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. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 83 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 84 | 5. The disk i/o tests can be run by executing the diskio.sh script. In order |
robbiew | ba42204 | 2001-09-19 15:25:43 +0000 | [diff] [blame] | 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. |
nstraz | 0312c25 | 2000-09-26 20:59:21 +0000 | [diff] [blame] | 89 | |
robbiew | ba42204 | 2001-09-19 15:25:43 +0000 | [diff] [blame] | 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: |
| 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 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 100 | ii) Second, the server must be setup to allow the client to connect using |
subrata_modak | 08978d2 | 2008-12-18 04:58:57 +0000 | [diff] [blame] | 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 |
robbiew | ba42204 | 2001-09-19 15:25:43 +0000 | [diff] [blame] | 113 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 114 | iii) Next, certain services must be activated in order for certain tests to |
robbiew | ba42204 | 2001-09-19 15:25:43 +0000 | [diff] [blame] | 115 | execute. The following services are activated via inetd/xinetd: |
| 116 | rlogind |
| 117 | ftpd |
| 118 | telnetd |
| 119 | echo (stream) |
| 120 | fingerd |
| 121 | rshd |
subrata_modak | 08978d2 | 2008-12-18 04:58:57 +0000 | [diff] [blame] | 122 | Also, because certain RPC programs are tested, the "portmapper" daemon |
| 123 | MUST be started, as well as NFS server AND lock services. |
robbiew | ba42204 | 2001-09-19 15:25:43 +0000 | [diff] [blame] | 124 | |
robbiew | 0eea352 | 2004-02-05 17:33:10 +0000 | [diff] [blame] | 125 | iv) Finally, before running the networktests.sh script, two variables must |
subrata_modak | 08978d2 | 2008-12-18 04:58:57 +0000 | [diff] [blame] | 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. |
robbiew | ba42204 | 2001-09-19 15:25:43 +0000 | [diff] [blame] | 130 | |
| 131 | You can now successfully execute the networktests.sh script. |
subrata_modak | 08978d2 | 2008-12-18 04:58:57 +0000 | [diff] [blame] | 132 | 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 |
vapier | 36ab22f | 2009-01-19 03:37:35 +0000 | [diff] [blame] | 142 | |
| 143 | |
| 144 | Cross compiling |
| 145 | --------------- |
| 146 | |
| 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. |
| 149 | |
| 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" |
| 156 | |
| 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 |
| 165 | |
| 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. |
| 169 | |
| 170 | uClinux Users: make sure you add -DUCLINUX to your CFLAGS |
| 171 | |
| 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. |
| 176 | |
| 177 | Variables in Makefile |
| 178 | ---------------------- |
| 179 | |
| 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: |
| 182 | |
| 183 | CFLAGS - used when compiling/linking C code (no CPPFLAGS!) |
| 184 | |
| 185 | CXXFLAGS - used when compiling/linking C++ code (no CPPFLAGS!) |
| 186 | |
| 187 | CPPFLAGS - used when preprocessor is run (so C/C++ compiling an $(CPP) |
| 188 | checks) |
| 189 | |
| 190 | LDFLAGS - linker flags (no libraries) used when linking |
| 191 | |
| 192 | LDLIBS - libraries listed after objects during link |
| 193 | |
| 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. |
| 196 | |
| 197 | Currently the violation isn't critical. However, it should be fixed. |
| 198 | Patches are welcome. |