提交 9973032f 编写于 作者: C Cédric Bosdonnat 提交者: Daniel P. Berrange

test driver: renamed testDomainEventQueue into testObjectEventQueue

上级 620103fe
...@@ -121,7 +121,7 @@ static const virNodeInfo defaultNodeInfo = { ...@@ -121,7 +121,7 @@ static const virNodeInfo defaultNodeInfo = {
static int testConnectClose(virConnectPtr conn); static int testConnectClose(virConnectPtr conn);
static void testDomainEventQueue(testConnPtr driver, static void testObjectEventQueue(testConnPtr driver,
virObjectEventPtr event); virObjectEventPtr event);
...@@ -1650,7 +1650,7 @@ cleanup: ...@@ -1650,7 +1650,7 @@ cleanup:
if (dom) if (dom)
virObjectUnlock(dom); virObjectUnlock(dom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
virDomainDefFree(def); virDomainDefFree(def);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
...@@ -1781,7 +1781,7 @@ cleanup: ...@@ -1781,7 +1781,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -1821,7 +1821,7 @@ cleanup: ...@@ -1821,7 +1821,7 @@ cleanup:
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) { if (event) {
testDriverLock(privconn); testDriverLock(privconn);
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
} }
return ret; return ret;
...@@ -1864,7 +1864,7 @@ cleanup: ...@@ -1864,7 +1864,7 @@ cleanup:
if (event) { if (event) {
testDriverLock(privconn); testDriverLock(privconn);
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
} }
return ret; return ret;
...@@ -1911,7 +1911,7 @@ cleanup: ...@@ -1911,7 +1911,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -1987,7 +1987,7 @@ cleanup: ...@@ -1987,7 +1987,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -2159,7 +2159,7 @@ cleanup: ...@@ -2159,7 +2159,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -2265,7 +2265,7 @@ cleanup: ...@@ -2265,7 +2265,7 @@ cleanup:
if (dom) if (dom)
virObjectUnlock(dom); virObjectUnlock(dom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -2335,7 +2335,7 @@ cleanup: ...@@ -2335,7 +2335,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -2819,7 +2819,7 @@ cleanup: ...@@ -2819,7 +2819,7 @@ cleanup:
if (dom) if (dom)
virObjectUnlock(dom); virObjectUnlock(dom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -2955,7 +2955,7 @@ cleanup: ...@@ -2955,7 +2955,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -3030,7 +3030,7 @@ cleanup: ...@@ -3030,7 +3030,7 @@ cleanup:
if (privdom) if (privdom)
virObjectUnlock(privdom); virObjectUnlock(privdom);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
return ret; return ret;
} }
...@@ -6028,7 +6028,7 @@ testConnectDomainEventDeregisterAny(virConnectPtr conn, ...@@ -6028,7 +6028,7 @@ testConnectDomainEventDeregisterAny(virConnectPtr conn,
/* driver must be locked before calling */ /* driver must be locked before calling */
static void testDomainEventQueue(testConnPtr driver, static void testObjectEventQueue(testConnPtr driver,
virObjectEventPtr event) virObjectEventPtr event)
{ {
virObjectEventStateQueue(driver->domainEventState, event); virObjectEventStateQueue(driver->domainEventState, event);
...@@ -6191,7 +6191,7 @@ cleanup: ...@@ -6191,7 +6191,7 @@ cleanup:
virObjectUnlock(vm); virObjectUnlock(vm);
if (event) { if (event) {
testDriverLock(privconn); testDriverLock(privconn);
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
} }
...@@ -6743,7 +6743,7 @@ cleanup: ...@@ -6743,7 +6743,7 @@ cleanup:
} }
if (event) { if (event) {
testDriverLock(privconn); testDriverLock(privconn);
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
testDriverUnlock(privconn); testDriverUnlock(privconn);
} }
virDomainSnapshotDefFree(def); virDomainSnapshotDefFree(def);
...@@ -6989,7 +6989,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -6989,7 +6989,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
VIR_DOMAIN_EVENT_STOPPED, VIR_DOMAIN_EVENT_STOPPED,
VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT); VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT);
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
goto load; goto load;
} }
...@@ -7069,7 +7069,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -7069,7 +7069,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
bool paused = (flags & VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED) != 0; bool paused = (flags & VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED) != 0;
if (event) if (event)
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
event = virDomainEventLifecycleNewFromObj(vm, event = virDomainEventLifecycleNewFromObj(vm,
VIR_DOMAIN_EVENT_STARTED, VIR_DOMAIN_EVENT_STARTED,
VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT); VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT);
...@@ -7085,9 +7085,9 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, ...@@ -7085,9 +7085,9 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
ret = 0; ret = 0;
cleanup: cleanup:
if (event) { if (event) {
testDomainEventQueue(privconn, event); testObjectEventQueue(privconn, event);
if (event2) if (event2)
testDomainEventQueue(privconn, event2); testObjectEventQueue(privconn, event2);
} else { } else {
virObjectUnref(event2); virObjectUnref(event2);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册