Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1594748ybp; Fri, 4 Oct 2019 18:07:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwe/xIbLi4U7zZs3EZGincuA7+EbMftX9IKvtRZpgwDijC7THfoH6pJzQ8nCSZJKK0UGx8Z X-Received: by 2002:a17:906:f846:: with SMTP id ks6mr15081346ejb.192.1570237638768; Fri, 04 Oct 2019 18:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570237638; cv=none; d=google.com; s=arc-20160816; b=y6KuK3D2EGRU028pwdd79dqXKUkCMEeWDEBryvp6xxjjuhiqTzAEUYWNBfQ9hLey+Y 4AUDpBTuew++a+tl/FWO9qoW3DB8OlvY5SVuC+pfOk0gOjz0MDYGl3R9NfatMjdYy2pZ MESRwEKIfMzMwUZvA5MJWb7jCTy6/McM/Mm35TVPCQeHtILBF3yfS4TW4A5gNctbzux6 I5CP8cPlhfQ+ElhyCVTBXKKhi4BuOMcRTX2MOl0R9XePDkCpxJ1iXEdD2Mlgb46B0s9E ERD/DALsP/Me35iDayHofdqNKnu7c9GSPAS+mO6AgsKbZS3WiwP1yaBCawZE1Qfde+vt Su0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=169f9cvI84sxsl75RHwzbQOucR6xnC1li+ywxIeU3tE=; b=uWAi0zDDT9vfmjXMDvBSbOQ5wL4wMG+cEynpOyUwhfnKgBbd/nsmHIH61Pp5QBNDGe lQ53F8Vx7x21U1QOWb5uUw5VmTrq5jx//HGN5HCjdzNeq7Ivw7d+BUhFggc45fIRO3pZ M343D1ubw1pfES0Gcxoe/8LWyYQOsDU/EZQZLuE9w5KvvL8kAucveXdK9Hv4JUo5WCB9 cruQ23MFFMG8YxVpmcGT9axp6CBJii1APbOpY+1OWzgNvgD3Eyc0I+4XV9VlqlAD2mFT 7xV5Ydd/3F2u78ZETltcU54TBAKuENx5jcmLVW07n6+LrpmSLKC6/jRqRuORqjTDRtFD 2XWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23si4828386edb.208.2019.10.04.18.06.55; Fri, 04 Oct 2019 18:07:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726453AbfJEBGB convert rfc822-to-8bit (ORCPT + 99 others); Fri, 4 Oct 2019 21:06:01 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:3111 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbfJEBGB (ORCPT ); Fri, 4 Oct 2019 21:06:01 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.11]) by rmmx-syy-dmz-app12-12012 (RichMail) with SMTP id 2eec5d97ec641ed-bc085; Sat, 05 Oct 2019 09:05:40 +0800 (CST) X-RM-TRANSID: 2eec5d97ec641ed-bc085 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [10.0.0.249] (unknown[112.0.144.232]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee65d97ec619ac-e007b; Sat, 05 Oct 2019 09:05:40 +0800 (CST) X-RM-TRANSID: 2ee65d97ec619ac-e007b Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH v3 0/3] selftests: netfilter: introduce test cases for ipvs From: Haishuang Yan In-Reply-To: <20191004114745.GB6803@dimstar.local.net> Date: Sat, 5 Oct 2019 09:05:37 +0800 Cc: Julian Anastasov , Shuah Khan , Pablo Neira Ayuso , "David S. Miller" , Simon Horman , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <4C9C0C54-4CC6-49A4-A868-6F7604B1AB2B@cmss.chinamobile.com> References: <1569939599-1872-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <20191002012726.GB9810@dimstar.local.net> <8E2E81F3-8385-4397-9A22-F513E507507D@cmss.chinamobile.com> <20191004114745.GB6803@dimstar.local.net> To: Duncan Roe X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 2019??10??4??, at ????7:47, Duncan Roe wrote: > > On Thu, Oct 03, 2019 at 10:41:06PM +0800, Haishuang Yan wrote: >> >> >>> On 2019??10??2??, at ????9:27, Duncan Roe wrote: >>> >>> On Tue, Oct 01, 2019 at 09:34:13PM +0300, Julian Anastasov wrote: >>>> >>>> Hello, >>>> >>>> On Tue, 1 Oct 2019, Haishuang Yan wrote: >>>> >>>>> This series patch include test cases for ipvs. >>>>> >>>>> The test topology is who as below: >>>>> +--------------------------------------------------------------+ >>>>> | | | >>>>> | ns0 | ns1 | >>>>> | ----------- | ----------- ----------- | >>>>> | | veth01 | --------- | veth10 | | veth12 | | >>>>> | ----------- peer ----------- ----------- | >>>>> | | | | | >>>>> | ----------- | | | >>>>> | | br0 | |----------------- peer |--------------| >>>>> | ----------- | | | >>>>> | | | | | >>>>> | ---------- peer ---------- ----------- | >>>>> | | veth02 | --------- | veth20 | | veth12 | | >>>>> | ---------- | ---------- ----------- | >>>>> | | ns2 | >>>>> | | | >>>>> +--------------------------------------------------------------+ >>>>> >>>>> Test results: >>>>> # selftests: netfilter: ipvs.sh >>>>> # Testing DR mode... >>>>> # Testing NAT mode... >>>>> # Testing Tunnel mode... >>>>> # ipvs.sh: PASS >>>>> ok 6 selftests: netfilter: ipvs.sh >>>>> >>>>> Haishuang Yan (3): >>>>> selftests: netfilter: add ipvs test script >>>>> selftests: netfilter: add ipvs nat test case >>>>> selftests: netfilter: add ipvs tunnel test case >>>> >>>> Acked-by: Julian Anastasov >>>> >>>>> tools/testing/selftests/netfilter/Makefile | 2 +- >>>>> tools/testing/selftests/netfilter/ipvs.sh | 234 +++++++++++++++++++++++++++++ >>>>> 2 files changed, 235 insertions(+), 1 deletion(-) >>>>> create mode 100755 tools/testing/selftests/netfilter/ipvs.sh >>>> >>>> Regards >>>> >>>> -- >>>> Julian Anastasov >>> >>> I still prefer #!/bin/sh in 1/3. You never know what's in someone's environment >>> >>> Cheers ... Duncan. >>> >> >> It??s also my preference too. "_" >> >> I have tested both #!/bin/bash and #!/bin/sh script, they all works properly. > > Enter these 2 lines: >> ip(){ return 0; } >> export -f ip > > Now try the #!/bin/bash script. If that now fails, try again with #!/bin/bash > changed to #!/bin/bash -p > > Any better now? > > Cheers ... Duncan. > It??s better now, thanks for your explanation. In v3 commit I will use #!/bin/bash -p to prevent exporting function from environment variables.