From 9d9625192d5aebb4d2bc668cabf36ceb1abf3824 Mon Sep 17 00:00:00 2001
From: Zhu huankai <zhuhuankai1@huawei.com>
Date: Wed, 12 May 2021 15:00:29 +0800
Subject: [PATCH] testcases:virtio_blk: decrease hot plugged blk number

stratovirt supports only 4 block devices to hot plugged at present.

Signed-off-by: Zhu huankai <zhuhuankai1@huawei.com>
---
 .../microvm/functional/test_microvm_virtio_blk.py         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/hydropper/testcases/microvm/functional/test_microvm_virtio_blk.py b/tests/hydropper/testcases/microvm/functional/test_microvm_virtio_blk.py
index d93fe78..dea710d 100644
--- a/tests/hydropper/testcases/microvm/functional/test_microvm_virtio_blk.py
+++ b/tests/hydropper/testcases/microvm/functional/test_microvm_virtio_blk.py
@@ -66,14 +66,14 @@ def test_microvm_virtio_blk_at_dt(test_session_root_path, microvm, testtimes):
     """
     Test virtio-blk hotplug and unplug:
 
-    1) Generate 5 temp disks and add them to test_vm.
+    1) Generate 3 temp disks and add them to test_vm.
     2) Assert disks' name and size as expect.
     3) Delete temp disks from test_vm.
     4) Assert temp disks are deleted.
     """
     test_vm = microvm
     test_vm.launch()
-    disknum = 5
+    disknum = 3
     disklist = []
     for index in range(disknum):
         temp_disk = os.path.join(test_session_root_path, "test_image%d" % (index + 1))
@@ -90,7 +90,7 @@ def test_microvm_virtio_blk_at_dt(test_session_root_path, microvm, testtimes):
         blkinfo = test_vm.get_lsblk_info()
         logging.debug("blkinfo is %s", blkinfo)
 
-        for devid in ["vdb", "vdc", "vdd", "vde", "vdf"]:
+        for devid in ["vdb", "vdc", "vdd"]:
             assert devid in blkinfo
             assert blkinfo[devid]["size"] == "16M"
 
@@ -100,7 +100,7 @@ def test_microvm_virtio_blk_at_dt(test_session_root_path, microvm, testtimes):
             index += 1
 
         blkinfo = test_vm.get_lsblk_info()
-        for devid in ["vdb", "vdc", "vdd", "vde", "vdf"]:
+        for devid in ["vdb", "vdc", "vdd"]:
             assert devid not in blkinfo
 
 @pytest.mark.acceptance
-- 
2.25.1

