virttest: handle failed qmp_cmds without crashing - #4351
bssrikanth wants to merge 1 commit into
Conversation
|
Before fix: After fix: |
There was a problem hiding this comment.
Code Review
This pull request enhances the QMP command discovery process in virttest/qemu_devices/qcontainer.py. It introduces explicit logging when QMP commands are unparsable or missing and adds a safety check in has_qmp_cmd to handle empty command lists. I have no feedback to provide.
get_qmp_cmds could return None when the query-commands probe produced no parseable output, so has_qmp_cmd did cmd in None and raised TypeError. Always return a list (empty on failure), log a warning, and treat an empty command set as unsupported so capability checks return false instead of crashing. Signed-off-by: Srikanth Aithal <sraithal@amd.com>
|
Closing this PR due to current team constraints. This is part of a broader effort to triage all in-flight work across our upstream repos. If this work is still needed, please feel free to reopen and it will be picked up. Apologies for any inconvenience. |
|
I dont have permission to reopen. This PR is fixing a issue in the framework, I would appreciate if this fix gets in. In anyway I could help here I will be happy to help. |
get_qmp_cmds could return None when the query-commands probe produced no parseable output, so has_qmp_cmd did cmd in None and raised TypeError.
Always return a list (empty on failure), log a warning, and treat an empty command set as unsupported so capability checks return false instead of crashing.