Skip to contentSkip to conversation

Python: minor fixes

PATCH Superseded John Snow 1 participant 3 messages Jan 18, 2022

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
author
#1 lore raw

PATCH 1/2 python/aqmp: Fix negotiation with pre-"oob" QEMU

QEMU versions prior to the "oob" capability *also* can't accept the "enable" keyword argument at all. Fix the handshake process with older QEMU versions.

---
 python/qemu/aqmp/qmp_client.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
python/qemu/aqmp/qmp_client.py +2 -2
index 8105e29fa8..6b43e1dbbe 100644
@@ -292,9 +292,9 @@ async def _negotiate(self) -> None:
         """
         self.logger.debug("Negotiating capabilities ...")
 
-        arguments: Dict[str, List[str]] = {'enable': []}
+        arguments: Dict[str, List[str]] = {}
         if self._greeting and 'oob' in self._greeting.QMP.capabilities:
-            arguments['enable'].append('oob')
+            arguments.setdefault('enable', []).append('oob')
         msg = self.make_execute_msg('qmp_capabilities', arguments=arguments)
 
         # It's not safe to use execute() here, because the reader/writers
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH 2/2 python: use avocado's "new" runner

In reply to John Snow

The old legacy runner no longer seems to work with output logging, so we can't see failure logs when a test case fails. The new runner doesn't (seem to) support Coverage.py yet, but seeing error output is a more important feature.

---
 python/avocado.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
python/avocado.cfg +1 -1
index c7722e7ecd..a460420059 100644
@@ -1,5 +1,5 @@
 [run]
-test_runner = runner
+test_runner = nrunner
 
 [simpletests]
 # Don't show stdout/stderr in the test *summary*
Signature · 1 line
2.31.1