[Libvirt-ci] Passed: libvirt/libvirt#2121 (master - 1c56005)

Travis CI builds at travis-ci.org
Fri Mar 15 16:52:36 UTC 2019


Build Update for libvirt/libvirt
-------------------------------------

Build: #2121
Status: Passed

Duration: 45 mins and 18 secs
Commit: 1c56005 (master)
Author: Eric Blake
Message: object: Add sanity check on correct parent class

Checking that the derived class is larger than the requested parent
class saves us from some obvious mistakes, but as written, it does not
catch all the cases; in particular, it is easy to forget to update a
VIR_CLASS_NEW when changing the 'parent' member from virObject to
virObjectLockabale, but where the size checks don't catch that.  Add a
parameter for one more layer of sanity checking.

It would be cool if we could get gcc to stringize typeof(parent) into
the string name of that type, so that we could confirm that the
precise parent class is in use rather than just a struct that happens
to have the same size as the parent class.  But sizeof checks are
better than nothing.

Note that I did NOT change the fact that we require derived classes to
be larger (as the difference in size makes it easy to tell classes
apart), which means that even if a derived class has no functionality
to add (but rather exists for compiler-enforced type-safety), it must
still include a dummy member.  But I did fix the wording of the error
message to match the code.

Signed-off-by: Eric Blake <eblake at redhat.com>
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>

View the changeset: https://github.com/libvirt/libvirt/compare/75a916988100...1c560052a8c1

View the full build log and details: https://travis-ci.org/libvirt/libvirt/builds/506858372?utm_medium=notification&utm_source=email

--

You can unsubscribe from build emails from the libvirt/libvirt repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=4872032&utm_medium=notification&utm_source=email.
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email.
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-ci/attachments/20190315/155b0e34/attachment.htm>


More information about the Libvirt-ci mailing list