Conversation
What it make sense to add #51 as optional behavior for that? |
Yes that definitely makes sense. But I think with a little bit of creativity we are able to get the sanitizer logs just from the last test, so that we are able seamlessly integrate them in the test suite. I also have to take a look if the sanitizer run takes significantly longer to run through. If yes, we might want to make them configurable and run them separately in the CI. |
024bc78 to
ae38de3
Compare
On-behalf-of: SAP philipp.schuster@sap.com
On-behalf-of: SAP stefan.kober@sap.com
On-behalf-of: SAP stefan.kober@sap.com
On-behalf-of: SAP stefan.kober@sap.com
The leak sanitizer can only check for leaks when the program under inspection is terminating. Therefore, we trigger a libvirtd restart in the tearDown of a test. Further, we check the journal for 'ERROR' messages from the sanitizer and let the test fail if we find one. We check for the journal of only the recent test run by placing a 'Test run: <test-name>' marker in the journalctl manually before every testrun. On-behalf-of: SAP stefan.kober@sap.com
On-behalf-of: SAP stefan.kober@sap.com
We silence the following warning about inlining cleanup methods of the glib: libvirt> /nix/store/0784w06097k9i46zipgjf05l87i19jj0-glib-2.84.3-dev/include/glib-2.0/glib/gmacros.h:1342:43: warning: inlining failed in call to 'glib_autoptr_cleanup_virNetlinkMsg': call is unlikely and code size would grow [-Winline] libvirt> 1342 | #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName libvirt> | ^~~~~~~~~~~~~~~~~~~~~ libvirt> /nix/store/0784w06097k9i46zipgjf05l87i19jj0-glib-2.84.3-dev/include/glib-2.0/glib/gmacros.h:1362:36: note: in expansion of macro '_GLIB_AUTOPTR_FUNC_NAME' libvirt> 1362 | static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_FUNC_NAME(TypeName) (TypeName **_ptr) \ libvirt> | ^~~~~~~~~~~~~~~~~~~~~~~ libvirt> /nix/store/0784w06097k9i46zipgjf05l87i19jj0-glib-2.84.3-dev/include/glib-2.0/glib/gmacros.h:1379:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS' libvirt> 1379 | _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, TypeName, func) libvirt> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libvirt> ../src/util/virnetlink.h:31:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC' libvirt> 31 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkMsg, nlmsg_free); libvirt> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libvirt> ../src/util/virnetlink.c:791:30: note: called from here libvirt> 791 | g_autoptr(virNetlinkMsg) nl_msg = NULL; On-behalf-of: SAP stefan.kober@sap.com
ae38de3 to
0e063a5
Compare
This PR enables the sanitizers in our test runs and the test will fail if some memory issues were found during any test. This PR also fixes the nix debug build of libvirt so that debug infos are not stripped. This leads to proper line of code annotations e.g. when attaching GDB, sanitizer output or backtraces.
Open: