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

qemu_guest_agent: Report message changed for api qga-freeze #4154

Merged
Merged
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
10 changes: 8 additions & 2 deletions qemu/tests/qemu_guest_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2600,13 +2600,19 @@ def gagent_check_freeze_frozen(self, test, params, env):
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
# Since Qemu9.1, the report message changes.
qga_ver = self.gagent.guest_info()["version"].split('.')
main_qga_ver = float("{}.{}".format(qga_ver[0], qga_ver[1]))
expected = (
"Command guest-fsfreeze-freeze has been disabled: "
f"{'the command is not allowed' if 9.1 <= main_qga_ver or main_qga_ver >= 109.0 else 'the agent is in frozen state'}"
)

self.gagent.fsfreeze()
error_context.context("Freeze the frozen FS", LOG_JOB.info)
try:
self.gagent.fsfreeze(check_status=False)
except guest_agent.VAgentCmdError as e:
expected = ("Command guest-fsfreeze-freeze has been disabled: "
"the agent is in frozen state")
if expected not in e.edata["desc"]:
test.fail(e)
else:
Expand Down
Loading