• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# LTP Network Tests
2
3## Pre-requisites
4Enable all the networking services on test machine(s): rshd, nfsd, fingerd.
5
6## Single Host Configuration
7
8It is a default configuration ('RHOST' is not defined). LTP adds 'ltp_ns'
9network namespace and auto-configure 'veth' pair according to LTP network
10environment variables.
11
12## Two Host Configuration
13
14This setup requires 'RHOST' environment variable to be set properly and
15configured SSH or RSH (default) access to a remote host.
16
17The 'RHOST' variable name must be set to the hostname of the server
18(test management link) and PASSWD should be set to the root password
19of the remote server.
20
21In order to have RSH access:
22* Edit the "/root/.rhosts" file. Please note that the file may not exist,
23so you must create one if it does not. You must add the fully qualified
24hostname of the machine you are testing on to this file. By adding the test
25machine's hostname to this file, you will be allowing the machine to rsh to itself,
26as root, without the requirement of a password.
27
28```sh
29echo $client_hostname >> /root/.rhosts
30```
31
32You may need to re-label '.rhost' file to make sure rlogind will have access to it:
33
34```sh
35/sbin/restorecon -v /root/.rhosts
36```
37
38* Add rlogin, rsh, rexec into /etc/securetty file:
39
40```sh
41for i in rlogin rsh rexec; do echo $i >> /etc/securetty; done
42```
43
44## Server Services Configuration
45Verify that the below daemon services are running. If not, please install
46and start them:
47rsh-server, telnet-server, finger-server, rdist, rsync, dhcp-server, http-server.
48
49Note: If any of the above daemon is not running on server, the test related to
50that service running from client will fail.
51
52### FTP setup
53* In “/etc/ftpusers” [or vi /etc/vsftpd.ftpusers], comment the line containing
54“root” string. This file lists all those users who are not given access to do ftp
55on the current system.
56
57* If you don’t want to do the previous step, put following entry into /root/.netrc
58machine <remote_server_name> login root password <remote_root_password>.
59Otherwise, ftp,rlogin & telnet fails for ‘root’ user & hence needs to be
60executed using ‘test’ user to get successful results.
61
62## LTP setup
63Install LTP testsuite. In case of two hosts configuration, make sure LTP is installed
64on both client and server machines.
65
66Testcases and network tools must be in PATH, e.g.:
67
68```sh
69export PATH=/opt/ltp/testcases/bin:/usr/bin:$PATH
70```
71Default values for all LTP network variables are set in testcases/lib/tst_net.sh.
72If you need to override some parameters please export them before test run or
73specify them when running ltp-pan or testscripts/network.sh.
74
75## Running the tests
76To run the test type the following:
77
78```sh
79TEST_VARS ./network.sh OPTIONS
80```
81Where
82* TEST_VARS - non-default network parameters (see testcases/lib/tst_net.sh), they
83  could be exported before test run;
84* OPTIONS - test group(s), use '-h' to see available ones.
85
86## Analyzing the results
87Generally this test must be run more than 24 hours. When you want to stop the test
88press CTRL+C to stop ./network.sh.
89
90Search failed tests in LTP logfile using grep FAIL <logfile>. For any failures,
91run the individual tests and then try to come to the conclusion.
92