mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virhostdevtest: Don't proceed to test cases if init failed
The myInit() function is called before any of the test cases because it prepares all internal structures for individual cases. Well, if it fails there's no point in proceeding with testing. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> ACKed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
22fc83df92
commit
d2899a6485
@ -574,8 +574,11 @@ mymain(void)
|
|||||||
ret = -1; \
|
ret = -1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
if (myInit() < 0)
|
if (myInit() < 0) {
|
||||||
fprintf(stderr, "Init data structures failed.");
|
fprintf(stderr, "Init data structures failed.");
|
||||||
|
virFileDeleteTree(fakerootdir);
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
DO_TEST(testVirHostdevRoundtripNoGuest);
|
DO_TEST(testVirHostdevRoundtripNoGuest);
|
||||||
DO_TEST(testVirHostdevRoundtripUnmanaged);
|
DO_TEST(testVirHostdevRoundtripUnmanaged);
|
||||||
|
Loading…
Reference in New Issue
Block a user