mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
virstoragetest: Remove pointless goto from mymain
Improve the error message and abort the test. Continuing here is not desired as without chdiring into the appropriate directory the test would fail anyways and worse could attempt stat-ing random files on the host. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6aaa4d3cfe
commit
12906d1985
@ -502,8 +502,9 @@ mymain(void)
|
|||||||
|
|
||||||
/* setup data for backing chain lookup testing */
|
/* setup data for backing chain lookup testing */
|
||||||
if (chdir(abs_srcdir "/virstoragetestdata/lookup") < 0) {
|
if (chdir(abs_srcdir "/virstoragetestdata/lookup") < 0) {
|
||||||
fprintf(stderr, "unable to test relative backing chains\n");
|
VIR_TEST_VERBOSE("failed to chdir into '%s'\n",
|
||||||
goto cleanup;
|
abs_srcdir "/virstoragetestdata/lookup");
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(fakeChain, 0, sizeof(fakeChain));
|
memset(fakeChain, 0, sizeof(fakeChain));
|
||||||
@ -1171,7 +1172,6 @@ mymain(void)
|
|||||||
|
|
||||||
#endif /* WITH_YAJL */
|
#endif /* WITH_YAJL */
|
||||||
|
|
||||||
cleanup:
|
|
||||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user