From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id C20681B729 for ; Tue, 17 Oct 2017 09:44:04 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id f4so1954080wme.0 for ; Tue, 17 Oct 2017 00:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mGIVXtxfLPG1bQ/GQ0S+2lr44Dkp7lscbs6eUPTG6FM=; b=K/QbrFc84+hItJEpBvvy7L1IxtYQjrxKy9IKKPjX0zl7dRHqQvKTB95gTVrP+NqGQz TyxLiOa1MIlBdHgcswm1ueCAN7udubdq5sKYLTPMSXucK+lSSOznwJ98K7wcmc94yjQy Ws0TVa29dduppL+2REhxwG/aQJfbmV8qg/y3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mGIVXtxfLPG1bQ/GQ0S+2lr44Dkp7lscbs6eUPTG6FM=; b=T1tPbpARKFq4sAjrH/26jVFUak4JhX8B2p+/fn3JaYHTSPsr6CrKs+d53N4p949qkh Fr/lW96gSI4MWf1Z7GSOVQpB0noSqAyLrR4x+pdJ+BptFSyQrrQxlW1DGHJzHHBUYMV6 pW09mBkxpgq6X2FSiKOIecueHE+ge2+kGMabGyJw9fZnmCtBzSLr1BaoRw0fyWr46axt YjUfsYXEoGcDIcbJ/kq6RPScBTUC+Gtob85oM3EelkYVwDoe39wqtZtsxJhdVxts7CvZ ENiO1mSpK+L8SxkmReURvgL41K8ffpcgPWv4xdHyrIxas6mbTKxVuhfQgQF8NqTHa4Y0 ujgg== X-Gm-Message-State: AMCzsaWiD7KJwYzsMl8n650xbXgV45Jy4qCtCk9Jp/b9tW/ADL6vdQeR 0F6DVzmIcQvrzc9JMwq8XHlaldNoQEpB1UCnIWqd2g== X-Google-Smtp-Source: AOwi7QDJy7J1bJE8+BriOSb4LtxWYX6saggLYAUxVWioz4Ohy6OGv30gEEnccJRIV6luhzgyE4xr0dBtqDXNRrf2if4= X-Received: by 10.80.168.70 with SMTP id j64mr16393104edc.287.1508226244186; Tue, 17 Oct 2017 00:44:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.159.238 with HTTP; Tue, 17 Oct 2017 00:44:03 -0700 (PDT) In-Reply-To: <1508149361-7628-1-git-send-email-phil.yang@arm.com> References: <1508149361-7628-1-git-send-email-phil.yang@arm.com> From: Jianbo Liu Date: Tue, 17 Oct 2017 15:44:03 +0800 Message-ID: To: Phil Yang Cc: dts@dpdk.org, nd@arm.com, Jianbo Liu , Herbert Guan , "xu,huilong" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dts] [PATCH] tests/hotplug: fix some failure cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 07:44:05 -0000 On 16 October 2017 at 18:22, Phil Yang wrote: > 1. Updated testpmd path for multiarch. > 2. Fix port binding timeout in tear-down process. > 3. Modified acceptance criteria to avoid test errors caused by > broadcast packets. > > Signed-off-by: Phil Yang > --- > tests/TestSuite_hotplug.py | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/tests/TestSuite_hotplug.py b/tests/TestSuite_hotplug.py > index 7704253..99d3f3b 100644 > --- a/tests/TestSuite_hotplug.py > +++ b/tests/TestSuite_hotplug.py > @@ -69,8 +69,8 @@ class TestPortHotPlug(TestCase): > """ > attach port > """ > - # dpdk hotplug discern NIC by pci bus not include domid > - self.dut.send_expect("port attach %s" % self.dut.ports_info[port]['pci'][len("0000:"):],"is attached",60) > + # dpdk hotplug discern NIC by pci bus and include domid > + self.dut.send_expect("port attach %s" % self.dut.ports_info[port]['pci'],"is attached",60) > self.dut.send_expect("port start %s" % port,"Configuring Port",120) > # sleep 10 seconds for fortville update link stats > time.sleep(10) > @@ -90,7 +90,7 @@ class TestPortHotPlug(TestCase): > """ > first run testpmd after attach port > """ > - cmd = "./x86_64-native-linuxapp-gcc/app/testpmd -c %s -n %s -- -i" % (self.coremask,self.dut.get_memory_channels()) > + cmd = "./%s/app/testpmd -c %s -n %s -- -i" % (self.target,self.coremask,self.dut.get_memory_channels()) > self.dut.send_expect(cmd,"testpmd>",60) > session_secondary = self.dut.new_session() > session_secondary.send_expect("./usertools/dpdk-devbind.py --bind=igb_uio %s" % self.dut.ports_info[self.port]['pci'], "#", 60) > @@ -104,11 +104,12 @@ class TestPortHotPlug(TestCase): > > self.dut.send_expect("start","testpmd>",60) > self.dut.send_expect("port detach %s" % self.port,"Please close port first",60) > + self.dut.send_expect("clear port stats %s" % self.port ,"testpmd>",60) > self.send_packet(self.port) > out = self.dut.send_expect("show port stats %s" % self.port ,"testpmd>",60) > packet = re.search("RX-packets:\s*(\d*)",out) > sum_packet = packet.group(1) > - self.verify(int(sum_packet) == 1, "Insufficient the received package") > + self.verify(int(sum_packet) > 0, "Insufficient the received package") Maybe it's environment issue, you should still check the packet number == 1. > self.dut.send_expect("quit","#",60) > > def send_packet(self, port): > @@ -129,17 +130,19 @@ class TestPortHotPlug(TestCase): > session_secondary = self.dut.new_session() > session_secondary.send_expect("./usertools/dpdk-devbind.py --bind=igb_uio %s" % self.dut.ports_info[self.port]['pci'], "#", 60) > self.dut.close_session(session_secondary) > - cmd = "./x86_64-native-linuxapp-gcc/app/testpmd -c %s -n %s -- -i" % (self.coremask,self.dut.get_memory_channels()) > + cmd = "./%s/app/testpmd -c %s -n %s -- -i" % (self.target,self.coremask,self.dut.get_memory_channels()) > self.dut.send_expect(cmd,"testpmd>",60) > self.detach(self.port) > self.attach(self.port) > + > self.dut.send_expect("start","testpmd>",60) > self.dut.send_expect("port detach %s" % self.port, "Please close port first",60) > + self.dut.send_expect("clear port stats %s" % self.port ,"testpmd>",60) > self.send_packet(self.port) > out = self.dut.send_expect("show port stats %s" % self.port ,"testpmd>",60) > packet = re.search("RX-packets:\s*(\d*)",out) > sum_packet = packet.group(1) > - self.verify(int(sum_packet) == 1, "Insufficient the received package") > + self.verify(int(sum_packet) > 0, "Insufficient the received package") > self.dut.send_expect("quit","#",60) > > > @@ -147,8 +150,8 @@ class TestPortHotPlug(TestCase): > """ > Run after each test case. > """ > - self.dut.send_expect("./usertools/dpdk-devbind.py --bind=igb_uio %s" % self.dut.ports_info[self.port]['pci'],"#",60) > self.dut.kill_all() > + self.dut.send_expect("./usertools/dpdk-devbind.py --bind=igb_uio %s" % self.dut.ports_info[self.port]['pci'],"#",60) I think you should consider vfio-pci as well. > time.sleep(2) > > > -- > 2.7.4 >