On Thu, Jun 11, 2026 at 01:13:23AM +0400, marcandre.lureau@redhat.com wrote:
On Wed, 10 Jun 2026 13:34:10 +0100, Daniel P. Berrangé <berrange@redhat.com> wrote:
diff --git a/tests/functional/generic/test_monitor_hotplug.py b/tests/functional/generic/test_monitor_hotplug.py index 5d8a159eb00..03087faafc3 100755 --- a/tests/functional/generic/test_monitor_hotplug.py +++ b/tests/functional/generic/test_monitor_hotplug.py @@ -163,6 +168,63 @@ def test_events_after_negotiation(self): qmp.close() self._remove_monitor()
+ def stress_mon(self, sock): + async def main(): + qmp = QMPClient('testvm') + await qmp.connect(sock) + # Run query-version in a tight loop so that the + # monitor thread/dispatcher is very busy at the + # time we try to delete the monitor + while True: + try: + # A command which returns alot of data to make
"a lot"
[ ... skip 38 lines ... ] + sock = self._add_monitor() + print ("# stress cycle %02d/%02d" % (i, repeat)) + stress = threading.Thread(target=self.stress_mon, args=[sock]) + stress.start() + # Sleep upto 1/2 second to vary the races + time.sleep(random.random() / 0.5)
* 0.5 or / 2 for the intended sleep
Opps, /facepalm. With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|