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 B79D5A0350; Mon, 11 May 2020 06:53:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DCB31C1BE; Mon, 11 May 2020 06:53:24 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D95ED1C014 for ; Mon, 11 May 2020 06:53:22 +0200 (CEST) IronPort-SDR: mnGl2UxABKQ0HH/XFqOWL9sGPYKF3E9yWvSlzwwia6m0yjeSXAUSmmtAW8ZDUnprZh8EA/CcF0 Lc3/woMOH3qg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2020 21:53:21 -0700 IronPort-SDR: OmyuMScmIY+CjdpiWXg1AJ5WDDsIsBgGNzbsEVePwTe8gMd1oAddhOi4Gmf/UYlNoLrfSWZFZf AizS84/daMpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,378,1583222400"; d="scan'208";a="306069758" Received: from dpdk-yinan-purley.sh.intel.com ([10.67.116.150]) by FMSMGA003.fm.intel.com with ESMTP; 10 May 2020 21:53:20 -0700 From: Yinan To: dts@dpdk.org Cc: Wang Yinan Date: Sun, 10 May 2020 21:47:12 +0000 Message-Id: <20200510214712.48161-1-yinan.wang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v1] tests: Skip LM active status check since LM can be completed in a moment 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" From: Wang Yinan Signed-off-by: Wang Yinan --- tests/TestSuite_vhost_user_live_migration.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py index cb6789c..ed58901 100644 --- a/tests/TestSuite_vhost_user_live_migration.py +++ b/tests/TestSuite_vhost_user_live_migration.py @@ -84,8 +84,6 @@ class TestVhostUserLiveMigration(TestCase): backup_socket_num = len(set([int(core['socket']) for core in self.backup_dut.cores])) self.host_socket_mem = ','.join(['1024']*host_socket_num) self.backup_socket_mem = ','.join(['1024']*backup_socket_num) - self.backup_speed = self.dut.skip_setup - self.flag_compiled = False def set_up(self): self.host_dut.send_expect('rm ./vhost-net*', '# ', 30) @@ -170,8 +168,6 @@ class TestVhostUserLiveMigration(TestCase): """ Create testing environment on Host and Backup """ - if self.flag_compiled: - self.dut.skip_setup = True try: # set up host virtual machine self.host_vm = VM(self.duts[0], 'host', '%s' % self.suite_name) @@ -193,8 +189,6 @@ class TestVhostUserLiveMigration(TestCase): if self.vm_dut_host is None: raise Exception("Set up host VM ENV failed!") - self.flag_compiled = True - self.logger.info("Start virtual machine on backup host") # set up backup virtual machine self.backup_vm = VM(self.duts[1], 'backup', 'vhost_user_live_migration') @@ -236,8 +230,8 @@ class TestVhostUserLiveMigration(TestCase): try: if self.backup_vm is not None: if self.migration_done: - self.vm_dut_backup.kill_all() self.vm_dut_backup.send_expect('pkill screen', '# ') + self.vm_dut_backup.kill_all() self.backup_vm.stop() self.backup_vm = None except Exception as e: @@ -320,7 +314,6 @@ class TestVhostUserLiveMigration(TestCase): vm_dut.send_expect('export TERM=screen', '# ') vm_dut.send_command('screen -r %s' % self.screen_name) # clean the output info before verify - vm_dut.get_session_output(timeout=1) time.sleep(5) out = vm_dut.get_session_output(timeout=1) print(out) @@ -332,12 +325,10 @@ class TestVhostUserLiveMigration(TestCase): def start_tcpdump_on_vm(self, vm_dut): vm_dut.send_expect('export TERM=screen', '# ') vm_dut.send_expect('screen -S %s' % self.screen_name, '# ', 120) - # get host interface vm_intf = vm_dut.ports_info[0]['port'].get_interface_name() # start tcpdump the interface vm_dut.send_expect("ifconfig %s up" % vm_intf, "# ") - direct_pat = re.compile(r"(\s+)\[ (\S+) in\|out\|inout \]") vm_dut.send_expect("tcpdump -h", "# ") out = vm_dut.get_session_output(timeout=1) @@ -367,9 +358,7 @@ class TestVhostUserLiveMigration(TestCase): self.logger.info("Migrate host VM to backup host") # start live migration - ret = self.host_vm.start_migration(self.backup_dut_ip, self.backup_vm.migrate_port) - self.verify(ret, "Failed to migration, please check VM and qemu version") - + self.host_vm.start_migration(self.backup_dut_ip, self.backup_vm.migrate_port) if multi_queue is True: vm_intf = self.vm_dut_host.ports_info[0]['port'].get_interface_name() out = self.vm_dut_host.send_expect('ethtool -L %s combined 4' % vm_intf, '# ') @@ -378,6 +367,7 @@ class TestVhostUserLiveMigration(TestCase): self.logger.info("Waiting migration process done") # wait live migration done self.host_vm.wait_migration_done() + self.migration_done = True self.logger.info("Migration process done, then go to backup VM") @@ -396,12 +386,10 @@ class TestVhostUserLiveMigration(TestCase): self.launch_testpmd_as_vhost_on_both_dut() self.start_testpmd_with_fwd_mode_on_both_dut() self.setup_vm_env_on_both_dut() - # bind virtio-net back to virtio-pci self.bind_nic_driver_of_vm(self.vm_dut_host, driver="") # start screen and tcpdump on vm self.start_tcpdump_on_vm(self.vm_dut_host) - self.send_and_verify(self.verify_kernel) def test_adjust_split_ring_virtio_net_queue_numbers_while_migreting_with_virtio_net(self): @@ -421,7 +409,6 @@ class TestVhostUserLiveMigration(TestCase): self.launch_testpmd_as_vhost_on_both_dut() self.start_testpmd_with_fwd_mode_on_both_dut() self.setup_vm_env_on_both_dut() - # bind virtio-net to igb_uio self.bind_nic_driver_of_vm(self.vm_dut_host, driver="igb_uio") self.start_testpmd_on_vm(self.vm_dut_host) @@ -510,5 +497,4 @@ class TestVhostUserLiveMigration(TestCase): pass def tear_down_all(self): - self.dut.skip_setup = self.backup_speed pass -- 2.17.1