[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 18/18] vfio-user: avocado tests for vfio-user
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v5 18/18] vfio-user: avocado tests for vfio-user |
Date: |
Wed, 26 Jan 2022 05:25:13 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
Hi Jagannathan,
On 19/1/22 22:42, Jagannathan Raman wrote:
Avocado tests for libvfio-user in QEMU - tests startup,
hotplug and migration of the server object
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
---
MAINTAINERS | 1 +
tests/avocado/vfio-user.py | 225 +++++++++++++++++++++++++++++++++++++
2 files changed, 226 insertions(+)
create mode 100644 tests/avocado/vfio-user.py
+class VfioUser(QemuSystemTest):
+ """
+ :avocado: tags=vfiouser
+ """
+ KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
+ timeout = 20
+
+ @staticmethod
+ def migration_finished(vm):
+ res = vm.command('query-migrate')
+ if 'status' in res:
+ return res['status'] in ('completed', 'failed')
Do we need to check for failed migration in do_test_migrate()?
+ else:
+ return False
[...]
+ def launch_server_hotplug(self, socket):
+ server_vm = self.get_vm()
+ server_vm.add_args('-machine', 'x-remote')
+ server_vm.add_args('-nodefaults')
+ server_vm.add_args('-device', 'lsi53c895a,id=lsi1')
+ server_vm.launch()
+ server_vm.command('human-monitor-command',
+ command_line='object_add x-vfio-user-server,'
Why not use qmp('object-add', ...) directly?
+ 'id=vfioobj,socket.type=unix,'
+ 'socket.path='+socket+',device=lsi1')
+ return server_vm
Otherwise LGTM.
- [PATCH v5 12/18] vfio-user: run vfio-user context, (continued)
- [PATCH v5 12/18] vfio-user: run vfio-user context, Jagannathan Raman, 2022/01/19
- [PATCH v5 15/18] vfio-user: handle PCI BAR accesses, Jagannathan Raman, 2022/01/19
- [PATCH v5 14/18] vfio-user: handle DMA mappings, Jagannathan Raman, 2022/01/19
- [PATCH v5 16/18] vfio-user: handle device interrupts, Jagannathan Raman, 2022/01/19
- [PATCH v5 17/18] vfio-user: register handlers to facilitate migration, Jagannathan Raman, 2022/01/19
- [PATCH v5 18/18] vfio-user: avocado tests for vfio-user, Jagannathan Raman, 2022/01/19
- Re: [PATCH v5 18/18] vfio-user: avocado tests for vfio-user,
Philippe Mathieu-Daudé <=
- Re: [PATCH v5 00/18] vfio-user server in QEMU, Stefan Hajnoczi, 2022/01/25