From patchwork Thu Oct 20 12:07:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1692447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=daynix-com.20210112.gappssmtp.com header.i=@daynix-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=IPnElsyC; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtRFH66nYz23jk for ; Thu, 20 Oct 2022 23:08:03 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 80FB43CB17A for ; Thu, 20 Oct 2022 14:07:59 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id B53163CB0D1 for ; Thu, 20 Oct 2022 14:07:57 +0200 (CEST) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id E36A71400FBB for ; Thu, 20 Oct 2022 14:07:56 +0200 (CEST) Received: by mail-pg1-x535.google.com with SMTP id h185so19012150pgc.10 for ; Thu, 20 Oct 2022 05:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lE5cHRRij5qxE83ATDj5jCOlx2lVUKTya2gIeJlzuTI=; b=IPnElsyC7cGU4DUaLGUhNIrJu/GIi2HMOZ0HKkEGeqd0Vkqa3fnv3E0vt5txKbLhtA SPFOzuY4X48BYvtAp5YyJt3pEvQcSQ6p4Xs5NnVWt6ZJs+mIU1noMuHrZEF2SZlVMzA1 PcRtvBFB0RK23PpsX8DB4VOZRDDkmMfk0vBnLquJmMOuxaha2iSVKGoWu/bfWd9WKbd5 A6xUvKrMdgOs7Z+yjaOQ/f9mCyYYQVLQhBhBjTwm6Qgal3grB/9t5F65WlMdHmfNFkBx VgCTSXjaU/A5k6n/+wR7w1s8mTaWmhCAiTUBevjmv5k050Z2Wj5sd/ZxDc7NryzKccEe wYrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lE5cHRRij5qxE83ATDj5jCOlx2lVUKTya2gIeJlzuTI=; b=ISNGmBRjyYRWkKddkbXwghFmX6g4bB+A/iecsnkf8ESIleRniA19cE5IJoBf8J5vHo oXoQEJrQrjoolfV+kn03lBimM4XwMgI7BRlLPMLvxAWSuyzeFSghXN70F8KlH4mBV6wl xsoG8WcvpO42VR1PtCVvV6R+OXylvoG5pzu4KCyQsP4XlLmQgJyyZ9s2nltdkr3CCV11 l2eRKgTS7vR83xE8i1p6qUmspiXeosrN3NiH1kq0adjFuRpV+RgZi9Cd3buKrLbLmDle mvahG10s5OZ0qPuIV2j0qaVNBYyQukroyUKcbxkxZFtMMcPr8iiojsmItNDIRM9CcJ2H ZNrw== X-Gm-Message-State: ACrzQf2UMxgDPmoLJxKTjKNcPrw1+7HN5OiTocmDh9r0tFMZwCQ/3twm VQ4tzsqit9AdWmLJXjsJ23KEv/ue1Bt/EQju X-Google-Smtp-Source: AMsMyM7hlAsxZYgvamGQF3PDGt03jnA3FjghLiJ37aCqsmEcK1SKgBqkqeQ5S8RmYFg2rJCT/+FbMQ== X-Received: by 2002:aa7:88c4:0:b0:563:9fe9:5da9 with SMTP id k4-20020aa788c4000000b005639fe95da9mr13645633pff.41.1666267675281; Thu, 20 Oct 2022 05:07:55 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id r27-20020aa79edb000000b005403b8f4bacsm13078947pfq.137.2022.10.20.05.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:07:54 -0700 (PDT) From: Akihiko Odaki To: Petr Vorel Date: Thu, 20 Oct 2022 21:07:36 +0900 Message-Id: <20221020120741.212671-1-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 1/6] ftp/ftp01: Use tst_net.sh X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Yuri Benditovich , ltp@lists.linux.it Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" This allows to use SSH rather than RSH. Signed-off-by: Akihiko Odaki --- testcases/network/tcp_cmds/ftp/ftp01.sh | 64 +++++++------------------ 1 file changed, 17 insertions(+), 47 deletions(-) diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh index 8d23abc62..a78d8adc0 100755 --- a/testcases/network/tcp_cmds/ftp/ftp01.sh +++ b/testcases/network/tcp_cmds/ftp/ftp01.sh @@ -40,6 +40,11 @@ # #---------------------------------------------------------------------- +TST_TESTFUNC=do_test +TST_SETUP=do_setup +TST_NEEDS_CMDS='awk ftp' +TST_NEEDS_TMPDIR=1 + #----------------------------------------------------------------------- # # FUNCTION: do_setup @@ -50,25 +55,11 @@ do_setup() { TC=ftp - TCtmp=${TCtmp:-$LTPROOT/$TC${EXEC_SUFFIX}$$} - TCdat=${TCdat:-$LTPROOT/datafiles} SLEEPTIME=${SLEEPTIME:-0} ASCII_FILES=${ASCII_FILES:-"ascii.sm ascii.med ascii.lg ascii.jmb"} BIN_FILES=${BIN_FILES:-"bin.sm bin.med bin.lg bin.jmb"} - RHOST=${RHOST:-`hostname`} RUSER=${RUSER:-root} - PASSWD=${PASSWD:-.pasroot} - - tst_setup - - exists awk ftp rsh - - cd "$TCtmp" - - rsh -n -l root $RHOST mkdir -p "$TCtmp" - rsh -n -l root $RHOST chown -R ${RUSER} "$TCtmp" - [ $? = 0 ] || end_testcase "Check .rhosts file on remote machine." } @@ -95,53 +86,35 @@ do_test() if [ $a = "get" ]; then { echo user $RUSER $PASSWD - echo lcd $TCtmp echo $i - echo cd $TCdat + echo cd $TST_NET_DATAROOT echo $a $j echo quit } | ftp -nv $RHOST - SUM1=`ls -l $TCtmp/$j | awk '{print $5}'` - SUM2=`ls -l $TCdat/$j | awk '{print $5}'` - rm -f $TCtmp/$j + SUM1=`ls -l $j | awk '{print $5}'` + SUM2=`ls -l $TST_NET_DATAROOT/$j | awk '{print $5}'` + rm -f $j else { echo user $RUSER $PASSWD - echo lcd $TCdat + echo lcd $TST_NET_DATAROOT echo $i - echo cd $TCtmp + echo cd $TST_TMPDIR echo $a $j echo quit } | ftp -nv $RHOST - SUM1=`rsh -n -l root $RHOST sum $TCtmp/$j | awk '{print $1}'` - SUM2=`sum $TCdat/$j | awk '{print $1}'` - rsh -n -l root $RHOST rm -f $TCtmp/$j + SUM1=`tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}'` + SUM2=`sum $TST_NET_DATAROOT/$j | awk '{print $1}'` + tst_rhost_run -c "rm -f $TST_TMPDIR/$j" fi - if [ $SUM1 = $SUM2 ]; then - tst_resm TINFO "Test Successful doing ftp $a $j $i" - else - end_testcase "Test Fail: Wrong sum while performing ftp $a $j $i" - fi + EXPECT_PASS "[ '$SUM1' = '$SUM2' ]" sleep $SLEEPTIME done done done } - -#----------------------------------------------------------------------- -# -# FUNCTION: do_cleanup -# -#----------------------------------------------------------------------- - -do_cleanup() -{ - rsh -n -l root $RHOST rmdir "$TCtmp" - tst_cleanup -} - #---------------------------------------------------------------------- # FUNCTION: MAIN # PURPOSE: To invoke the functions to perform the tasks described in @@ -150,9 +123,6 @@ do_cleanup() # OUTPUT: A testcase run log with the results of the execution of this # test. #---------------------------------------------------------------------- -. net_cmdlib.sh +. tst_net.sh -read_opts $* -do_setup -do_test -end_testcase +tst_run From patchwork Thu Oct 20 12:07:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1692452 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=daynix-com.20210112.gappssmtp.com header.i=@daynix-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=T4UggdU2; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtRGJ71m2z23jk for ; Thu, 20 Oct 2022 23:08:56 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 83BA03CB1B5 for ; Thu, 20 Oct 2022 14:08:54 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [IPv6:2001:4b78:1:20::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id DDF863CB191 for ; Thu, 20 Oct 2022 14:08:09 +0200 (CEST) Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 1E4D360069F for ; Thu, 20 Oct 2022 14:08:09 +0200 (CEST) Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-136b5dd6655so24291652fac.3 for ; Thu, 20 Oct 2022 05:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lX6D5NTw9Tl/Zw5lEQs2/tiJvWxUJ6H8AougPEH/Ow8=; b=T4UggdU22Yn04kRg8yfyWMav56eiRUXImeFGN+yiAD+6TAw2srwsvMPKaNYuMrFP+e zjdO2AAzttouV9vUfjZOBuNK4GEhXK6cJqZmjgHpDYRChj6XJNsDb3LNAWIfRoEj1m3m NfMU16An2el4U4GoAZb3YzKYP1Ei4zQa2QwlDng90PJ1yPWj2pHLIBhOCUZwzkFyV90B ++TB9yf0NqfhGP8FonjZyd4+F8mM38Z4bBAL5ZL/tbz80WCIFy1ZbPQxpkjOqv6U2zom emeoYwzR4aENHw4RIYAE23f5Lb/oWydi6QkkCF85aUrQ/1qjapt6XLTKvvOZNKlDZD2e As5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lX6D5NTw9Tl/Zw5lEQs2/tiJvWxUJ6H8AougPEH/Ow8=; b=EYRxHLp8CTnxvPrclFRaE6DyzizrpoPi512XDCqs78gcDfkmpvOGH+3q6izJ5AFaOH LUNnppusC8L4VwUFhY52iuRCLKBM2g3QXLZWAj6uhF1vv2XCNeMuqCbUQyLfrKrxvW4H rcHTXUBxva1GE/h1myFarMLDmQGUwijrNKE3X2cxZhDAns0/7UBI6TTKJuorddIqUXw7 F8t+brxO1puGceabtiSQ9mModK0fVzILCPe9ye4DMonWb1ht1NuBEvGcRvuBoLw3YqL+ 6PLyYFqJkR/BPW63mqfutC1E3bZhU+Lf4yhXF8Yx64KQeAVIwA5G4XKKzxcL4pDSd8bk JHIQ== X-Gm-Message-State: ACrzQf3U3nIZJ9jTDUmRkxCdo01+P/rHYKcnkq8dc5iVuJFiVzDZ8exe dlvxJJm8kTjM4/H1oDmhd5bJAE4uo9CRKYqC X-Google-Smtp-Source: AMsMyM6nKz208xIr8Cpzjq1jABT+Y1sMnZUPU+CuxDpvnujZrsihuQvuR3XDm51I7l1c54LIlpP08g== X-Received: by 2002:a17:90a:e387:b0:211:2d90:675 with SMTP id b7-20020a17090ae38700b002112d900675mr5225555pjz.66.1666267677543; Thu, 20 Oct 2022 05:07:57 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id r27-20020aa79edb000000b005403b8f4bacsm13078947pfq.137.2022.10.20.05.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:07:57 -0700 (PDT) From: Akihiko Odaki To: Petr Vorel Date: Thu, 20 Oct 2022 21:07:37 +0900 Message-Id: <20221020120741.212671-2-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221020120741.212671-1-akihiko.odaki@daynix.com> References: <20221020120741.212671-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH 2/6] ftp/ftp01: Remove verbose comments X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Yuri Benditovich , ltp@lists.linux.it Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Suggested-by: Petr Vorel Signed-off-by: Akihiko Odaki --- testcases/network/tcp_cmds/ftp/ftp01.sh | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh index a78d8adc0..2d61377b3 100755 --- a/testcases/network/tcp_cmds/ftp/ftp01.sh +++ b/testcases/network/tcp_cmds/ftp/ftp01.sh @@ -45,12 +45,6 @@ TST_SETUP=do_setup TST_NEEDS_CMDS='awk ftp' TST_NEEDS_TMPDIR=1 -#----------------------------------------------------------------------- -# -# FUNCTION: do_setup -# -#----------------------------------------------------------------------- - do_setup() { @@ -63,12 +57,6 @@ do_setup() } -#----------------------------------------------------------------------- -# -# FUNCTION: do_test -# -#----------------------------------------------------------------------- - do_test() { @@ -115,14 +103,6 @@ do_test() done } -#---------------------------------------------------------------------- -# FUNCTION: MAIN -# PURPOSE: To invoke the functions to perform the tasks described in -# the prologue. -# INPUT: None. -# OUTPUT: A testcase run log with the results of the execution of this -# test. -#---------------------------------------------------------------------- . tst_net.sh tst_run From patchwork Thu Oct 20 12:07:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1692448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=daynix-com.20210112.gappssmtp.com header.i=@daynix-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=AU81/39X; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtRFT58p3z23jk for ; Thu, 20 Oct 2022 23:08:13 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C1DDD3CB17A for ; Thu, 20 Oct 2022 14:08:10 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id BA7D03CB19B for ; Thu, 20 Oct 2022 14:08:02 +0200 (CEST) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 2893C1000466 for ; Thu, 20 Oct 2022 14:08:01 +0200 (CEST) Received: by mail-pf1-x42d.google.com with SMTP id y1so20074582pfr.3 for ; Thu, 20 Oct 2022 05:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/ae0yhJSINWSuQswycdp0xgfUq3qQ8JORRsbYicGiEA=; b=AU81/39XghjAuVnKffZPSyhU8od/eNabwPizN3WwxDo502zhhTPwTl2e9e8ZZ16h3G 30DZR/DFkRFVAQewYgtGD+3jirox73EoADwgtjjzpI5q/0tneEP+NLyGriJQZaGQXvBk g6up2MGyA3a63lgSCCXNU7UFgrIuRDe6jAurM0fIAAd99NhM/hg7BdBZyghwNi80aYrM pUxIIP+8ZFN8/E3dWUnVKvTEJSxUkKwC0LKtNEN0+crssALKxM5D4c/eW8eSy4w6dCEC h0BnUQPwCaHBMaAn34TMr0rSoJa+obZ6DfivEZn9b1h5B8nHbO8H7OjX5Zk2Y8pcqG4S zPOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/ae0yhJSINWSuQswycdp0xgfUq3qQ8JORRsbYicGiEA=; b=MnD6DClmcHmKGwzPFh0ERJa47V4y408UBFZ/GGbmYA1OSd+Ognl3jgZWRoC0mUsJzm sazEqxD7FnPEfmiLtP9rsOiQMQ+uwp0M/sLFRBDvkstx0qq1u9YPeKy4MffheaZBuXOR Aq2OFfuMPCMTFDQgE8Gk4fcj1nYQbRs9pfny6slLmgjvpBMYIitvEguiFH4DEzvHgz1s H938K8OsuwKF5EGYt6atOdugSCbArK8gMgSRUYph6p5ErDxCc5WX04+3wNpOAJeDFXqG VkUEQaSZp0/MN51UhPspSb5/dMuDMCQJ3SjTLiEXciCejlwJpbYrQj2El/E7F9r/h5Rr 9bYg== X-Gm-Message-State: ACrzQf2jmCfiJYfE/HBXrc7joi2JUF7rAMt1Ct7w4NN9Ukl0f/KLzGZS kgUJwsespl3Bpb2rgn0/DCBZkpCsDEE6Gzpa X-Google-Smtp-Source: AMsMyM5pNZ+jc/6WJrR0d8WXzgbE0uuVNaetWihygjDOGRkWonFxf/OW0EswOkYL/hFRNB4X7b+NpQ== X-Received: by 2002:a63:e22:0:b0:458:cfe7:958 with SMTP id d34-20020a630e22000000b00458cfe70958mr11365363pgl.449.1666267679731; Thu, 20 Oct 2022 05:07:59 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id r27-20020aa79edb000000b005403b8f4bacsm13078947pfq.137.2022.10.20.05.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:07:59 -0700 (PDT) From: Akihiko Odaki To: Petr Vorel Date: Thu, 20 Oct 2022 21:07:38 +0900 Message-Id: <20221020120741.212671-3-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221020120741.212671-1-akihiko.odaki@daynix.com> References: <20221020120741.212671-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 3/6] ftp/ftp01: Remove old-style command substitution X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Yuri Benditovich , ltp@lists.linux.it Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Suggested-by: Petr Vorel Signed-off-by: Akihiko Odaki --- testcases/network/tcp_cmds/ftp/ftp01.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh index 2d61377b3..f8a3c98e8 100755 --- a/testcases/network/tcp_cmds/ftp/ftp01.sh +++ b/testcases/network/tcp_cmds/ftp/ftp01.sh @@ -79,8 +79,8 @@ do_test() echo $a $j echo quit } | ftp -nv $RHOST - SUM1=`ls -l $j | awk '{print $5}'` - SUM2=`ls -l $TST_NET_DATAROOT/$j | awk '{print $5}'` + SUM1="$(ls -l $j | awk '{print $5}')" + SUM2="$(ls -l $TST_NET_DATAROOT/$j | awk '{print $5}')" rm -f $j else { @@ -91,8 +91,8 @@ do_test() echo $a $j echo quit } | ftp -nv $RHOST - SUM1=`tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}'` - SUM2=`sum $TST_NET_DATAROOT/$j | awk '{print $1}'` + SUM1="$(tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}')" + SUM2="$(sum $TST_NET_DATAROOT/$j | awk '{print $1}')" tst_rhost_run -c "rm -f $TST_TMPDIR/$j" fi From patchwork Thu Oct 20 12:07:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1692449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=daynix-com.20210112.gappssmtp.com header.i=@daynix-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=yPpn5W4I; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtRFh06zrz23jk for ; Thu, 20 Oct 2022 23:08:24 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id ADC113CB18D for ; Thu, 20 Oct 2022 14:08:21 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id DF18C3CB18F for ; Thu, 20 Oct 2022 14:08:03 +0200 (CEST) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id 7A06E1401168 for ; Thu, 20 Oct 2022 14:08:03 +0200 (CEST) Received: by mail-pl1-x62b.google.com with SMTP id y4so1252220plb.2 for ; Thu, 20 Oct 2022 05:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HSamzQMU691u272t9U0zFVAP6iXLXRYXU+Hewd9Tbbo=; b=yPpn5W4I8DrXVY14Zbeo3fkP+08/44sTaJSmm6VfOTpznVbTxu/TDRYxiOfF4l8YdL DQTmzutBz+w39qWhYT+dW88kdhfuoSOIKMPr+FE2JlVPG98IX6yMh1EaFVU6hH4SmUhW EfrsBW4jx3xVq4z4qLlxcaJqVzUxUkA3fUSc5CsGXEstCvBsDLCR4JXZBxERVypt8/wF pXmqfAwntv5szCeDXeMfRpAT0CUe3vfkgvPOUG0dgkW9fHyda480L9p4UDeISN5xJ3d5 MD3tiWMyH+UgoMazNxbP9dZ9b1oe0PxgdXxduR1vPWkEcBtnpxtYQU/lBVE8GWgGxjSq nj8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HSamzQMU691u272t9U0zFVAP6iXLXRYXU+Hewd9Tbbo=; b=i2rhGki6laGreP+IV9o+pl113If/aplmkGlnt1yHTOVx6i9iBlxKA2BFPxcSA9iaFP b9cYhcp1agCHdThQCZ88UJ7Tmd1L53w//tbhPdKMcot11x1Q6JoNWl2gqSxdDxIVNW7i lGgDQUGxuEtDC1QuIgAw7y/GL1MLVz/5jy8oTUl6/U3KVRSAH1dRFAV72JyN4v/9FGXA /EoYZ60pW2Ya8AMtixaRmrZGS4pQsF6XE8KKvQGXfLVCWeTyAMAmL2mk3IeKybi5tssJ JuNh+CvQ4dWpbBwasm+RQR+L2oeYT6COaVpdhCRlwI0jlJSC1ggklfHht6Z45m0GXnKK 3uqQ== X-Gm-Message-State: ACrzQf3KPRJipT7UWPVGke+dj6PhO0Eg2jYWu2F1SMK3GK7hYl/VtMcZ w7lKH5QMkX4fY1Y/rOd+RJmyV1wHnXpqWcEg X-Google-Smtp-Source: AMsMyM5GIEqw9nPb2cJBVeVKsMS/4YRwOIVboU0447edCMi3t67bRzTM+JFlqnkZeX5QAr/tTheHVg== X-Received: by 2002:a17:90b:4a84:b0:20a:f497:6f5d with SMTP id lp4-20020a17090b4a8400b0020af4976f5dmr15407582pjb.213.1666267682040; Thu, 20 Oct 2022 05:08:02 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id r27-20020aa79edb000000b005403b8f4bacsm13078947pfq.137.2022.10.20.05.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:08:01 -0700 (PDT) From: Akihiko Odaki To: Petr Vorel Date: Thu, 20 Oct 2022 21:07:39 +0900 Message-Id: <20221020120741.212671-4-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221020120741.212671-1-akihiko.odaki@daynix.com> References: <20221020120741.212671-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 4/6] ftp/ftp01: Remove sleep option X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Yuri Benditovich , ltp@lists.linux.it Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Suggested-by: Petr Vorel Signed-off-by: Akihiko Odaki --- testcases/network/tcp_cmds/ftp/ftp01.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh index f8a3c98e8..10b35c384 100755 --- a/testcases/network/tcp_cmds/ftp/ftp01.sh +++ b/testcases/network/tcp_cmds/ftp/ftp01.sh @@ -49,7 +49,6 @@ do_setup() { TC=ftp - SLEEPTIME=${SLEEPTIME:-0} ASCII_FILES=${ASCII_FILES:-"ascii.sm ascii.med ascii.lg ascii.jmb"} BIN_FILES=${BIN_FILES:-"bin.sm bin.med bin.lg bin.jmb"} @@ -97,7 +96,6 @@ do_test() fi EXPECT_PASS "[ '$SUM1' = '$SUM2' ]" - sleep $SLEEPTIME done done done From patchwork Thu Oct 20 12:07:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1692450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=daynix-com.20210112.gappssmtp.com header.i=@daynix-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=Msxse3Tt; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtRFs5mYGz23jk for ; Thu, 20 Oct 2022 23:08:33 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 2ABCD3CB1B2 for ; Thu, 20 Oct 2022 14:08:31 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 3E1783CB185 for ; Thu, 20 Oct 2022 14:08:06 +0200 (CEST) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 9663A10004AB for ; Thu, 20 Oct 2022 14:08:05 +0200 (CEST) Received: by mail-pg1-x52b.google.com with SMTP id r18so19005636pgr.12 for ; Thu, 20 Oct 2022 05:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I832/Ksv30ChGn1YhfdsdHZhlGeEoBtGR1Ci27xR+l0=; b=Msxse3TtM6u8R/qAQT+VykQl38cT5XqL8baRvSlUNZ5a1ddop9ozcXvp3rPsbeDOna R+w5rMBoj7gYHVrR+6aVUZcFZ23Kwe8UpngHcUR6fLz/WhJImLamW912yepcHC4pqUTr qW7UZsdQN6jUCuwieKS8ROoiK+7pNiPhFVdlqU3HgppmgcGLO6EAWhCYejrlFMyrFBfK sFYHtRkmK6QvOQ/qK9gIFpriNXH98HfwrygZkAZygEuWdktM6FR1TZEo18agDhBwnX28 9h8KdvlK+/7ajM6KLpcRvzVtHJTpbKxMv3tHuT7j3H7GsM87nQtcdu/vB0KWqymqLN6R 3ZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I832/Ksv30ChGn1YhfdsdHZhlGeEoBtGR1Ci27xR+l0=; b=Rybc4Lzsr4Sdq6rZBgc8Ls/4qun5BWcaJLmoNxosLTMHbKAzgaliJvDMVYEC7kpt2U BE8h3k1+FgRyEUpojCdiVS58mEPwH80QRAneju6BXLS/V+BlilCFj7LJO8y/1WzS0LJ7 /NgMaipQzIlsRT+B0hllwu1/g0utnM5FHIodlGmbTdBsxbwRE+lU1WUh6XbVhtMQYTJE I4qWbbMFiQoBwWlg5Oyr0PGexnz2q/+9+ln0w/28OOIG4M6jMmRjsG/LGEHC/7UAU4Cw tyPsqTJGCgiC3TNDtiJwFCujbnFORGEO0gev/pCy2EPJWpl1Uckqevq+ejJSVawKROxn SGIA== X-Gm-Message-State: ACrzQf2LekN6sryqSaVEQeDaOwkXbrMwPP/I88ZePwKRFjdStnN4xiF+ cPMNUpFi4ZwBPgdtobqZrvHfjw== X-Google-Smtp-Source: AMsMyM62PR0rmdMSwT09lS/2a2CFDIKtD8FYxwZZ0ih5zJ+mbvG9uCeYAnhl+ZcFhRKoV2aOCrMX7w== X-Received: by 2002:a63:a06:0:b0:458:2853:45e4 with SMTP id 6-20020a630a06000000b00458285345e4mr11218127pgk.20.1666267684157; Thu, 20 Oct 2022 05:08:04 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id r27-20020aa79edb000000b005403b8f4bacsm13078947pfq.137.2022.10.20.05.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:08:03 -0700 (PDT) From: Akihiko Odaki To: Petr Vorel Date: Thu, 20 Oct 2022 21:07:40 +0900 Message-Id: <20221020120741.212671-5-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221020120741.212671-1-akihiko.odaki@daynix.com> References: <20221020120741.212671-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 5/6] ftp/ftp01: Make variables local X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Yuri Benditovich , ltp@lists.linux.it Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Suggested-by: Petr Vorel Signed-off-by: Akihiko Odaki --- testcases/network/tcp_cmds/ftp/ftp01.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh index 10b35c384..8c0cffdea 100755 --- a/testcases/network/tcp_cmds/ftp/ftp01.sh +++ b/testcases/network/tcp_cmds/ftp/ftp01.sh @@ -58,6 +58,7 @@ do_setup() do_test() { + local sum1 sum2 for i in binary ascii; do @@ -78,8 +79,8 @@ do_test() echo $a $j echo quit } | ftp -nv $RHOST - SUM1="$(ls -l $j | awk '{print $5}')" - SUM2="$(ls -l $TST_NET_DATAROOT/$j | awk '{print $5}')" + sum1="$(ls -l $j | awk '{print $5}')" + sum2="$(ls -l $TST_NET_DATAROOT/$j | awk '{print $5}')" rm -f $j else { @@ -90,12 +91,12 @@ do_test() echo $a $j echo quit } | ftp -nv $RHOST - SUM1="$(tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}')" - SUM2="$(sum $TST_NET_DATAROOT/$j | awk '{print $1}')" + sum1="$(tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}')" + sum2="$(sum $TST_NET_DATAROOT/$j | awk '{print $1}')" tst_rhost_run -c "rm -f $TST_TMPDIR/$j" fi - EXPECT_PASS "[ '$SUM1' = '$SUM2' ]" + EXPECT_PASS "[ '$sum1' = '$sum2' ]" done done done From patchwork Thu Oct 20 12:07:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1692451 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=daynix-com.20210112.gappssmtp.com header.i=@daynix-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=GOxXdbcP; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtRG42CFFz23jk for ; Thu, 20 Oct 2022 23:08:44 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id DB9783CB19F for ; Thu, 20 Oct 2022 14:08:41 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 983423CB1A3 for ; Thu, 20 Oct 2022 14:08:08 +0200 (CEST) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 2252D1A001B0 for ; Thu, 20 Oct 2022 14:08:08 +0200 (CEST) Received: by mail-pg1-x535.google.com with SMTP id s196so17728353pgs.3 for ; Thu, 20 Oct 2022 05:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uaNdtCtK7RMnjrx48K6uekX5rQGql6WCa+w8jn5gHIs=; b=GOxXdbcPAuR5Lkqz4WULi9UIzWgkXHoMeTpmng7Q+MxAh0yhd0QyDVt0JBrVagzNZK UY5C/ulhmo+Yx9pBNo2qGP5m6FT8IOeX9xg1eARQM5PX22b8NxJFQFE1mzenR7ADyJPQ Qdy6fhnGiiZJe4f/MqWDqZ1rxvuJJZd4Y5bUJwlLi3hJeLv13lQC6dVLcGq+py6odsl8 BVp4hR1NDLvYVbDL4jeS/zyZmyjhkZOaPB/fzg019fROmntvepB2ZwZinTYm/NaCZOsg Qw6ZVbkCeLiU5f1N+gadY1Gavmjw1cn9HHkwCP6uRKI+/bUQ5JsPEIxjg7ZWTRvqGSMI ws8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uaNdtCtK7RMnjrx48K6uekX5rQGql6WCa+w8jn5gHIs=; b=TT8XXGZVgib7FHlmldA2HWAIuLVW0j0aK/jtFpsiFtn80lCgVOsv1Ge9KJtTXiFxqN MCUO3qqRTWVyBOziASx4w4q3wzQXYOiVrCE+ioHrnG19p+ItLtCg8Gerh8nGJ4Xu1DrC pWsBsvgLY2U6feX6vFNSAjAb/Q6xFevYcUJUPejskZ2WalgDL+qlmuW427ncx1pa98e/ XO7q/DYpNAp/JaCRlkIb9Wj028D2N1r7uhSFY32v+/Y+Um+g2sqMqGetE7hHwnrgnn8L HxbtNudTgsORHw9AW1HHTbvcYvjmcN23YcdV7EX+Y4AP0PokeOPnbKBSsp8Rl8QAH7sj ZDIw== X-Gm-Message-State: ACrzQf2XDKEawnM8sIoCFNcqOcihvX2xMt2+j8+DLFkAtNhIMpDikQEz B03FTah8KsSEBBBtVuDG90Ai3Vd/NxOA7sjn X-Google-Smtp-Source: AMsMyM6ShxX4abJjMabrPA7VuWMlsSR3Av/DaiB76nVwSJN9/NEZDWokuzVNWBbBCNWwfOXx8QOjbQ== X-Received: by 2002:a05:6a00:cc4:b0:566:87c:53de with SMTP id b4-20020a056a000cc400b00566087c53demr13374432pfv.19.1666267686685; Thu, 20 Oct 2022 05:08:06 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id r27-20020aa79edb000000b005403b8f4bacsm13078947pfq.137.2022.10.20.05.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:08:05 -0700 (PDT) From: Akihiko Odaki To: Petr Vorel Date: Thu, 20 Oct 2022 21:07:41 +0900 Message-Id: <20221020120741.212671-6-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221020120741.212671-1-akihiko.odaki@daynix.com> References: <20221020120741.212671-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 6/6] ftp/ftp01: Split the test function X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yan Vugenfirer , Yuri Benditovich , ltp@lists.linux.it Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Suggested-by: Petr Vorel Signed-off-by: Akihiko Odaki --- testcases/network/tcp_cmds/ftp/ftp01.sh | 88 ++++++++++++++----------- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh index 8c0cffdea..8bb659d54 100755 --- a/testcases/network/tcp_cmds/ftp/ftp01.sh +++ b/testcases/network/tcp_cmds/ftp/ftp01.sh @@ -49,56 +49,66 @@ do_setup() { TC=ftp - ASCII_FILES=${ASCII_FILES:-"ascii.sm ascii.med ascii.lg ascii.jmb"} - BIN_FILES=${BIN_FILES:-"bin.sm bin.med bin.lg bin.jmb"} - RUSER=${RUSER:-root} } 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 + binary) echo 'ascii.sm ascii.med ascii.lg ascii.jmb';; + ascii) echo 'bin.sm bin.med bin.lg bin.jmb';; + esac +} + +test_get() { local sum1 sum2 - for i in binary ascii; do + 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 +} - if [ $i = "binary" ]; then - FILES=$BIN_FILES - fi - if [ $i = "ascii" ]; then - FILES=$ASCII_FILES - fi - for j in $FILES; do +test_put() +{ + local sum1 sum2 - for a in get put; do - if [ $a = "get" ]; then - { - echo user $RUSER $PASSWD - echo $i - echo cd $TST_NET_DATAROOT - echo $a $j - echo quit - } | ftp -nv $RHOST - sum1="$(ls -l $j | awk '{print $5}')" - sum2="$(ls -l $TST_NET_DATAROOT/$j | awk '{print $5}')" - rm -f $j - else - { - echo user $RUSER $PASSWD - echo lcd $TST_NET_DATAROOT - echo $i - echo cd $TST_TMPDIR - echo $a $j - echo quit - } | ftp -nv $RHOST - sum1="$(tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}')" - sum2="$(sum $TST_NET_DATAROOT/$j | awk '{print $1}')" - tst_rhost_run -c "rm -f $TST_TMPDIR/$j" - fi + for file in $(list_files $1); do + { + echo user $RUSER $PASSWD + echo lcd $TST_NET_DATAROOT + echo $1 + echo cd $TST_TMPDIR + echo post $file + echo quit + } | ftp -nv $RHOST - EXPECT_PASS "[ '$sum1' = '$sum2' ]" - done - done + 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 }