From patchwork Wed May 23 04:27:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sun Lianwen X-Patchwork-Id: 918736 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=2001:1418:10:5::2; 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=cn.fujitsu.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rKLJ0snWz9s2L for ; Wed, 23 May 2018 14:29:57 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 7AC653E7042 for ; Wed, 23 May 2018 06:29:50 +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]) by picard.linux.it (Postfix) with ESMTP id 799A93E6605 for ; Wed, 23 May 2018 06:29:32 +0200 (CEST) Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by in-4.smtp.seeweb.it (Postfix) with ESMTP id 823811000542 for ; Wed, 23 May 2018 06:26:52 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="40239037" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 23 May 2018 12:26:40 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 0E4BA4B40409; Wed, 23 May 2018 12:26:38 +0800 (CST) Received: from slw.lan (10.167.226.95) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.399.0; Wed, 23 May 2018 12:26:38 +0800 From: Sun Lianwen To: Date: Wed, 23 May 2018 12:27:26 +0800 Message-ID: <20180523042726.4476-1-sunlw.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-Originating-IP: [10.167.226.95] X-yoursite-MailScanner-ID: 0E4BA4B40409.A19F7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: sunlw.fnst@cn.fujitsu.com X-Spam-Status: No, score=0.0 required=7.0 tests=none autolearn=disabled version=3.4.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-4.smtp.seeweb.it Cc: ltp@lists.linux.it Subject: [LTP] [PATCH] mcast-lib.sh: change the parameter of sysctl 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Exec the command of sysctl -qw on redhat6.10 will report below error message, error: Unknown parameter "-qw" usage: sysctl [-n] [-e] variable ... sysctl [-n] [-e] [-q] -w variable=value ... sysctl [-n] [-e] -a sysctl [-n] [-e] [-q] -p (default /etc/sysctl.conf) sysctl [-n] [-e] [-q] --system sysctl [-n] [-e] -A change the sysctl -qw xxx to sysctl -q -w xxx the test pass. Signed-off-by: Sun Lianwen --- .../multicast/grp-operation/mcast-lib.sh | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/testcases/network/stress/multicast/grp-operation/mcast-lib.sh b/testcases/network/stress/multicast/grp-operation/mcast-lib.sh index 13a445f55..6796f59f9 100644 --- a/testcases/network/stress/multicast/grp-operation/mcast-lib.sh +++ b/testcases/network/stress/multicast/grp-operation/mcast-lib.sh @@ -37,10 +37,10 @@ mcast_setup4() [ "$igmp_max_memberships" -gt 5459 ] && tst_res TWARN \ "\$1 shouldn't be set higher than 5459 as it's used to set /proc/sys/net/ipv4/igmp_max_memberships" - ROD sysctl -qw net.ipv4.igmp_max_memberships=$igmp_max_memberships - ROD sysctl -qw net.ipv4.igmp_max_msf=10 - ROD sysctl -qw net.ipv4.conf.$(tst_iface).force_igmp_version=0 - ROD sysctl -qw net.ipv4.conf.all.force_igmp_version=0 + ROD sysctl -q -w net.ipv4.igmp_max_memberships=$igmp_max_memberships + ROD sysctl -q -w net.ipv4.igmp_max_msf=10 + ROD sysctl -q -w net.ipv4.conf.$(tst_iface).force_igmp_version=0 + ROD sysctl -q -w net.ipv4.conf.all.force_igmp_version=0 } mcast_setup6() @@ -52,9 +52,9 @@ mcast_setup6() SYSCTL_FORCE_MLD_VERSION=$(sysctl -b net.ipv6.conf.$(tst_iface).force_mld_version) SYSCTL_MLD_MAX_MSF=$(sysctl -b net.ipv6.mld_max_msf) - ROD sysctl -qw net.ipv6.conf.all.force_mld_version=0 - ROD sysctl -qw net.ipv6.conf.$(tst_iface).force_mld_version=0 - ROD sysctl -qw net.ipv6.mld_max_msf=$default_mld_max_msf + ROD sysctl -q -w net.ipv6.conf.all.force_mld_version=0 + ROD sysctl -q -w net.ipv6.conf.$(tst_iface).force_mld_version=0 + ROD sysctl -q -w net.ipv6.mld_max_msf=$default_mld_max_msf } mcast_setup() @@ -74,17 +74,17 @@ mcast_setup() mcast_cleanup4() { - [ -n "$SYSFS_IGMP_MAX_MEMBERSHIPS" ] && sysctl -qw net.ipv4.igmp_max_memberships=$SYSFS_IGMP_MAX_MEMBERSHIPS - [ -n "$SYSFS_IGMP_MAX_MSF" ] && sysctl -qw net.ipv4.igmp_max_msf=$SYSFS_IGMP_MAX_MSF - [ -n "$SYSFS_FORCE_IGMP_VERSION" ] && sysctl -qw net.ipv4.conf.$(tst_iface).force_igmp_version=$SYSFS_FORCE_IGMP_VERSION - [ -n "$SYSFS_ALL_FORCE_IGMP_VERSION" ] && sysctl -qw net.ipv4.conf.all.force_igmp_version=$SYSFS_ALL_FORCE_IGMP_VERSION + [ -n "$SYSFS_IGMP_MAX_MEMBERSHIPS" ] && sysctl -q -w net.ipv4.igmp_max_memberships=$SYSFS_IGMP_MAX_MEMBERSHIPS + [ -n "$SYSFS_IGMP_MAX_MSF" ] && sysctl -q -w net.ipv4.igmp_max_msf=$SYSFS_IGMP_MAX_MSF + [ -n "$SYSFS_FORCE_IGMP_VERSION" ] && sysctl -q -w net.ipv4.conf.$(tst_iface).force_igmp_version=$SYSFS_FORCE_IGMP_VERSION + [ -n "$SYSFS_ALL_FORCE_IGMP_VERSION" ] && sysctl -q -w net.ipv4.conf.all.force_igmp_version=$SYSFS_ALL_FORCE_IGMP_VERSION } mcast_cleanup6() { - [ -n "$SYSCTL_ALL_FORCE_MLD_VERSION" ] && sysctl -qw net.ipv6.conf.all.force_mld_version=$SYSCTL_ALL_FORCE_MLD_VERSION - [ -n "$SYSCTL_FORCE_MLD_VERSION" ] && sysctl -qw net.ipv6.conf.$(tst_iface).force_mld_version=$SYSCTL_FORCE_MLD_VERSION - [ -n "$SYSCTL_MLD_MAX_MSF" ] && sysctl -qw net.ipv6.mld_max_msf=$SYSCTL_MLD_MAX_MSF + [ -n "$SYSCTL_ALL_FORCE_MLD_VERSION" ] && sysctl -q -w net.ipv6.conf.all.force_mld_version=$SYSCTL_ALL_FORCE_MLD_VERSION + [ -n "$SYSCTL_FORCE_MLD_VERSION" ] && sysctl -q -w net.ipv6.conf.$(tst_iface).force_mld_version=$SYSCTL_FORCE_MLD_VERSION + [ -n "$SYSCTL_MLD_MAX_MSF" ] && sysctl -q -w net.ipv6.mld_max_msf=$SYSCTL_MLD_MAX_MSF } mcast_cleanup()