It's the default configuration (if the RHOST environment variable is not
defined). LTP adds ltp_ns network namespace and auto-configure veth pair
according to LTP network environment variables.
This setup requires the RHOST environment variable to be set properly and
configured SSH access to a remote host.
The RHOST variable must be set to the hostname of the server (test management
link) and public key setup or login without password is required.
SSH server needs to be configured to allow root login and use Public Key
Authentication (PermitRootLogin yes and PubkeyAuthentication yes in
/etc/ssh/sshd_config).
Tests have various external dependencies, exit with TCONF when not installed.
Some tests require additional setup.
FTP stress tests require vsftpd. It will be started with with enabled anonymous logins, stopped after testing.
HTTP stress tests require configured and running web server (Apache2, Nginx, etc.).
NFS tests require running NFS server, enable and start nfs-server.service
(Debian/Ubuntu and openSUSE/SLES: nfs-kernel-server package, others:
nfs-server package).
There is no detection whether service is running, test will simply fail without warning.
TI-RPC (or glibc legacy Sun RPC) tests require running rpcbind (or portmap on
old distributions), enable and start rpcbind.service.
Install LTP testsuite (see INSTALL). In case of two hosts configuration, LTP
needs to be installed the same exact location and LTPROOT and PATH
environment variables set on both client and server machines. This is
required because some tests expect to find server files in certain locations.
Example for the default prefix /opt/ltp:
export LTPROOT="/opt/ltp"; export PATH="$LTPROOT/testcases/bin:$PATH"To run the network testcases, use the official LTP executor kirk: https://github.com/linux-test-project/kirk.
To pass environment variables use --env with list of key=value separated by :
kirk --run-suite net.features \
--env 'VIRT_PERF_THRESHOLD=180:LTP_NET_FEATURES_IGNORE_PERFORMANCE_FAILURE=1'Default values for all LTP network parameters are set in testcases/lib/tst_net.sh.
Network stress parameters are documented in testcases/network/stress/README.
Tests which use tst_netload_compare() test also performance. They can fail on
overloaded SUT. To ignore performance failure and test only the network functionality,
set LTP_NET_FEATURES_IGNORE_PERFORMANCE_FAILURE=1 environment variable.
Some network tests which use tst_ping() function require ping with -I support,
which is not supported by ping from inetutils.
Use ping from iputils or from BusyBox
(configured with CONFIG_FEATURE_IPV6=y CONFIG_FEATURE_FANCY_PING=y).
Both single and two host configurations support debugging via
TST_NET_RHOST_RUN_DEBUG=1 environment variable.