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 4D636A09E5; Tue, 8 Dec 2020 11:04:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE498C9C0; Tue, 8 Dec 2020 11:03:58 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8F12E98 for ; Tue, 8 Dec 2020 11:03:56 +0100 (CET) IronPort-SDR: q5uNilSwa9ELR6zpcPhJH/8IeN/PzuHiqx0A6DHxq0EdQ+A3eNxVWZZD6YEqiAYlJkJaEGzTCj mrHG7v3BKHqA== X-IronPort-AV: E=McAfee;i="6000,8403,9828"; a="171293410" X-IronPort-AV: E=Sophos;i="5.78,402,1599548400"; d="scan'208";a="171293410" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 02:03:56 -0800 IronPort-SDR: gGM/yZHAs0+pMX8HhOYYlgGVNMR/iAfp7LabnpVAw6YPSUQDKGcytwkXEpOqegvSR3tSi64EQK Ew0FsmKz+pWg== X-IronPort-AV: E=Sophos;i="5.78,402,1599548400"; d="scan'208";a="363575793" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 02:03:54 -0800 From: Zhou Jun To: dts@dpdk.org Cc: Zhou Jun Date: Tue, 8 Dec 2020 18:06:14 +0800 Message-Id: <20201208100627.9792-16-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201208100627.9792-1-junx.w.zhou@intel.com> References: <20201208100627.9792-1-junx.w.zhou@intel.com> Subject: [dts] [dts 15/28] tests/TestSuite_multiprocess:Modify the hard coded app parameter to call the platform interface 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" Signed-off-by: Zhou Jun --- tests/TestSuite_multiprocess.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py index d38123ad..743ca1f3 100644 --- a/tests/TestSuite_multiprocess.py +++ b/tests/TestSuite_multiprocess.py @@ -87,6 +87,7 @@ class TestMultiprocess(TestCase): for i in self.dut_ports: self.eal_param += " -w %s" % self.dut.ports_info[i]['pci'] + self.eal_para = self.dut.create_eal_parameters(cores='1S/2C/1T') # start new session to run secondary self.session_secondary = self.dut.new_session() @@ -113,12 +114,12 @@ class TestMultiprocess(TestCase): # Send message from secondary to primary cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket) coremask = utils.create_mask(cores) - self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=primary" % (coremask), + self.dut.send_expect(self.app_simple_mp + " %s --proc-type=primary" % (self.eal_para), "Finished Process Init", 100) time.sleep(20) coremask = hex(int(coremask, 16) * 0x10).rstrip("L") self.session_secondary.send_expect( - self.app_simple_mp + " -n 1 -c %s --proc-type=secondary" % (coremask), "Finished Process Init", + self.app_simple_mp + " %s --proc-type=secondary" % (self.eal_para), "Finished Process Init", 100) self.session_secondary.send_expect("send hello_primary", ">") @@ -130,10 +131,10 @@ class TestMultiprocess(TestCase): cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket) coremask = utils.create_mask(cores) self.session_secondary.send_expect( - self.app_simple_mp + " -n 1 -c %s --proc-type=primary " % (coremask), "Finished Process Init", 100) + self.app_simple_mp + " %s --proc-type=primary " % (self.eal_para), "Finished Process Init", 100) time.sleep(20) coremask = hex(int(coremask, 16) * 0x10).rstrip("L") - self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=secondary" % (coremask), + self.dut.send_expect(self.app_simple_mp + " %s --proc-type=secondary" % (self.eal_para), "Finished Process Init", 100) self.session_secondary.send_expect("send hello_secondary", ">") out = self.dut.get_session_output() @@ -150,11 +151,11 @@ class TestMultiprocess(TestCase): cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket) coremask = utils.create_mask(cores) - self.session_secondary.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=primary" % (coremask), + self.session_secondary.send_expect(self.app_simple_mp + " %s --proc-type=primary" % (self.eal_para), "Finished Process Init", 100) time.sleep(20) coremask = hex(int(coremask, 16) * 0x10).rstrip("L") - self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=secondary" % (coremask), + self.dut.send_expect(self.app_simple_mp + " %s --proc-type=secondary" % (self.eal_para), "Finished Process Init", 100) stringsSent = 0 for line in open('/usr/share/dict/words', 'r').readlines(): @@ -176,13 +177,13 @@ class TestMultiprocess(TestCase): # Send message from secondary to primary (auto process type) cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket) coremask = utils.create_mask(cores) - out = self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=auto " % (coremask), + out = self.dut.send_expect(self.app_simple_mp + " %s --proc-type=auto " % (self.eal_para), "Finished Process Init", 100) self.verify("EAL: Auto-detected process type: PRIMARY" in out, "The type of process (PRIMARY) was not detected properly") time.sleep(20) coremask = hex(int(coremask, 16) * 0x10).rstrip("L") out = self.session_secondary.send_expect( - self.app_simple_mp + " -n 1 -c %s --proc-type=auto" % (coremask), "Finished Process Init", 100) + self.app_simple_mp + " %s --proc-type=auto" % (self.eal_para), "Finished Process Init", 100) self.verify("EAL: Auto-detected process type: SECONDARY" in out, "The type of process (SECONDARY) was not detected properly") @@ -196,11 +197,11 @@ class TestMultiprocess(TestCase): cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket) coremask = utils.create_mask(cores) out = self.session_secondary.send_expect( - self.app_simple_mp + " -n 1 -c %s --proc-type=auto" % (coremask), "Finished Process Init", 100) + self.app_simple_mp + " %s --proc-type=auto" % (self.eal_para), "Finished Process Init", 100) self.verify("EAL: Auto-detected process type: PRIMARY" in out, "The type of process (PRIMARY) was not detected properly") time.sleep(20) coremask = hex(int(coremask, 16) * 0x10).rstrip("L") - out = self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s --proc-type=auto" % (coremask), + out = self.dut.send_expect(self.app_simple_mp + " %s --proc-type=auto" % (self.eal_para), "Finished Process Init", 100) self.verify("EAL: Auto-detected process type: SECONDARY" in out, "The type of process (SECONDARY) was not detected properly") self.session_secondary.send_expect("send hello_secondary", ">", 100) @@ -218,10 +219,10 @@ class TestMultiprocess(TestCase): cores = self.dut.get_core_list('1S/2C/1T', socket=self.socket) coremask = utils.create_mask(cores) - self.session_secondary.send_expect(self.app_simple_mp + " -n 1 -c %s -m 64" % (coremask), + self.session_secondary.send_expect(self.app_simple_mp + " %s -m 64" % (self.eal_para), "Finished Process Init", 100) coremask = hex(int(coremask, 16) * 0x10).rstrip("L") - out = self.dut.send_expect(self.app_simple_mp + " -n 1 -c %s" % (coremask), "# ", 100) + out = self.dut.send_expect(self.app_simple_mp + " %s" % (self.eal_para), "# ", 100) self.verify("Is another primary process running" in out, "No other primary process detected") -- 2.17.1