[libvirt] [PATCH 08/10] Add test case for loading driver modules
Eric Blake
eblake at redhat.com
Tue May 22 03:56:19 UTC 2012
On 05/21/2012 01:59 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> To ensure all symbols used by loadable driver modules are
> exported in libvirt.so, add a test suite that simply loads
> each driver in turn
>
> * tests/Makefile.am, tests/virdrivermoduletest.c: Add
> a test case for loading drivers
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> tests/Makefile.am | 11 +++++
> tests/virdrivermoduletest.c | 104 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 115 insertions(+), 0 deletions(-)
> create mode 100644 tests/virdrivermoduletest.c
ACK.
> +static int testDriverModule(const void *args)
> +{
> + const struct testDriverData *data = args;
> +
> + if (data->dep1 &&
> + !virDriverLoadModule(data->dep1))
> + return -1;
> +
> + if (!virDriverLoadModule(data->name))
> + return -1;
> +
> + return 0;
> +}
Any reason why we don't have a virDriverUnloadModule?
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120521/c14f19af/attachment-0001.sig>
More information about the libvir-list
mailing list