mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Move domainEventState initialization to qemuTestDriverInit
Under the test environment, driver->domainEventState is uninitialized. If a disk gets dropped, it will attempt to queue an event which will cause a segmentation fault. This crash does not occur during normal use. This patch moves driver->domainEventState initialization from qemuhotplugtest to qemuTestDriverInit in testutilsqemu (Credit goes to Michal Privoznik as he had already provided the diff). An additional test case is added to test dropping of disks with startupPolicy set as optional. Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
f67b12ba35
commit
d666426718
@@ -501,9 +501,6 @@ mymain(void)
|
||||
|
||||
virEventRegisterDefaultImpl();
|
||||
|
||||
if (!(driver.domainEventState = virObjectEventStateNew()))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
driver.lockManager = virLockManagerPluginNew("nop", "qemu",
|
||||
driver.config->configBaseDir,
|
||||
0);
|
||||
|
||||
Reference in New Issue
Block a user