net: Remove rsh, rcp, rlogin tests
PATCH v3 1/2 net: Remove rsh, rcp, rlogin tests
as they've been replaced by ssh/scp long time ago.
As we still keep telnet test for testing basic network functionality we can safely drop these tests.
--- runtest/net.tcp_cmds | 3 - testcases/network/tcp_cmds/Makefile | 2 +- testcases/network/tcp_cmds/rcp/Makefile | 30 ---- testcases/network/tcp_cmds/rcp/rcp01.sh | 144 ------------------ testcases/network/tcp_cmds/rlogin/Makefile | 31 ---- testcases/network/tcp_cmds/rlogin/rlogin01.sh | 91 ----------- testcases/network/tcp_cmds/rsh/Makefile | 31 ---- testcases/network/tcp_cmds/rsh/rsh01.sh | 115 -------------- 8 files changed, 1 insertion(+), 446 deletions(-) delete mode 100644 testcases/network/tcp_cmds/rcp/Makefile delete mode 100755 testcases/network/tcp_cmds/rcp/rcp01.sh delete mode 100644 testcases/network/tcp_cmds/rlogin/Makefile delete mode 100755 testcases/network/tcp_cmds/rlogin/rlogin01.sh delete mode 100644 testcases/network/tcp_cmds/rsh/Makefile delete mode 100755 testcases/network/tcp_cmds/rsh/rsh01.sh
runtest/net.tcp_cmds +0 -3
@@ -11,9 +11,6 @@ host host01.sh netstat netstat01.sh ping01 ping01.sh ping02 ping02.sh -rcp rcp01.sh -rlogin rlogin01.sh -rsh rsh01.sh sendfile sendfile01.sh tcpdump tcpdump01.sh telnet telnet01.sh
testcases/network/tcp_cmds/Makefile +1 -1
@@ -26,7 +26,7 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk ifneq ($(WITH_EXPECT),yes) -FILTER_OUT_SUBDIRS := ftp rlogin ssh telnet +FILTER_OUT_SUBDIRS := ftp ssh telnet endif INSTALL_DEPS := ../datafiles/bin.sm
testcases/network/tcp_cmds/rcp/Makefile deleted +0 -30
@@ -1,30 +0,0 @@ -# -# network/tcp_cmds/rcp testcases Makefile. -# -# Copyright (C) 2009, Cisco Systems Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Ngie Cooper, September 2009 -# - -top_srcdir ?= ../../../.. - -include $(top_srcdir)/include/mk/testcases.mk -include $(abs_srcdir)/../Makefile.inc - -INSTALL_TARGETS := rcp01.sh - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/network/tcp_cmds/rcp/rcp01.sh deleted +0 -144
144 lines not on this page · raw message
testcases/network/tcp_cmds/rlogin/Makefile deleted +0 -31
@@ -1,31 +0,0 @@ -# -# network/tcp_cmds/rlogin testcases Makefile. -# -# Copyright (C) 2009, Cisco Systems Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Ngie Cooper, July 2009 -# - -top_srcdir ?= ../../../.. - -include $(top_srcdir)/include/mk/env_pre.mk - -INSTALL_TARGETS := rlogin01.sh - -MAKE_TARGETS := - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/network/tcp_cmds/rlogin/rlogin01.sh deleted +0 -91
91 lines not on this page · raw message
testcases/network/tcp_cmds/rsh/Makefile deleted +0 -31
@@ -1,31 +0,0 @@ -# -# network/tcp_cmds/rsh testcases Makefile. -# -# Copyright (C) 2009, Cisco Systems Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Ngie Cooper, July 2009 -# - -top_srcdir ?= ../../../.. - -include $(top_srcdir)/include/mk/env_pre.mk - -INSTALL_TARGETS := rsh01.sh - -MAKE_TARGETS := - -include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/network/tcp_cmds/rsh/rsh01.sh deleted +0 -115
115 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 2/2 net: Update network related docs
* testcases/network/README.md
- drop rlogin, rsh, rexec setup (removed in previous commit "net: Remove rsh, rcp, rlogin tests")
- rewrite server side configuration (most of the services are started thus not needed to be running, improve ftp & telnet setup; add HTTP, NFS and TI-RPC / Sun RPC (glibc) setup)
- remove suggestion to run tests for 24 hrs (we lowered values in the variables for stress testing in 52857efb7)
- mention testcases/network/stress/README
- update package names
- fix formatting
* INSTALL
- move everything relevant to testcases/network/README.md (rpcbind).
- drop xinetd setup (only in.telnetd is tested nowadays and does not have to be running, just installed)
- drop /etc/securetty section (rlogin, rsh, rexec aren't used any more and ssh access IMHO does not require pts/[0-9])
--- INSTALL | 49 +--------------- testcases/network/README.md | 113 +++++++++++++++++------------------- 2 files changed, 54 insertions(+), 108 deletions(-)
INSTALL +1 -48
@@ -151,54 +151,7 @@ contributions are welcome. in the CD-ROM drive. The corresponding tests will fail if either disk is missing. -5. The network tests are executed by running the network.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 - (rpcbind, or portmap on old distributions) MUST be started, as well as NFS - server AND lock services. - - iv) Finally, before running the network.sh script, two variables must be - set: 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.sh and ftp01.sh. - - You can now successfully execute the network.sh script. - - You can run the test category which you are interested in, -h option shows - the list of the test category: - # ./network.sh -h - - For more info about howto run network.sh see testcases/network/README.md. +5. The network tests related installation see testcases/network/README.md. Cross compiling ---------------
testcases/network/README.md +53 -60
147 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v3 2/2 net: Update network related docs
Quoted 142 lines · Petr Vorel
*
testcases/network/README.md
- drop rlogin, rsh, rexec setup (removed in previous commit "net: Remove rsh, rcp, rlogin tests")
- rewrite server side configuration (most of the services are started thus not needed to be running, improve ftp & telnet setup; add HTTP, NFS and TI-RPC / Sun RPC (glibc) setup)
- remove suggestion to run tests for 24 hrs (we lowered values in the variables for stress testing in52857efb7)
- mention testcases/network/stress/README
- update package names
- fix formatting* INSTALL
- move everything relevant totestcases/network/README.md(rpcbind).
- drop xinetd setup (only in.telnetd is tested nowadays and does not have to be running, just installed)
- drop/etc/securettysection (rlogin, rsh, rexec aren't used any more and ssh access IMHO does not require pts/[0-9])Signed-off-by Petr Vorel <[email protected]>--- INSTALL | 49 +--------------- testcases/network/README.md | 113 +++++++++++++++++------------------- 2 files changed, 54 insertions(+), 108 deletions(-)INSTALL +1
-48@@ -151,54 +151,7 @@ contributions are welcome. in the CD-ROM drive. The corresponding tests will fail if either disk is missing. -5. The network tests are executed by running the network.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 - (rpcbind, or portmap on old distributions) MUST be started, as well as NFS - server AND lock services. - - iv) Finally, before running the network.sh script, two variables must be - set: 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.sh and ftp01.sh. - - You can now successfully execute the network.sh script. - - You can run the test category which you are interested in, -h option shows - the list of the test category: - # ./network.sh -h - - For more info about howto run network.sh see testcases/network/README.md. +5. The network tests related installation see testcases/network/README.md. Cross compiling ---------------testcases/network/README.md +16
-24@@ -1,94 +1,87 @@ # LTP Network Tests -## Pre-requisites -Enable all the networking services on test machine(s): rshd, nfsd, fingerd. - -Both single and two host configurations support debugging via -`TST_NET_RHOST_RUN_DEBUG=1` environment variable. - ## Single Host Configuration -It is a default configuration ('RHOST' is not defined). LTP adds 'ltp_ns' -network namespace and auto-configure 'veth' pair according to LTP network -environment variables. +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. ## Two Host Configuration -This setup requires 'RHOST' environment variable to be set properly and -configured SSH or RSH (default) access to a remote host. +This setup requires the `RHOST` environment variable to be set properly and +configured SSH access to a remote host. -The 'RHOST' variable name must be set to the hostname of the server -(test management link) and PASSWD should be set to the root password -of the remote server. +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. -In order to have RSH access: -* Edit the "/root/.rhosts" file. Please note that the file may not exist, -so you must create one if it does not. You must add the fully qualified -hostname of the machine you are testing on to this file. By adding the test -machine's hostname to this file, you will be allowing the machine to rsh to itself, -as root, without the requirement of a password. +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`). -```sh -echo $client_hostname >> /root/.rhosts -``` +Some of the network stress tests which hasn't been ported to network API were +designed to be tested with `rsh` via `LTP_RSH` environment variable. Now it's +by default used `ssh`, for details see `testcases/network/stress/README`. -You may need to re-label '.rhost' file to make sure rlogind will have access to it: +## Server Services Configuration +Tests have various external dependencies, exit with `TCONF` when not installed. +Some tests require additional setup.
testcases/network/README.md line 34
Quoted 10 lines
testcases/network/README.md +5
-4-```sh -/sbin/restorecon -v /root/.rhosts -``` +### FTP and telnet setup +FTP stress tests and telnet server tests require environment variables `RHOST` +(remote machine), `RUSER` (remote user) and `PASSWD` (remote password). NOTE: +`RHOST` will imply two host configuration for other tests. -* Add rlogin, rsh, rexec into /etc/securetty file: +If `RHOST` is set to `root`, either of these steps is required:
^
RUSER?Quoted 15 lines
testcases/network/README.md +9
-3-```sh -for i in rlogin rsh rexec; do echo $i >> /etc/securetty; done +* In `/etc/ftpusers` (or `/etc/vsftpd.ftpusers`), comment the line containing +"root" string. This file lists all those users who are not given access to do ftp +on the current system. + +* If you don?t want to do the previous step, put following entry into `/root/.netrc`: +``` +machine <remote_server_name> +login root +password <remote_root_password> ``` -## Server Services Configuration
testcases/network/README.md line 51
Quoted 10 lines
testcases/network/README.md +4
-5-Verify that the below daemon services are running. If not, please install -and start them: -rsh-server, telnet-server, finger-server, rdist, rsync, dhcp-server, http-server. +### HTTP setup +HTTP stress tests require configured and running web server (Apache2, Nginx, etc.). -Note: If any of the above daemon is not running on server, the test related to -that service running from client will fail. +### NFS setup +NFS tests require running NFS server must be running, enable and start `nfs-server.service`
"must be running" is redundant
Quoted 51 lines
testcases/network/README.md +14
-21+(Debian/Ubuntu and openSUSE/SLES: `nfs-kernel-server` package, others `nfs-server` package). -### FTP setup -* In ?/etc/ftpusers? [or vi /etc/vsftpd.ftpusers], comment the line containing -?root? string. This file lists all those users who are not given access to do ftp -on the current system. +There is no detection whether service is running, test will simply fail without warning. -* If you don?t want to do the previous step, put following entry into /root/.netrc -machine <remote_server_name> login root password <remote_root_password>. -Otherwise, ftp,rlogin & telnet fails for ?root? user & hence needs to be -executed using ?test? user to get successful results. +### TI-RPC / Sun RPC setup +TI-RPC (or glibc legacy Sun RPC) tests require running rpcbind (or portmap on +old distributions), enable and start `rpcbind.service`. ## LTP setup -Install LTP testsuite. In case of two hosts configuration, make sure LTP is installed -on both client and server machines. +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. -Testcases and network tools must be in PATH, e.g.: +Example for the default prefix `/opt/ltp`: ```sh -export PATH=/opt/ltp/testcases/bin:/usr/bin:$PATH +export LTPROOT="/opt/ltp"; export PATH="$LTPROOT/testcases/bin:$PATH" ``` -Default values for all LTP network variables are set in testcases/lib/tst_net.sh. -If you need to override some parameters please export them before test run or -specify them when running ltp-pan or testscripts/network.sh. ## Running the tests -To run the test type the following: +The network tests are executed by running the network.sh script: ```sh TEST_VARS ./network.sh OPTIONS ``` Where -* TEST_VARS - non-default network parameters (see testcases/lib/tst_net.sh), they - could be exported before test run; -* OPTIONS - test group(s), use '-h' to see available ones. +* `TEST_VARS` - non-default network parameters +* `OPTIONS` - test group(s), use `-h` to see available ones. -## Analyzing the results -Generally this test must be run more than 24 hours. When you want to stop the test
testcases/network/README.md
Quoted 10 lines
testcases/network/README.md +5
-3-press CTRL+C to stop ./network.sh. +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`. -Search failed tests in LTP logfile using grep FAIL <logfile>. For any failures, -run the individual tests and then try to come to the conclusion. +## Debugging +Both single and two host configurations support debugging via +`TST_NET_RHOST_RUN_DEBUG=1` environment variable.
Apart from the minor typos mentioned above, both patches look fine.
PATCH v3 2/2 net: Update network related docs
Hi Alexey, Xiao,
Quoted 1 line
Apart from the minor typos mentioned above, both patches look fine.
Thanks for review and catching those. Merged.
Kind regards,
Petr