mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-05 18:56:51 -05:00
qemu: expose process event handler to tests
Async QEMU process events are normally completed through qemuProcessEventHandler(). Tests that exercise DEVICE_DELETED completion need to drive that same path instead of mirroring the production logic locally. Move the declaration to a guarded private header and make the handler non-static so test code can wire it into a test worker pool. This does not change runtime behaviour. Signed-off-by: Akash Kulhalli <akash.kulhalli@oracle.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
committed by
Peter Krempa
parent
5dc7de3018
commit
f4e362487b
@@ -31,6 +31,8 @@
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "qemu_driver.h"
|
||||
#define LIBVIRT_QEMU_DRIVERPRIV_H_ALLOW
|
||||
#include "qemu_driverpriv.h"
|
||||
#include "qemu_agent.h"
|
||||
#include "qemu_alias.h"
|
||||
#include "qemu_block.h"
|
||||
@@ -140,9 +142,6 @@ VIR_ENUM_IMPL(qemuDumpFormat,
|
||||
"win-dmp",
|
||||
);
|
||||
|
||||
|
||||
static void qemuProcessEventHandler(void *data, void *opaque);
|
||||
|
||||
static int qemuStateCleanup(void);
|
||||
|
||||
static int qemuDomainObjStart(virConnectPtr conn,
|
||||
@@ -4192,7 +4191,9 @@ processShutdownCompletedEvent(virDomainObj *vm)
|
||||
}
|
||||
|
||||
|
||||
static void qemuProcessEventHandler(void *data, void *opaque)
|
||||
void
|
||||
qemuProcessEventHandler(void *data,
|
||||
void *opaque)
|
||||
{
|
||||
struct qemuProcessEvent *processEvent = data;
|
||||
virDomainObj *vm = processEvent->vm;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* qemu_driverpriv.h: private declarations for QEMU driver internals
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LIBVIRT_QEMU_DRIVERPRIV_H_ALLOW
|
||||
# error "qemu_driverpriv.h may only be included by qemu_driver.c or test suites"
|
||||
#endif /* LIBVIRT_QEMU_DRIVERPRIV_H_ALLOW */
|
||||
|
||||
#pragma once
|
||||
|
||||
void
|
||||
qemuProcessEventHandler(void *data,
|
||||
void *opaque);
|
||||
Reference in New Issue
Block a user