blob: 83f156634b418aeb5dc2e85220067af5335b849b [file] [log] [blame]
$Id: INSTALL,v 1.25 2009/08/28 05:33:40 subrata_modak Exp $
About configuration
-------------------
If you want to use auto configuration, be sure autoconf-2.61 & automake-1.10 are installed.
(Latest automake sources can be downloaded from:
ftp://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.gz,
Latest autoconf sources can be downloaded from:
ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz,
ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2,
Autoconf also requires certain higher version(s) of m4, which can be found from:
http://ftp.gnu.org/gnu/m4/,
http://ftp.gnu.org/gnu/m4/m4-1.4.12.tar.bz2).
Then run:
$ make autotools
$ ./configure
$ make all
$ make install
If you get a build error, please report it to ltp-list@lists.sf.net with
following information,
1. the error output of build tools(make, gcc, etc...)
2. the output of ./configure
3. include/config.h
4. config.mk
5. config.log
If you want to use default configuration, autoconf is not needed. Just run:
$ touch include/config.h.default
$ make config.h
$ make all
If make all is failed even if you use the auto configuration, please, report it to
ltp developers with config.log, generated by running the configure script.
Quick Start
-----------
1> tar xzf ltp-XXXXXXXX.tar.gz
2> cd ltp
3> make
4> make install
5> ./runalltests.sh
*NOTE: The LTP assumes the existence of the nobody, bin, and daemon users and
their groups. If these IDs do not exist, certain tests will fail. The users
and groups IDs should be the same, i.e. if user "nobody" is 99, then it's
group should also be "99". The names of the groups are irrelevant.
Detailed Installation
---------------------
Beyond the "Quick Start" instructions, there are only a few other things
that should be done. The Linux Test Project build process uses a
minimalist approach. There is a lot of room for improvement and
contributions are welcome.
1. Log in as root.
2. Untar the ltp tarball into a spare directory. There is not a
standard location for it yet. We put it in our home directory
while we're working on it.
Note that the full path to this location must be accessible for
unprivileged users, as some tests are run as a different user than root.
Hence /root is not a good choice on several distributions.
3. Run "make" to build everything.
*NOTE: Some of the Makefiles (example: pan/Makefile) require the lex (or
flex) package to be installed.
4. You can run all of the tests sequentially by using the example test
script runalltests.sh. The script is there just to get you started.
See ltp-pan(1) for more information on the test driver we have provided.
It is simple, but it can do a lot of stuff.
NOTE: The diskio and network tests will NOT be run by the runalltests.sh
script. We chose to separate these tests because of their required setup
overhead.
5. The disk i/o tests can be run by executing the diskio.sh script. In order
for these tests to successfully operate a writable high-density 3.5" floppy
must be in the disk drive and a CD-ROM with more than 100Mb of data must be
in the CD-ROM drive. The corresponding tests will fail if either disk is
missing.
6. The network tests are executed by running the networktests.sh script. The
network tests require some configuration for them to work correctly:
i) First, there MUST be another test machine setup to act as the server
to these client side tests. This machine MUST have the LTP installed
in the same exact location, i.e. if the client has /root/ltp, then the
server must have /root/ltp. This is required because certain tests
expect to find server files in certain locations. Make sure to compile
the LTP on this server machine also.
ii) Second, the server must be setup to allow the client to connect using
the "r" commands, such as rsh. This is done by simply creating/editing
the ".rhosts" file under /root. Place the hostname of the client
machine in this file to allow root to remotely connect without the use
of a password. If server has the PAM system security tool, you need
to add the following lines to /etc/securetty:
rlogin
rsh
rexec
pts/0
pts/1
:
pts/9
iii) Next, certain services must be activated in order for certain tests to
execute. The following services are activated via inetd/xinetd:
rlogind
ftpd
telnetd
echo (stream)
fingerd
rshd
Also, because certain RPC programs are tested, the "portmapper" daemon
MUST be started, as well as NFS server AND lock services.
iv) Finally, before running the networktests.sh script, two variables must
be set within the script file. The "RHOST" variable should be set to
the hostname of the server. The "PASSWD" variable should be set to
root's password on the server machine. This is necessary for tests
such as telnet01 and ftp01.
You can now successfully execute the networktests.sh script.
When you would like to run the whole network tests, specify -w option:
# ./networktests.sh -w
When you would like to run the same tests which networktests.sh ran till
2008, specify no option or -d option:
# ./networktests.sh
You can run the test category which you are interested in, -h option shows
the list of the test category:
# ./netwoktests.sh -h
Cross compiling
---------------
To cross compile, override one or more of CC, AR, CROSS_CFLAGS,
LOADLIBES, LDFLAGS, & LIB_DIR and be sure to always build from the top level.
To override them from the make commandline, do something like this:
$ CROSS_COMPILER=/opt/cegl-1.4/hardhat/devkit/ppc/405/bin/powerpc-linux-
$ make \
CROSS_CFLAGS="-mcpu=403 -D__PPC405__" \
LDFLAGS=-static \
LOADLIBES="-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc"
Alternately, to override them by editing this file, uncomment the
following lines:
CROSS_COMPILER=/opt/ppc64/powerpc64-linux/bin/powerpc64-linux-
CROSS_CFLAGS= -mpowerpc64
LDFLAGS=-static
LOADLIBES=-lpthread -lc -lresolv -lnss_dns -lnss_files -lm -lc
LIB_DIR=/lib64
export LOADLIBES LIB_DIR
Or, you can save all your settings into the local 'config.mk' file.
The defaults will not be usable in that case; you will need to
override things explicitly.
uClinux Users: make sure you add -DUCLINUX to your CFLAGS
Note: If you override a variable from the commandline all
assignments to it in the Makefiles will be ignored. To set it both
in the commandline and in the Makefiles use a dummy variable like in
CFLAGS.
Variables in Makefile
----------------------
The conventions enforced are the standard ones. LTP isnt redefining any
of the flags from their normal meaning. here's a quick summary:
CFLAGS - used when compiling/linking C code (no CPPFLAGS!)
CXXFLAGS - used when compiling/linking C++ code (no CPPFLAGS!)
CPPFLAGS - used when preprocessor is run (so C/C++ compiling an $(CPP)
checks)
LDFLAGS - linker flags (no libraries) used when linking
LDLIBS - libraries listed after objects during link
Above list is ideal: Many codes in LTP violates above list especially
about CPPFLAGS. e.g. -I and -D are passed to CFLAGS.
Currently the violation isn't critical. However, it should be fixed.
Patches are welcome.