From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98EAF4287D; Fri, 31 Mar 2023 05:40:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 90EDF4113C; Fri, 31 Mar 2023 05:40:01 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 87323410D7 for ; Fri, 31 Mar 2023 05:40:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680234000; x=1711770000; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=nweFL/QdtxbxHoICUZtrNYmxErTTFOLGKt1YHO2Ma7I=; b=jkkWv/jEpuHBvtyxwKBzHZHctFt8WmAOHowVO/7mSxSGDXZfoFN4iwAE scGVPsciNQEyMhUT42/zGXyuQ8M5bjwMqLvOSvKOA6xClabfP/tc/LA5W 8VX8xMTeFpI4ORYlfyP4wRhKS2h+PowcBZxIIPLr0sQivTXkN7GYwZpDj fo1hm6ZTqJDCLlVhjA4z58NMe8I12paQvF1QF54614H+YMDPOEZKs1iPw kRJVFc/OR3W0JWG29rvmmZYx45fa5oHRExOTiWel5KzPlGhMK+z3L2OAL RKlOP5B6TxeJ3I5MJFDpA/HkhN4bFSxgK8UQo6VD2Mrvm2OZpTyqiEmBC w==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="325305675" X-IronPort-AV: E=Sophos;i="5.98,306,1673942400"; d="scan'208";a="325305675" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 20:39:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="774205828" X-IronPort-AV: E=Sophos;i="5.98,306,1673942400"; d="scan'208";a="774205828" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 20:39:58 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1] tests/vhost_user_live_migration: add 2 testcase sync with testplan Date: Fri, 31 Mar 2023 11:36:36 +0800 Message-Id: <20230331033636.1373154-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 Add testcase 2 and testcase 6 sync with testplan. Signed-off-by: Wei Ling --- tests/TestSuite_vhost_user_live_migration.py | 56 ++++++++++++++++---- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py index b566374f..d0e2889e 100644 --- a/tests/TestSuite_vhost_user_live_migration.py +++ b/tests/TestSuite_vhost_user_live_migration.py @@ -6,7 +6,6 @@ import os.path import re import time -import framework.utils as utils from framework.config import UserConf from framework.exception import VirtDutInitException from framework.settings import CONFIG_ROOT_PATH @@ -71,6 +70,10 @@ class TestVhostUserLiveMigration(TestCase): self.testpmd_name = self.testpmd_path.split("/")[-1] def set_up(self): + self.duts[0].send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.duts[1].send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.duts[0].send_expect("killall -s INT qemu-system-x86_64", "#") + self.duts[1].send_expect("killall -s INT qemu-system-x86_64", "#") self.host_dut.send_expect("rm ./vhost-net*", "# ", 30) self.backup_dut.send_expect("rm ./vhost-net*", "# ", 30) self.migration_done = False @@ -337,6 +340,8 @@ class TestVhostUserLiveMigration(TestCase): 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() + # sometimes return '\rens4', need replace '\r' to '' + vm_intf = vm_intf.replace("\r", "") # start tcpdump the interface vm_dut.send_expect("ifconfig %s up" % vm_intf, "# ") direct_pat = re.compile(r"(\s+)\[ (\S+) in\|out\|inout \]") @@ -394,10 +399,31 @@ class TestVhostUserLiveMigration(TestCase): # make sure still can receive packets verify_fun(self.vm_dut_backup) + def test_migrate_with_split_ring_virtio_pmd(self): + """ + Test Case 1: migrate with split ring virtio-pmd + """ + self.queue_number = 1 + self.launch_testpmd_as_vhost_on_both_dut() + self.start_testpmd_with_fwd_mode_on_both_dut() + self.setup_vm_env_on_both_dut() + self.start_testpmd_on_vm(self.vm_dut_host) + self.send_and_verify(self.verify_dpdk) + + def test_migrate_with_split_ring_virtio_pmd_enabled(self): + """ + Test Case 2: migrate with split ring virtio-pmd enabled + """ + self.queue_number = 1 + self.launch_testpmd_as_vhost_on_both_dut() + self.setup_vm_env_on_both_dut() + self.start_testpmd_on_vm(self.vm_dut_host) + self.start_testpmd_with_fwd_mode_on_both_dut() + self.send_and_verify(self.verify_dpdk) + def test_migrate_with_split_ring_virtio_net(self): """ - Verify migrate virtIO device from host to backup host, - Verify before/in/after migration, device with kernel driver can receive packets + Test Case 3: migrate with split ring virtio-net """ self.queue_number = 1 self.launch_testpmd_as_vhost_on_both_dut() @@ -412,6 +438,9 @@ class TestVhostUserLiveMigration(TestCase): def test_adjust_split_ring_virtio_net_queue_numbers_while_migreting_with_virtio_net( self, ): + """ + Test Case 4: adjust split ring virtio-net queue numbers while migrating with virtio-net + """ self.queue_number = 4 self.launch_testpmd_as_vhost_on_both_dut() self.start_testpmd_with_fwd_mode_on_both_dut() @@ -419,29 +448,33 @@ class TestVhostUserLiveMigration(TestCase): # bind virtio-net back to virtio-pci self.bind_nic_driver_of_vm(self.vm_dut_host, driver="") self.start_tcpdump_on_vm(self.vm_dut_host) - self.send_and_verify(self.verify_kernel, True) - def test_migrate_with_split_ring_virtio_pmd(self): + def test_migrate_with_packed_ring_virtio_pmd(self): + """ + Test Case 5: migrate with packed ring virtio-pmd + """ self.queue_number = 1 self.launch_testpmd_as_vhost_on_both_dut() self.start_testpmd_with_fwd_mode_on_both_dut() - self.setup_vm_env_on_both_dut() + self.setup_vm_env_on_both_dut(packed=True) self.start_testpmd_on_vm(self.vm_dut_host) self.send_and_verify(self.verify_dpdk) - def test_migrate_with_packed_ring_virtio_pmd(self): + def test_migrate_with_packed_ring_virtio_pmd_enabled(self): + """ + Test Case 6: migrate with packed ring virtio-pmd enabled + """ self.queue_number = 1 self.launch_testpmd_as_vhost_on_both_dut() - self.start_testpmd_with_fwd_mode_on_both_dut() self.setup_vm_env_on_both_dut(packed=True) self.start_testpmd_on_vm(self.vm_dut_host) + self.start_testpmd_with_fwd_mode_on_both_dut() self.send_and_verify(self.verify_dpdk) def test_migrate_with_packed_ring_virtio_net(self): """ - Verify migrate virtIO device from host to backup host, - Verify before/in/after migration, device with kernel driver can receive packets + Test Case 7: migrate with packed ring virtio-net """ self.queue_number = 1 self.launch_testpmd_as_vhost_on_both_dut() @@ -456,6 +489,9 @@ class TestVhostUserLiveMigration(TestCase): def test_adjust_packed_ring_virtio_net_queue_numbers_while_migreting_with_virtio_net( self, ): + """ + Test Case 8: adjust packed ring virtio-net queue numbers while migrating with virtio-net + """ self.queue_number = 4 self.launch_testpmd_as_vhost_on_both_dut() self.start_testpmd_with_fwd_mode_on_both_dut() -- 2.25.1