diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2023-04-20 17:59:02 +0200 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2023-04-25 08:46:27 +0200 |
commit | dc4ec0e30bf6f65c99ffdcc2b104038b234abfe5 (patch) | |
tree | d727258e04687902cdd63bffb22b6762778ebe44 | |
parent | 541582a91b1734e4e4956a702ec496a5cc5ae726 (diff) | |
download | libvirt-dc4ec0e30bf6f65c99ffdcc2b104038b234abfe5.tar.gz |
qemuhotplugtest: Fix misleading comment on monitor unlock
There's a comment in testQemuHotplug() trying to explain why we
need to unlock the monitor object. Well, while it might have been
correct when being introduced, it's no longer factually correct
as just any function (attach/detach/update) might talk to the
monitor and it expects the monitor to be unlocked (as it calls
qemuDomainObjEnterMonitor() + qemuDomainObjExitMonitor()).
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
-rw-r--r-- | tests/qemuhotplugtest.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 341fcf40df..635f5a39bd 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -223,9 +223,8 @@ testQemuHotplug(const void *data) priv = vm->privateData; priv->mon = qemuMonitorTestGetMonitor(test_mon); - /* XXX We need to unlock the monitor here, as - * qemuDomainObjEnterMonitorInternal (called from qemuDomainChangeGraphics) - * tries to lock it again */ + /* We need to unlock the monitor here, as any function below talks + * (transitively) on the monitor. */ virObjectUnlock(priv->mon); switch (test->action) { |