[libvirt] [PATCH 3/6] securityselinuxlabeltest: Prefer virGetLastErrorMessage() over virGetLastError

Peter Krempa pkrempa at redhat.com
Thu Aug 4 07:55:35 UTC 2016


On Thu, Aug 04, 2016 at 09:47:47 +0200, Michal Privoznik wrote:
> At the beginning of the test, some preparation work is done. For
> instance new virSecurityManager is created. If this fails for
> whatever reason, we try to fetch the latest error and print the
> error message contained in it. However, if there's a bug in our
> code and no error is reported, this approach will lead to crash,
> while with virGetLastErrorMessage() it won't.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  tests/securityselinuxlabeltest.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

ACK




More information about the libvir-list mailing list