libvirt/build-aux
Daniel P. Berrange 728cacc8ab annotate all mocked functions with noinline
CLang's optimizer is more aggressive at inlining functions than
gcc and so will often inline functions that our tests want to
mock-override. This causes the test to fail in bizarre ways.

We don't want to disable inlining completely, but we must at
least prevent inlining of mocked functions. Fortunately there
is a 'noinline' attribute that lets us control this per function.

A syntax check rule is added that parses tests/*mock.c to extract
the list of functions that are mocked (restricted to names starting
with 'vir' prefix). It then checks that src/*.h header file to
ensure it has a 'ATTRIBUTE_NOINLINE' annotation. This should prevent
use from bit-rotting in future.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-19 10:51:51 +01:00
..
augeas-gentest.pl maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
check-spacing.pl check-spacing: fix error message 2016-06-15 16:05:08 +02:00
mock-noinline.pl annotate all mocked functions with noinline 2017-04-19 10:51:51 +01:00
prohibit-duplicate-header.pl prohibit-duplicate-header: print file name and line 2016-06-23 12:48:40 +02:00