[libvirt] [PATCH 8/9] virhostdevtest: Reset libvirt error on expected failure

Ján Tomko jtomko at redhat.com
Mon Aug 26 12:26:50 UTC 2019


On Mon, Aug 12, 2019 at 01:54:24PM +0200, Michal Privoznik wrote:
>If a libvirt error occurred during a test, then virTestRun()
>reports it (regardless of test returning success or failure).
>For instance, in this specific case, a hostdev is detached twice
>and the second attempt is expected to fail. It does fail and
>libvirt error is reported which is then printed onto stderr.
>Insert virResetLastError() calls on appropriate places to avoid
>that.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> tests/virhostdevtest.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190826/19b39270/attachment-0001.sig>


More information about the libvir-list mailing list