[libvirt] [PATCH v2 0/2] fix segfaults on qemuhotplugtest

Christian Ehrhardt christian.ehrhardt at canonical.com
Thu Jan 16 08:28:54 UTC 2020

After debugging for a while and eventually finding the root cause we
discussed this on IRC today:

<cpaelzer> danpb: BTW the test crash in 6.0 that I'm tracing (asked yesterday)
           is virHostdevManagerInitialize failing
<cpaelzer> the test goes on with mgr set to 0x0 and that is the segfault
           later on
<cpaelzer> virSetError was helpful as "Could not initialize HostdevManager
           operation failed: Failed to create state dir
           '/sbuild-nonexistent/.cache/libvirt/hostdevmgr'" sounds like a
           very testbed-specific issue that I might be able to solve when
           invoking the tests
<danpb> hmm, seems like we're missing a mock for  mkdir()
<danpb> i guess we should mock  virFileMakePath in this case

This series got v6.0.0 building in Ubuntu, so I thought it is worth to
submit it for review.

Updates in v2:
- improve indent of virGetLastErrorMessage
- drop superfluous curly brackets
- added the Reviewed-by of Daniel Henrique Barboza (Thanks !)

Christian Ehrhardt (2):
  test: let qemuhotplugtest report details of init fails
  test: qemuhotplugtest mock virFileMakePath

 tests/qemuhotplugmock.c | 17 +++++++++++++++++
 tests/qemuhotplugtest.c |  5 +++++
 2 files changed, 22 insertions(+)


More information about the libvir-list mailing list