Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtiofs: Reboot vm during virtiofs is working #4221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions qemu/tests/cfg/virtio_fs_share_data.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions qemu/tests/virtio_fs_share_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading