[libvirt] [PATCH] Register storage backends in test driver

The refactored storage backend registering broke the test driver. The attached patch makes everything work again by explicitly registering the backends on driver startup. Thanks, Cole diff --git a/src/test.c b/src/test.c index 30dc52a..a785f04 100644 --- a/src/test.c +++ b/src/test.c @@ -43,6 +43,11 @@ #include "network_conf.h" #include "domain_conf.h" #include "storage_conf.h" +#include "storage_backend.h" +#include "storage_backend_logical.h" +#include "storage_backend_iscsi.h" +#include "storage_backend_disk.h" +#include "storage_backend_fs.h" #include "xml.h" #define MAX_CPUS 128 @@ -663,6 +668,17 @@ static int testOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } + if (virStorageBackendRegister(&virStorageBackendDirectory) < 0 || + virStorageBackendRegister(&virStorageBackendFileSystem) < 0 || + virStorageBackendRegister(&virStorageBackendNetFileSystem) < 0 || + virStorageBackendRegister(&virStorageBackendLogical) < 0 || + virStorageBackendRegister(&virStorageBackendISCSI) < 0 || + virStorageBackendRegister(&virStorageBackendDisk) < 0) { + testError(NULL, VIR_ERR_INTERNAL_ERROR, + _("Failed to register storage backends.")); + return VIR_DRV_OPEN_DECLINED; + } + if (STREQ(uri->path, "/default")) ret = testOpenDefault(conn); else

On Wed, Nov 12, 2008 at 04:36:42PM -0500, Cole Robinson wrote:
The refactored storage backend registering broke the test driver. The attached patch makes everything work again by explicitly registering the backends on driver startup.
The test driver shouldn't be using any of these backends. They're private to the main storage driver. That said I've reverted my patch from yesterday which broke test driver. I've got a proper solution in progress... Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Cole Robinson
-
Daniel P. Berrange