Skip to content

Commit 6180958

Browse files
committed
block_with_iommu: expands the test case functionality
Expands the test case functionality, doing a simple i/o operation after checking the guest has boot up successfully and finally reboot the VM in all the cases. Signed-off-by: mcasquer <mcasquer@redhat.com>
1 parent 1f08acc commit 6180958

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

qemu/tests/block_with_iommu.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def run(test, params, env):
1212
1. Add "intel_iommu=on" to kernel line of q35 guest.
1313
2. Boot a guest with virtio-scsi with iommu_platform=on.
1414
3. Verify IOMMU enabled in the guest.
15-
4. Reload kernel then reboot guest.
15+
4. Execute a simple I/O in the disk
16+
5. Reload kernel then reboot guest.
1617
1718
:param test: QEMU test object.
1819
:param params: Dictionary with the test parameters.
@@ -60,6 +61,10 @@ def verify_iommu_enabled():
6061
session = vm.wait_for_login(timeout=360)
6162
verify_iommu_enabled()
6263

64+
session.cmd(params.get("dd_cmd"))
65+
6366
if params.get("reload_kernel_cmd"):
6467
reload_kernel(session)
65-
vm.reboot(session)
68+
69+
session = vm.reboot(session, timeout=360)
70+
session.cmd(params.get("dd_cmd"))

qemu/tests/cfg/block_with_iommu.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
virtio_dev_disable_modern = off
1919
check_key_words = "DMAR: IOMMU enabled;"
2020
check_key_words += "DMAR: Intel(R) Virtualization Technology for Directed I/O"
21+
dd_cmd = "dd if=/dev/urandom of=/home/dd_test oflag=direct bs=1M count=10"
2122
variants:
2223
- @default:
2324
- reload_kernel:

0 commit comments

Comments
 (0)