mirror of https://gitee.com/openkylin/libvirt.git
tests: storage: Fully register storage driver
Use the full storage driver registration method that also fails if one of the storage backends is not present. This makes the test fail if a submodule fails registration, which is useful for testing. Additionally return EXIT_FAILURE as usual in tests rather than -1.
This commit is contained in:
parent
b9473d8b11
commit
2117d42c7c
|
@ -32,7 +32,6 @@
|
||||||
#include "dirname.h"
|
#include "dirname.h"
|
||||||
|
|
||||||
#include "storage/storage_driver.h"
|
#include "storage/storage_driver.h"
|
||||||
#include "storage/storage_backend.h"
|
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
|
@ -732,8 +731,8 @@ mymain(void)
|
||||||
virStorageSourcePtr chain2; /* short for chain->backingStore */
|
virStorageSourcePtr chain2; /* short for chain->backingStore */
|
||||||
virStorageSourcePtr chain3; /* short for chain2->backingStore */
|
virStorageSourcePtr chain3; /* short for chain2->backingStore */
|
||||||
|
|
||||||
if (virStorageBackendDriversRegister(false) < 0)
|
if (storageRegisterAll() < 0)
|
||||||
return -1;
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
/* Prep some files with qemu-img; if that is not found on PATH, or
|
/* Prep some files with qemu-img; if that is not found on PATH, or
|
||||||
* if it lacks support for qcow2 and qed, skip this test. */
|
* if it lacks support for qcow2 and qed, skip this test. */
|
||||||
|
|
Loading…
Reference in New Issue