[LTP] [PATCH 3/4] network: Remove telnet01.sh test

Petr Vorel pvorel@suse.cz
Thu Feb 8 09:59:29 CET 2024


login via telnet has been obsolete for ages. Testing it nowadays does
not make sense, remove it.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 runtest/net.tcp_cmds                          |  1 -
 testcases/network/tcp_cmds/telnet/Makefile    | 29 ------
 testcases/network/tcp_cmds/telnet/telnet01.sh | 96 -------------------
 3 files changed, 126 deletions(-)
 delete mode 100644 testcases/network/tcp_cmds/telnet/Makefile
 delete mode 100755 testcases/network/tcp_cmds/telnet/telnet01.sh

diff --git a/runtest/net.tcp_cmds b/runtest/net.tcp_cmds
index 83f7c5b78..d6ba49e07 100644
--- a/runtest/net.tcp_cmds
+++ b/runtest/net.tcp_cmds
@@ -13,7 +13,6 @@ ping02 ping02.sh
 sendfile sendfile01.sh
 tc01 tc01.sh
 tcpdump tcpdump01.sh
-telnet telnet01.sh
 iptables iptables01.sh
 nft nft01.sh
 dhcpd dhcpd_tests.sh
diff --git a/testcases/network/tcp_cmds/telnet/Makefile b/testcases/network/tcp_cmds/telnet/Makefile
deleted file mode 100644
index 90e879de2..000000000
--- a/testcases/network/tcp_cmds/telnet/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#    network/tcp_cmds/telnet 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		:= telnet01.sh
-
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/tcp_cmds/telnet/telnet01.sh b/testcases/network/tcp_cmds/telnet/telnet01.sh
deleted file mode 100755
index 93343b995..000000000
--- a/testcases/network/tcp_cmds/telnet/telnet01.sh
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/bin/sh
-#   Copyright (c) International Business Machines  Corp., 2000
-#
-#   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
-#
-#    03/01 Robbie Williamson (robbiew@us.ibm.com)
-
-TCID="telnet01"
-TST_TOTAL=1
-
-TST_USE_LEGACY_API=1
-
-setup()
-{
-	tst_require_cmds telnet expect
-
-	if [ -z $RUSER ]; then
-		RUSER=root
-	fi
-
-	if [ -z $PASSWD ]; then
-		tst_brkm TCONF "Please set PASSWD for $RUSER."
-	fi
-
-	if [ -z $RHOST ]; then
-		tst_brkm TCONF "Please set RHOST."
-	fi
-
-	if [ -z $LOOPCOUNT ]; then
-		LOOPCOUNT=25
-	fi
-}
-
-do_test()
-{
-	tst_resm TINFO "Starting"
-
-	for i in $(seq 1 ${LOOPCOUNT})
-	do
-		telnet_test || return 1
-	done
-}
-
-telnet_test()
-{
-	tst_resm TINFO "login with telnet($i/$LOOPCOUNT)"
-
-	expect -c "
-		spawn telnet $RHOST
-
-		expect -re \"login:\"
-		send \"$RUSER\r\"
-
-		expect -re \"Password:\"
-		send \"$PASSWD\r\"
-
-		expect {
-			\"incorrect\" {
-				exit 1
-			} \"$RUSER@\" {
-				send \"LC_ALL=C ls -l /etc/hosts | \\
-				       wc -w > $RUSER.$RHOST\rexit\r\";
-				exp_continue}
-		}
-
-	" > /dev/null || return 1
-
-	tst_resm TINFO "checking telnet status($i/$LOOPCOUNT)"
-	tst_rhost_run -u $RUSER -c "grep -q 9 $RUSER.$RHOST" || return 1
-	tst_rhost_run -u $RUSER -c "rm -f $RUSER.$RHOST"
-}
-
-. tst_net.sh
-
-setup
-
-do_test
-if [ $? -ne 0 ]; then
-	tst_resm TFAIL "Test $TCID failed."
-else
-	tst_resm TPASS "Test $TCID succeeded."
-fi
-
-tst_exit
-- 
2.43.0



More information about the ltp mailing list