[LTP] [PATCH 1/4] network: Remove host01.sh

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


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



More information about the ltp mailing list