From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84336A0471 for ; Tue, 13 Aug 2019 09:33:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4ED611BDFD; Tue, 13 Aug 2019 09:33:13 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C9DDF5681 for ; Tue, 13 Aug 2019 09:33:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2019 00:33:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,380,1559545200"; d="scan'208";a="200395348" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.119.68]) by fmsmga004.fm.intel.com with ESMTP; 13 Aug 2019 00:33:10 -0700 From: lihong To: dts@dpdk.org Cc: lihong Date: Tue, 13 Aug 2019 08:10:01 +0800 Message-Id: <1565655001-32368-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] tests/vhost_virtio_user_interrupt: optimization code 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 1. flush buffer before launch l3fwd-power 2. add -w param when start testpmd Signed-off-by: lihong --- tests/TestSuite_vhost_virtio_user_interrupt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py index 6713590..5422e04 100644 --- a/tests/TestSuite_vhost_virtio_user_interrupt.py +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py @@ -96,6 +96,7 @@ class TestVirtioUserInterrupt(TestCase): " -P --config='(0,0,%s)' --parse-ptype " cmd_l3fwd = cmd_l3fwd % (self.mem_channel, self.core_mask_l3fwd, path, self.core_interrupt) + self.l3fwd.get_session_before(timeout=2) self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40) time.sleep(10) out = self.l3fwd.get_session_before() @@ -108,6 +109,9 @@ class TestVirtioUserInterrupt(TestCase): """ start testpmd on vhost side """ + if len(pci) == 0: + pci_info = self.dut.ports_info[self.dut_ports[0]]['pci'] + pci = '-w %s' % pci_info cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \ "--socket-mem 1024,1024 --legacy-mem %s " + \ "--file-prefix=vhost " + \ @@ -143,8 +147,8 @@ class TestVirtioUserInterrupt(TestCase): elif status == "sleeps": info = "lcore %s sleeps until interrupt triggers" info = info % self.core_interrupt - self.logger.info(info) self.verify(info in out, "The CPU status not right for %s" % info) + self.logger.info(info) def check_virtio_side_link_status(self, status): out = self.virtio.send_expect("show port info 0", "testpmd> ", 20) -- 2.7.4