提交 d2899a64 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
ACKed-by: NPeter Krempa <pkrempa@redhat.com>
上级 22fc83df
......@@ -574,8 +574,11 @@ mymain(void)
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册