[libvirt] [PATCH] Fix crash in virsystemdtest with dbus 1.7.6

D-bus introduced some changes in its locking code. Overriding the init function skips the new locking init and thus crashes later in libvirt test. Removing the function makes the test pass again. --- tests/virsystemdmock.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/virsystemdmock.c b/tests/virsystemdmock.c index b8fc031..b3b82b4 100644 --- a/tests/virsystemdmock.c +++ b/tests/virsystemdmock.c @@ -31,11 +31,6 @@ void dbus_connection_set_change_sigpipe(dbus_bool_t will_modify_sigpipe ATTRIBUT { } -dbus_bool_t dbus_threads_init_default(void) -{ - return 1; -} - DBusConnection *dbus_bus_get(DBusBusType type ATTRIBUTE_UNUSED, DBusError *error ATTRIBUTE_UNUSED) { -- 1.8.4.4

On 12/18/2013 04:14 AM, Cédric Bosdonnat wrote:
D-bus introduced some changes in its locking code. Overriding the init function skips the new locking init and thus crashes later in libvirt test. Removing the function makes the test pass again. --- tests/virsystemdmock.c | 5 ----- 1 file changed, 5 deletions(-)
Ouch. We added the override because it was needed on older platforms. Have you tested that this doesn't break the test on RHEL 5?
diff --git a/tests/virsystemdmock.c b/tests/virsystemdmock.c index b8fc031..b3b82b4 100644 --- a/tests/virsystemdmock.c +++ b/tests/virsystemdmock.c @@ -31,11 +31,6 @@ void dbus_connection_set_change_sigpipe(dbus_bool_t will_modify_sigpipe ATTRIBUT { }
-dbus_bool_t dbus_threads_init_default(void) -{ - return 1; -} - DBusConnection *dbus_bus_get(DBusBusType type ATTRIBUTE_UNUSED, DBusError *error ATTRIBUTE_UNUSED) {
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Wed, Dec 18, 2013 at 06:25:07AM -0700, Eric Blake wrote:
On 12/18/2013 04:14 AM, Cédric Bosdonnat wrote:
D-bus introduced some changes in its locking code. Overriding the init function skips the new locking init and thus crashes later in libvirt test. Removing the function makes the test pass again. --- tests/virsystemdmock.c | 5 ----- 1 file changed, 5 deletions(-)
Ouch. We added the override because it was needed on older platforms. Have you tested that this doesn't break the test on RHEL 5?
Did we ? I saw this method was added right at the first commit of this code. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Wed, Dec 18, 2013 at 06:25:07AM -0700, Eric Blake wrote:
On 12/18/2013 04:14 AM, Cédric Bosdonnat wrote:
D-bus introduced some changes in its locking code. Overriding the init function skips the new locking init and thus crashes later in libvirt test. Removing the function makes the test pass again. --- tests/virsystemdmock.c | 5 ----- 1 file changed, 5 deletions(-)
Ouch. We added the override because it was needed on older platforms. Have you tested that this doesn't break the test on RHEL 5?
I tested RHEL5.10 and it had no negative impact on the test Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Cédric Bosdonnat
-
Daniel P. Berrange
-
Eric Blake