Skip to content

Commit

Permalink
qmp_basic: fix the return results of the memsave command
Browse files Browse the repository at this point in the history
The return result of the memsave command
has changed from qemu-kvm-9.1

Signed-off-by: Yiqian Wei <[email protected]>
  • Loading branch information
yiqianwei authored and yanan-fu committed Nov 15, 2024
1 parent c97ee92 commit dd54112
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions qemu/tests/qmp_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,18 @@ def argument_checker_suite(monitor):
resp = monitor.cmd_qmp(
"memsave", {"val": arg, "filename": "foo", "size": 10}
)
check_error_resp(
resp,
"GenericError",
"Invalid parameter type for 'val', expected: integer",
)
if utils_misc.compare_qemu_version(9, 1, 0, is_rhev=False) is True:
check_error_resp(
resp,
"GenericError",
"Parameter 'val' expects uint64",
)
else:
check_error_resp(
resp,
"GenericError",
"Invalid parameter type for 'val', expected: integer",
)

# value argument must be a json-number
for arg in ({}, [], True, "foo"):
Expand Down

0 comments on commit dd54112

Please sign in to comment.