From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id F13B06787 for ; Tue, 27 Oct 2015 08:41:18 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 27 Oct 2015 00:41:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,203,1444719600"; d="scan'208";a="672503299" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.12]) by orsmga003.jf.intel.com with ESMTP; 27 Oct 2015 00:41:18 -0700 From: "xu,huilong" To: dts@dpdk.org Date: Tue, 27 Oct 2015 15:36:43 +0800 Message-Id: <1445931412-86352-4-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1445931412-86352-1-git-send-email-huilongx.xu@intel.com> References: <1445931412-86352-1-git-send-email-huilongx.xu@intel.com> Subject: [dts] [03/12] add test start time and exec cmd time for dump unit test 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, 27 Oct 2015 07:41:19 -0000 Signed-off-by: xu,huilong --- tests/TestSuite_unit_tests_dump.py | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py index ce04439..2052cb4 100644 --- a/tests/TestSuite_unit_tests_dump.py +++ b/tests/TestSuite_unit_tests_dump.py @@ -62,6 +62,8 @@ class TestUnitTestsDump(TestCase): # Based on h/w type, choose how many ports to use self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing") + self.start_test_time = 60 + self.run_cmd_time = 60 def set_up(self): """ @@ -74,8 +76,8 @@ class TestUnitTestsDump(TestCase): """ Run history log dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_log_history", "RTE>>", 120) + self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_log_history", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") self.verify("EAL" in out, "Test failed") @@ -83,8 +85,8 @@ class TestUnitTestsDump(TestCase): """ Run history log dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_ring", "RTE>>", 120) + self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_ring", "RTE>>", self.run_cmd_time) self.dut.send_expect("quit", "# ") elements = ['ring', 'address', 'flags', 'size', 'ct', 'ch', 'pt', 'ph', 'used', 'avail', 'watermark'] match_regex = "ring <(.*?)>@0x(.*)\r\n" @@ -100,8 +102,8 @@ class TestUnitTestsDump(TestCase): """ Run mempool dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_mempool", "RTE>>", 120) + self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_mempool", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") elements = ['mempool', 'address', 'flags', 'ring', 'phys_addr', 'size', 'header_size', 'elt_size', 'trailer_size', 'total_obj_size', 'private_data_size', 'pg_num', 'pg_shift', 'pg_mask', @@ -120,8 +122,8 @@ class TestUnitTestsDump(TestCase): """ Run physical memory dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_physmem", "RTE>>", 120) + self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_physmem", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") elements = ['Segment', 'phys', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank'] match_regex = "Segment (\d)+:" @@ -140,8 +142,8 @@ class TestUnitTestsDump(TestCase): """ Run memzone dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_memzone", "RTE>>", 120) + self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_memzone", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") elements = ['Zone', 'name', 'phys', 'len', 'virt', 'socket_id', 'flags'] @@ -162,8 +164,8 @@ class TestUnitTestsDump(TestCase): """ Run struct size dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_struct_sizes", "RTE>>", 120) + self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_struct_sizes", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") elements = ['struct rte_mbuf', 'struct rte_mempool', 'struct rte_ring'] @@ -181,15 +183,15 @@ class TestUnitTestsDump(TestCase): """ test_port = self.dut_ports[0] self.dut.send_expect("./%s/app/test -n 1 -c ffff -b 0000:%s" - % (self.target, self.dut.ports_info[test_port]['pci']), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_devargs", "RTE>>", 120) + % (self.target, self.dut.ports_info[test_port]['pci']), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_devargs", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") black_str = "PCI blacklist 0000:%s" % self.dut.ports_info[test_port]['pci'] self.verify(black_str in out, "Dump black list failed") self.dut.send_expect("./%s/app/test -n 1 -c ffff -w 0000:%s" - % (self.target, self.dut.ports_info[test_port]['pci']), "R.*T.*E.*>.*>", 10) - out = self.dut.send_expect("dump_devargs", "RTE>>", 120) + % (self.target, self.dut.ports_info[test_port]['pci']), "R.*T.*E.*>.*>", self.start_test_time) + out = self.dut.send_expect("dump_devargs", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") white_str = "PCI whitelist 0000:%s" % self.dut.ports_info[test_port]['pci'] -- 1.9.3