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>
ret = -1; \
} while (0)
- if (myInit() < 0)
+ if (myInit() < 0) {
fprintf(stderr, "Init data structures failed.");
+ virFileDeleteTree(fakerootdir);
+ return EXIT_FAILURE;
+ }
DO_TEST(testVirHostdevRoundtripNoGuest);
DO_TEST(testVirHostdevRoundtripUnmanaged);