test: Refactor setting of dummy error handlers

Multiple tests need to register a function to quiesce errors from
libvirt when using a connection and doing negative tests. Each of those
tests had a static function to do so. This can be replaced by a utility
function that enables the errors when debug is enabled.

This patch adds virtTestQuiesceLibvirtErrors() and refactors test that
use private handlers.
This commit is contained in:
Peter Krempa
2013-09-17 15:20:24 +02:00
parent 8ffe1d0c46
commit 43f68a4f9e
7 changed files with 17 additions and 46 deletions

View File

@@ -69,6 +69,8 @@ unsigned int virTestGetExpensive(void);
char *virtTestLogContentAndReset(void);
void virtTestQuiesceLibvirtErrors(bool always);
int virtTestMain(int argc,
char **argv,
int (*func)(void));