From patchwork Fri Jun 1 11:49:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 923971 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40y2hd3s4wz9s1b for ; Fri, 1 Jun 2018 21:50:41 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 1CA8A3E7A97 for ; Fri, 1 Jun 2018 13:50:38 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) by picard.linux.it (Postfix) with ESMTP id 004813E7A0E for ; Fri, 1 Jun 2018 13:50:20 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id AFF91600D03 for ; Fri, 1 Jun 2018 13:50:20 +0200 (CEST) Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5EE5AAF0A; Fri, 1 Jun 2018 11:50:20 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Fri, 1 Jun 2018 13:49:55 +0200 Message-Id: <20180601114956.17265-7-pvorel@suse.cz> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180601114956.17265-1-pvorel@suse.cz> References: <20180601114956.17265-1-pvorel@suse.cz> X-Virus-Scanned: clamav-milter 0.99.2 at in-2.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 6/7] net/ssh: Replace $ipver by $TST_IPVER from tst_net.sh X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" NOTE: remote tests still use $ip_ver, as IP version is passed to them as $1. Signed-off-by: Petr Vorel --- testcases/network/stress/ssh/ssh-stress | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/testcases/network/stress/ssh/ssh-stress b/testcases/network/stress/ssh/ssh-stress index 00b47c27f..afedaaa49 100644 --- a/testcases/network/stress/ssh/ssh-stress +++ b/testcases/network/stress/ssh/ssh-stress @@ -48,16 +48,14 @@ setup() tst_require_root tst_check_cmds pkill sshd ssh od - ipver=${TST_IPV6:-"4"} - # Get the sshd command with absolute path SSHD=$(which sshd) test "$SSHD" || tst_brkm TBROK "sshd daemon is not found" - check_icmpv${ipver}_connectivity $(tst_iface) $(tst_ipaddr rhost) || \ + check_icmpv${TST_IPVER}_connectivity $(tst_iface) $(tst_ipaddr rhost) || \ tst_brkm TBROK "Failed to ping to $(tst_ipaddr rhost)" - port=$(tst_rhost_run -c "tst_get_unused_port ipv${ipver} stream") + port=$(tst_rhost_run -c "tst_get_unused_port ipv${TST_IPVER} stream") tst_tmpdir @@ -108,7 +106,7 @@ test01() { tst_resm TINFO "Creating '$CONNECTION_TOTAL' ssh sessions" - tst_rhost_run -s -c "ssh-stress01-rmt $ipver $(tst_ipaddr) \ + tst_rhost_run -s -c "ssh-stress01-rmt $TST_IPVER $(tst_ipaddr) \ $rconfig $CONNECTION_TOTAL" tst_resm TPASS "Test is finished successfully" @@ -119,7 +117,7 @@ test02() tst_resm TINFO "Log in/out by many clients asynchronously" tst_resm TINFO "'$CONNECTION_TOTAL' clients, time $NS_DURATION sec" - tst_rhost_run -s -c "ssh-stress02-rmt $ipver $(tst_ipaddr) \ + tst_rhost_run -s -c "ssh-stress02-rmt $TST_IPVER $(tst_ipaddr) \ $rconfig $CONNECTION_TOTAL $NS_DURATION" tst_resm TPASS "Test is finished successfully" @@ -130,11 +128,11 @@ test03() tst_resm TINFO "Forwarding TCP traffic with $NS_TIMES requests" # Run a TCP traffic server - port=$(tst_get_unused_port ipv${ipver} stream) + port=$(tst_get_unused_port ipv${TST_IPVER} stream) netstress -R 3 -g $port > tcp_server.log 2>&1 & - tst_rhost_run -s -c "ssh-stress03-rmt $ipver $(tst_ipaddr) \ + tst_rhost_run -s -c "ssh-stress03-rmt $TST_IPVER $(tst_ipaddr) \ $rconfig $port $NS_TIMES" tst_resm TPASS "Test is finished successfully"