* [LTP] [PATCH 1/4] network: Remove host01.sh
2024-02-08 8:59 [LTP] [PATCH 0/4] Remove obsolete network userspace tests Petr Vorel
@ 2024-02-08 8:59 ` Petr Vorel
2024-02-26 15:09 ` [LTP] [Automated-testing] " Cyril Hrubis
2024-02-08 8:59 ` [LTP] [PATCH 2/4] network: remove xinetd_tests.sh Petr Vorel
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2024-02-08 8:59 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
Testing old host functionality requires proper DNS setup.
That would be quite complicated setup and result would be to test
bind project userspace tool instead of kernel internals.
Testing remote host e.g. host example.org would require SUT having
internet connection.
Testing hostnamectl would make more sense nowadays, therefore remove
the test.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
runtest/net.tcp_cmds | 1 -
testcases/network/tcp_cmds/host/Makefile | 11 --------
testcases/network/tcp_cmds/host/host01.sh | 34 -----------------------
3 files changed, 46 deletions(-)
delete mode 100644 testcases/network/tcp_cmds/host/Makefile
delete mode 100755 testcases/network/tcp_cmds/host/host01.sh
diff --git a/runtest/net.tcp_cmds b/runtest/net.tcp_cmds
index 7e142de11..c63223763 100644
--- a/runtest/net.tcp_cmds
+++ b/runtest/net.tcp_cmds
@@ -7,7 +7,6 @@ ipneigh01_ip ipneigh01.sh -c ip
arping01 arping01.sh
clockdiff01 clockdiff01.sh
ftp ftp01.sh
-host host01.sh
netstat netstat01.sh
ping01 ping01.sh
ping02 ping02.sh
diff --git a/testcases/network/tcp_cmds/host/Makefile b/testcases/network/tcp_cmds/host/Makefile
deleted file mode 100644
index 453951e0d..000000000
--- a/testcases/network/tcp_cmds/host/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (C) 2009, Cisco Systems Inc.
-# Ngie Cooper, July 2009
-
-top_srcdir ?= ../../../..
-
-include $(top_srcdir)/include/mk/env_pre.mk
-
-INSTALL_TARGETS := host01.sh
-
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/tcp_cmds/host/host01.sh b/testcases/network/tcp_cmds/host/host01.sh
deleted file mode 100755
index 9ed44bae3..000000000
--- a/testcases/network/tcp_cmds/host/host01.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
-# Copyright (c) Köry Maincent <kory.maincent@bootlin.com> 2020
-# Copyright (c) Manoj Iyer <manjo@mail.utexas.edu> 2003
-# Copyright (c) Robbie Williamson <robbiew@us.ibm.com> 2001
-# Copyright (c) International Business Machines Corp., 2000
-
-TST_TESTFUNC="do_test"
-TST_NEEDS_CMDS="awk grep host hostname tail"
-
-
-do_test()
-{
- local lhost="${HOSTNAME:-$(hostname)}"
- local addr
-
- tst_res TINFO "test basic functionality of the host command"
- tst_res TINFO "lhost: $lhost"
-
- if addr=$(host $lhost); then
- addr=$(echo "$addr" | grep address | tail -1 | awk '{print $NF}')
- if [ -z "$addr" ]; then
- tst_res TFAIL "empty address"
- return
- fi
- EXPECT_PASS host $addr \>/dev/null
- else
- tst_res TFAIL "host $lhost on local machine failed"
- fi
-}
-
-. tst_net.sh
-tst_run
--
2.43.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread* [LTP] [PATCH 2/4] network: remove xinetd_tests.sh
2024-02-08 8:59 [LTP] [PATCH 0/4] Remove obsolete network userspace tests Petr Vorel
2024-02-08 8:59 ` [LTP] [PATCH 1/4] network: Remove host01.sh Petr Vorel
@ 2024-02-08 8:59 ` Petr Vorel
2024-02-26 15:17 ` [LTP] [Automated-testing] " Cyril Hrubis
2024-02-08 8:59 ` [LTP] [PATCH 3/4] network: Remove telnet01.sh test Petr Vorel
2024-02-08 8:59 ` [LTP] [PATCH 4/4] network: Remove clockdiff01.sh test Petr Vorel
3 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2024-02-08 8:59 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
xinetd is nowadays replaced with systemd socket activation.
Therefore remove the test.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
runtest/net.tcp_cmds | 1 -
testcases/network/xinetd/Makefile | 11 ---
testcases/network/xinetd/xinetd_tests.sh | 113 -----------------------
3 files changed, 125 deletions(-)
delete mode 100644 testcases/network/xinetd/Makefile
delete mode 100755 testcases/network/xinetd/xinetd_tests.sh
diff --git a/runtest/net.tcp_cmds b/runtest/net.tcp_cmds
index c63223763..83f7c5b78 100644
--- a/runtest/net.tcp_cmds
+++ b/runtest/net.tcp_cmds
@@ -21,4 +21,3 @@ dnsmasq dnsmasq_tests.sh
iproute ip_tests.sh
tracepath01 tracepath01.sh
traceroute01 traceroute01.sh
-xinetd xinetd_tests.sh
diff --git a/testcases/network/xinetd/Makefile b/testcases/network/xinetd/Makefile
deleted file mode 100644
index b789b2a3a..000000000
--- a/testcases/network/xinetd/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (C) 2009, Cisco Systems Inc.
-# Ngie Cooper, July 2009
-
-top_srcdir ?= ../../..
-
-include $(top_srcdir)/include/mk/env_pre.mk
-
-INSTALL_TARGETS := xinetd_tests.sh
-
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/xinetd/xinetd_tests.sh b/testcases/network/xinetd/xinetd_tests.sh
deleted file mode 100755
index 25ec91d26..000000000
--- a/testcases/network/xinetd/xinetd_tests.sh
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
-# Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved.
-# Copyright (c) International Business Machines Corp., 2001
-
-TST_SETUP="setup"
-TST_CLEANUP="cleanup"
-TST_NEEDS_CMDS="diff telnet in.telnetd xinetd"
-TST_NEEDS_TMPDIR=1
-TST_TESTFUNC="do_test"
-TST_CNT=2
-
-. daemonlib.sh
-
-setup()
-{
- [ -f "/usr/lib/systemd/system/telnet.socket" ] && \
- tst_brk TCONF "xinetd doesn't manage telnet"
-
- check_addr="127.0.0.1"
- ip a | grep -q inet6 && check_addr="$check_addr ::1"
-
- cat > tst_xinetd.conf.1 <<-EOF
-defaults
-{
- instances = 25
- log_type = FILE /var/log/servicelog
- log_on_success = HOST PID
- log_on_failure = HOST
- disabled = telnet
-}
-EOF
-
- cat > tst_xinetd.conf.2 <<-EOF
-defaults
-{
- instances = 25
- log_type = FILE /var/log/servicelog
- log_on_success = HOST PID
- log_on_failure = HOST
- # disabled = telnet
-}
-
-service telnet
-{
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- server = /usr/sbin/in.telnetd
- server_args = -n
- no_access =
- flags = IPv6
-}
-EOF
- ROD mv /etc/xinetd.conf xinetd.conf.orig
-}
-
-cleanup()
-{
- [ -f xinetd.conf.orig ] && \
- mv xinetd.conf.orig /etc/xinetd.conf
-
- restart_daemon xinetd
-}
-
-restart_xinetd()
-{
- tst_res TINFO "restart xinetd"
- restart_daemon xinetd > tst_xinetd.out 2>&1
- if [ $? -ne 0 ]; then
- cat tst_xinetd.out
- tst_brk TBROK "unable to restart service with telnet disabled"
- fi
-
- grep -qi "fail" tst_xinetd.out && \
- tst_brk TBROK "xinetd failed to restart"
-}
-
-xinetd_test()
-{
- local cnt=$1
- local desc="$2"
- local pattern="$3"
- local a p
-
- tst_res TINFO "install the new config file with telnet $desc"
- ROD mv tst_xinetd.conf.$cnt /etc/xinetd.conf
- restart_xinetd
-
- for a in $check_addr; do
- p=$(echo $pattern | sed "s/ADDR/$a/")
- if ! echo '\x04' | telnet $a 2>&1 | grep -qiE "$p"; then
- tst_res TFAIL "not expected output for 'telnet $a'"
- return
- fi
- done
- tst_res TPASS "expected output with telnet $desc"
-}
-
-do_test()
-{
- case $1 in
- 1) xinetd_test $1 "disabled" \
- "telnet: (connect to address ADDR|Unable to connect to remote host): Connection refused";;
- 2) xinetd_test $1 "enabled" \
- "Connection closed by foreign host";;
- esac
-}
-
-. tst_net.sh
-tst_run
--
2.43.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread* [LTP] [PATCH 3/4] network: Remove telnet01.sh test
2024-02-08 8:59 [LTP] [PATCH 0/4] Remove obsolete network userspace tests Petr Vorel
2024-02-08 8:59 ` [LTP] [PATCH 1/4] network: Remove host01.sh Petr Vorel
2024-02-08 8:59 ` [LTP] [PATCH 2/4] network: remove xinetd_tests.sh Petr Vorel
@ 2024-02-08 8:59 ` Petr Vorel
2024-02-26 15:18 ` [LTP] [Automated-testing] " Cyril Hrubis
2024-02-08 8:59 ` [LTP] [PATCH 4/4] network: Remove clockdiff01.sh test Petr Vorel
3 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2024-02-08 8:59 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread* [LTP] [PATCH 4/4] network: Remove clockdiff01.sh test
2024-02-08 8:59 [LTP] [PATCH 0/4] Remove obsolete network userspace tests Petr Vorel
` (2 preceding siblings ...)
2024-02-08 8:59 ` [LTP] [PATCH 3/4] network: Remove telnet01.sh test Petr Vorel
@ 2024-02-08 8:59 ` Petr Vorel
2024-02-26 15:27 ` [LTP] [Automated-testing] " Cyril Hrubis
3 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2024-02-08 8:59 UTC (permalink / raw)
To: ltp; +Cc: automated-testing
clockdiff is not much relevant nowadays, thus remove it.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
runtest/net.tcp_cmds | 1 -
testcases/network/tcp_cmds/clockdiff/Makefile | 10 -------
.../network/tcp_cmds/clockdiff/clockdiff01.sh | 30 -------------------
3 files changed, 41 deletions(-)
delete mode 100644 testcases/network/tcp_cmds/clockdiff/Makefile
delete mode 100755 testcases/network/tcp_cmds/clockdiff/clockdiff01.sh
diff --git a/runtest/net.tcp_cmds b/runtest/net.tcp_cmds
index d6ba49e07..248c7371d 100644
--- a/runtest/net.tcp_cmds
+++ b/runtest/net.tcp_cmds
@@ -5,7 +5,6 @@
ipneigh01_arp ipneigh01.sh -c arp
ipneigh01_ip ipneigh01.sh -c ip
arping01 arping01.sh
-clockdiff01 clockdiff01.sh
ftp ftp01.sh
netstat netstat01.sh
ping01 ping01.sh
diff --git a/testcases/network/tcp_cmds/clockdiff/Makefile b/testcases/network/tcp_cmds/clockdiff/Makefile
deleted file mode 100644
index d2e72519a..000000000
--- a/testcases/network/tcp_cmds/clockdiff/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) 2016-2019 Oracle and/or its affiliates. All Rights Reserved.
-
-top_srcdir ?= ../../../..
-
-include $(top_srcdir)/include/mk/env_pre.mk
-
-INSTALL_TARGETS := clockdiff01.sh
-
-include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/network/tcp_cmds/clockdiff/clockdiff01.sh b/testcases/network/tcp_cmds/clockdiff/clockdiff01.sh
deleted file mode 100755
index 4058fbe11..000000000
--- a/testcases/network/tcp_cmds/clockdiff/clockdiff01.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (c) 2016-2019 Oracle and/or its affiliates. All Rights Reserved.
-# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
-
-TST_TESTFUNC="do_test"
-TST_NEEDS_ROOT=1
-TST_NEEDS_CMDS="cut clockdiff"
-
-
-do_test()
-{
- tst_res TINFO "check time delta for $(tst_ipaddr)"
-
- local output=$(clockdiff $(tst_ipaddr))
-
- if [ $? -ne 0 ]; then
- tst_res TFAIL "clockdiff failed to get delta"
- else
- delta=$(echo "$output" | cut -d' ' -f2,3)
- if [ "$delta" = "0 0" ]; then
- tst_res TPASS "delta is 0 as expected"
- else
- tst_res TFAIL "not expected data received: '$output'"
- fi
- fi
-}
-
-. tst_net.sh
-tst_run
--
2.43.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 9+ messages in thread