On 05/21/2012 01:59 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)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(a)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(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org