Re: [PATCH v2] tests: Move domainEventState initialization to qemuTestDriverInit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/3/24 23:40, Rayhan Faizel wrote:
> 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@xxxxxxxxx>
> ---
> 
> As the patch title has completely changed,
> v1: https://lists.libvirt.org/archives/list/devel@xxxxxxxxxxxxxxxxx/thread/4476AKGV4MWNSTUR4DAJVZSVOQEINVJK/#4476AKGV4MWNSTUR4DAJVZSVOQEINVJK
> 
> [Changes in v2]
> - Move domainEventState initialization instead of adding a NULL check
> 
>  tests/qemuhotplugtest.c                       |  3 --
>  ...tuppolicy-optional-drop.x86_64-latest.args | 33 ++++++++++++++++
>  ...rtuppolicy-optional-drop.x86_64-latest.xml | 38 +++++++++++++++++++
>  .../disk-startuppolicy-optional-drop.xml      | 23 +++++++++++
>  tests/qemuxmlconftest.c                       |  1 +
>  tests/testutilsqemu.c                         |  4 ++
>  6 files changed, 99 insertions(+), 3 deletions(-)
>  create mode 100644 tests/qemuxmlconfdata/disk-startuppolicy-optional-drop.x86_64-latest.args
>  create mode 100644 tests/qemuxmlconfdata/disk-startuppolicy-optional-drop.x86_64-latest.xml
>  create mode 100644 tests/qemuxmlconfdata/disk-startuppolicy-optional-drop.xml

Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

and merged.

Michal



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux