From patchwork Thu Sep 10 02:30:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feiyu Zhu X-Patchwork-Id: 1361141 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bn2wC47SDz9sTd for ; Thu, 10 Sep 2020 12:32:11 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B72B73C2CE0 for ; Thu, 10 Sep 2020 04:32:04 +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]) by picard.linux.it (Postfix) with ESMTP id 533423C224B for ; Thu, 10 Sep 2020 04:32:03 +0200 (CEST) Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by in-6.smtp.seeweb.it (Postfix) with ESMTP id 47F22140115A for ; Thu, 10 Sep 2020 04:32:01 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.76,411,1592841600"; d="scan'208";a="99077141" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 10 Sep 2020 10:31:59 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 7408B48990EA for ; Thu, 10 Sep 2020 10:31:59 +0800 (CST) Received: from RHEL74GA.g08.fujitsu.local (10.167.220.75) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 10 Sep 2020 10:31:58 +0800 From: Feiyu Zhu To: Date: Wed, 9 Sep 2020 22:30:28 -0400 Message-ID: <1599705028-12889-1-git-send-email-zhufy.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.220.75] X-ClientProxiedBy: G08CNEXCHPEKD05.g08.fujitsu.local (10.167.33.203) To G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) X-yoursite-MailScanner-ID: 7408B48990EA.A884C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zhufy.jy@cn.fujitsu.com X-Spam-Status: No, score=0.4 required=7.0 tests=KHOP_HELO_FCRDNS, SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.4 X-Virus-Scanned: clamav-milter 0.102.4 at in-6.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH v2] route{4, 6}-rmmod: Declare variables before using them 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" When running route4-rmmod case, it reports the following error: /opt/ltp/testcases/bin/route4-rmmod: line 100: lhost_module: unbound variable. It fails because "set -u" is used in .testcases/lib/cmdlib.sh and "set -u" treats unset variables and parameters as errors. Reviewed-by: Petr Vorel Signed-off-by: Feiyu Zhu --- testcases/network/stress/route/route4-rmmod | 3 +++ testcases/network/stress/route/route6-rmmod | 3 +++ 2 files changed, 6 insertions(+) diff --git a/testcases/network/stress/route/route4-rmmod b/testcases/network/stress/route/route4-rmmod index 5947bb3..7aa1958 100644 --- a/testcases/network/stress/route/route4-rmmod +++ b/testcases/network/stress/route/route4-rmmod @@ -125,6 +125,9 @@ do_setup() exit $TST_TOTAL fi + # The module name of the interface at the local host + lhost_module= + # Make sure to clean up do_cleanup diff --git a/testcases/network/stress/route/route6-rmmod b/testcases/network/stress/route/route6-rmmod index 73f26f2..765a57a 100644 --- a/testcases/network/stress/route/route6-rmmod +++ b/testcases/network/stress/route/route6-rmmod @@ -121,6 +121,9 @@ do_setup() exit $TST_TOTAL fi + # The module name of the interface at the local host + lhost_module= + # Make sure to clean up do_cleanup