diff --git a/qemu/tests/cfg/virtio_fs_share_data.cfg b/qemu/tests/cfg/virtio_fs_share_data.cfg index da2080a67a..26966245cb 100644 --- a/qemu/tests/cfg/virtio_fs_share_data.cfg +++ b/qemu/tests/cfg/virtio_fs_share_data.cfg @@ -71,6 +71,11 @@ only default.default.with_cache.auto.default reboot_guest = 'yes' cmd_ps_virtiofsd = 'ps -eo pid,args |grep "socket-path=%s" |grep -v grep' + variants: + - with_system_reset: + reboot_method = system_reset + - with_shell: + reboot_method = shell - with_log_check: only Windows only default.default.with_cache.auto.default diff --git a/qemu/tests/virtio_fs_share_data.py b/qemu/tests/virtio_fs_share_data.py index 58ad7ccd6e..c69e0673b7 100644 --- a/qemu/tests/virtio_fs_share_data.py +++ b/qemu/tests/virtio_fs_share_data.py @@ -1016,20 +1016,24 @@ def get_vfsd_num(): vfsd_num += len(vfsd_ps.strip().splitlines()) return vfsd_num + reboot_method = params.get("reboot_method") + error_context.context( "Check virtiofs daemon before reboot vm.", test.log.info ) vfsd_num_bf = get_vfsd_num() + error_context.context( "Reboot guest and check virtiofs daemon.", test.log.info ) - session = vm.reboot(session) + session = vm.reboot(session, reboot_method) if not vm.is_alive(): test.fail("After rebooting vm quit unexpectedly.") vfsd_num_af = get_vfsd_num() if vfsd_num_bf != vfsd_num_af: test.fail( - "Virtiofs daemon is different before and after reboot.\n" + "Virtiofs daemon is different before " + "and after reboot.\n" "Before reboot: %s\n" "After reboot: %s\n", (vfsd_num_bf, vfsd_num_af),