All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Gao via ltp <ltp@lists.linux.it>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tcp_cmds: Remove ftp01.sh test, binary data files
Date: Sun, 3 Nov 2024 20:57:31 -0500	[thread overview]
Message-ID: <ZygqC8ekLwXy0CSi@wegao> (raw)
In-Reply-To: <20241101165354.1296773-1-pvorel@suse.cz>

On Fri, Nov 01, 2024 at 05:53:54PM +0100, Petr Vorel wrote:
> FTP login tests were removed in 6282e55b5d, as out of scope of
> of kernel testing. ftp01.sh is FTP server unit test, which is also not
> relevant for kernel testing, thus removing.
> 
> Remove also binary data files bin.sm, bin.med, bin.lg, bin.jmb which are
> not needed any more.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> CI: https://github.com/pevik/ltp/actions/runs/11633078452
> 
> NOTE: The rest of the FTP tests in testcases/network/stress/ftp/ are
> downloading and sending a large amount of data over TCP and are checking
> that the data arrives the same at the other end. That is some sort of
> kernel testing, thus test kept. But better would be to migrate them to
> use LTP custom C code:
> 
> https://github.com/linux-test-project/ltp/issues/1207
> 

Reviewed-by: Wei Gao <wegao@suse.com>

>  runtest/net.tcp_cmds                    |  1 -
>  testcases/network/Makefile              |  1 -
>  testcases/network/generate.sh           | 26 ---------
>  testcases/network/tcp_cmds/Makefile     |  8 +--
>  testcases/network/tcp_cmds/Makefile.inc |  2 +-
>  testcases/network/tcp_cmds/ftp/Makefile | 30 ----------
>  testcases/network/tcp_cmds/ftp/ftp01.sh | 75 -------------------------
>  7 files changed, 3 insertions(+), 140 deletions(-)
>  delete mode 100644 testcases/network/tcp_cmds/ftp/Makefile
>  delete mode 100755 testcases/network/tcp_cmds/ftp/ftp01.sh
> 
> diff --git a/runtest/net.tcp_cmds b/runtest/net.tcp_cmds
> index 248c7371d1..aba02fb30a 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
> -ftp ftp01.sh
>  netstat netstat01.sh
>  ping01 ping01.sh
>  ping02 ping02.sh
> diff --git a/testcases/network/Makefile b/testcases/network/Makefile
> index ccc9083961..05d7f95fd8 100644
> --- a/testcases/network/Makefile
> +++ b/testcases/network/Makefile
> @@ -14,7 +14,6 @@ CLEAN_TARGETS		+= $(DIR)
>  INSTALL_DIR		:= testcases/bin
>  
>  INSTALL_TARGETS		:= $(addprefix $(DIR)/ascii.,sm med lg jmb)
> -INSTALL_TARGETS		+= $(addprefix $(DIR)/bin.,sm med lg jmb)
>  
>  RM			+= -r
>  
> diff --git a/testcases/network/generate.sh b/testcases/network/generate.sh
> index 939f792cce..af48f77381 100755
> --- a/testcases/network/generate.sh
> +++ b/testcases/network/generate.sh
> @@ -51,29 +51,3 @@ fi
>  "$make_file" "$medium_file" $medium_size
>  "$make_file" "$large_file" $large_size
>  "$make_file" "$jumbo_file" $jumbo_size
> -
> -if [ ! -e "bin.sm" ] ; then
> -	cnt=0
> -	while [ $cnt -lt 5 ] ; do
> -		gzip -1 -c -n ascii.sm >> "bin.sm"
> -		cnt=$(($cnt + 1))
> -	done
> -fi
> -
> -genfile() {
> -	local input="$1" output="$2"
> -	local cnt=19
> -
> -	[ -e "$output" ] && return $?
> -
> -	while [ $cnt -ge 0 ] ; do
> -		cat "$input" >> "$output"
> -		cnt=$(($cnt-1))
> -	done
> -}
> -
> -genfile bin.sm bin.med
> -genfile bin.med bin.lg
> -genfile bin.lg bin.jmb
> -
> -chmod 666 bin.*
> diff --git a/testcases/network/tcp_cmds/Makefile b/testcases/network/tcp_cmds/Makefile
> index 2d0f076741..ba8b879efd 100644
> --- a/testcases/network/tcp_cmds/Makefile
> +++ b/testcases/network/tcp_cmds/Makefile
> @@ -7,13 +7,9 @@ top_srcdir		?= ../../..
>  
>  include $(top_srcdir)/include/mk/env_pre.mk
>  
> -ifneq ($(WITH_EXPECT),yes)
> -FILTER_OUT_SUBDIRS	:= ftp
> -endif
> +INSTALL_DEPS		:= ../datafiles/ascii.sm
>  
> -INSTALL_DEPS		:= ../datafiles/bin.sm
> -
> -../datafiles/bin.sm:
> +../datafiles/ascii.sm:
>  	$(MAKE) -C .. -f "$(abs_srcdir)/../Makefile" generate
>  
>  include $(top_srcdir)/include/mk/generic_trunk_target.mk
> diff --git a/testcases/network/tcp_cmds/Makefile.inc b/testcases/network/tcp_cmds/Makefile.inc
> index 114141b2cd..0ca5ec0e39 100644
> --- a/testcases/network/tcp_cmds/Makefile.inc
> +++ b/testcases/network/tcp_cmds/Makefile.inc
> @@ -22,7 +22,7 @@
>  
>  GENERATE_FILE_DIR	:= ../..
>  
> -MAKE_DEPS		:= $(GENERATE_FILE_DIR)/datafiles/bin.sm
> +MAKE_DEPS		:= $(GENERATE_FILE_DIR)/datafiles/ascii.sm
>  
>  $(MAKE_DEPS):
>  	$(MAKE) -C $(GENERATE_FILE_DIR) \
> diff --git a/testcases/network/tcp_cmds/ftp/Makefile b/testcases/network/tcp_cmds/ftp/Makefile
> deleted file mode 100644
> index 35022f8b9a..0000000000
> --- a/testcases/network/tcp_cmds/ftp/Makefile
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -#
> -#    network/tcp_cmds/ftp 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		:= ftp*
> -
> -include $(top_srcdir)/include/mk/generic_leaf_target.mk
> diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh
> deleted file mode 100755
> index 53d1eec53a..0000000000
> --- a/testcases/network/tcp_cmds/ftp/ftp01.sh
> +++ /dev/null
> @@ -1,75 +0,0 @@
> -#!/bin/sh
> -# SPDX-License-Identifier: GPL-2.0-or-later
> -# Copyright (c) 2022 Akihiko Odaki <akihiko.odaki@daynix.com>
> -# Copyright (c) 2003 Manoj Iyer <manjo@mail.utexas.edu>
> -# Copyright (c) 2001 Robbie Williamson <robbiew@us.ibm.com>
> -
> -TST_TESTFUNC=do_test
> -TST_CNT=4
> -TST_NEEDS_CMDS='awk ftp'
> -TST_NEEDS_TMPDIR=1
> -
> -RUSER="${RUSER:-root}"
> -RHOST="${RHOST:-localhost}"
> -
> -do_test()
> -{
> -    case $1 in
> -    1) test_get binary;;
> -    2) test_get ascii;;
> -    3) test_put binary;;
> -    4) test_put ascii;;
> -    esac
> -}
> -
> -list_files()
> -{
> -    case $1 in
> -    ascii) echo 'ascii.sm ascii.med ascii.lg ascii.jmb';;
> -    binary) echo 'bin.sm bin.med bin.lg bin.jmb';;
> -    esac
> -}
> -
> -test_get()
> -{
> -    local file sum1 sum2
> -
> -    for file in $(list_files $1); do
> -        {
> -            echo user $RUSER $PASSWD
> -            echo $1
> -            echo cd $TST_NET_DATAROOT
> -            echo get $file
> -            echo quit
> -        } | ftp -nv $RHOST
> -
> -        sum1="$(ls -l $file | awk '{print $5}')"
> -        sum2="$(ls -l $TST_NET_DATAROOT/$file | awk '{print $5}')"
> -        rm -f $file
> -        EXPECT_PASS "[ '$sum1' = '$sum2' ]"
> -    done
> -}
> -
> -test_put()
> -{
> -    local file sum1 sum2
> -
> -    for file in $(list_files $1); do
> -        {
> -            echo user $RUSER $PASSWD
> -            echo lcd $TST_NET_DATAROOT
> -            echo $1
> -            echo cd $TST_TMPDIR
> -            echo put $file
> -            echo quit
> -        } | ftp -nv $RHOST
> -
> -        sum1="$(tst_rhost_run -c "sum $TST_TMPDIR/$file" -s | awk '{print $1}')"
> -        sum2="$(sum $TST_NET_DATAROOT/$file | awk '{print $1}')"
> -        tst_rhost_run -c "rm -f $TST_TMPDIR/$file"
> -        EXPECT_PASS "[ '$sum1' = '$sum2' ]"
> -    done
> -}
> -
> -. tst_net.sh
> -tst_run
> -- 
> 2.45.2
> 

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-11-04  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 16:53 [LTP] [PATCH 1/1] tcp_cmds: Remove ftp01.sh test, binary data files Petr Vorel
2024-11-04  1:57 ` Wei Gao via ltp [this message]
2024-11-04 13:06 ` Cyril Hrubis
2024-11-04 16:14   ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZygqC8ekLwXy0CSi@wegao \
    --to=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=wegao@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.