validate: add gstvalidate.supp valgrind suppression file

Differential Revision: http://phabricator.freedesktop.org/D115
This commit is contained in:
Guillaume Desmottes 2015-04-20 10:53:29 +02:00
parent 60498f73b3
commit 8c2684c9a7
3 changed files with 47 additions and 10 deletions

View file

@ -14,7 +14,9 @@ SUBDIRS = \
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
suppsdir=${datadir}/gstreamer-$(GST_API_VERSION)/validate/ suppsdir=${datadir}/gstreamer-$(GST_API_VERSION)/validate/
supps_DATA = common/gst.supp supps_DATA = \
common/gst.supp \
data/gstvalidate.supp
EXTRA_DIST = \ EXTRA_DIST = \
ChangeLog autogen.sh depcomp \ ChangeLog autogen.sh depcomp \

View file

@ -0,0 +1,34 @@
### This file contains either validate specific suppressions or bugs that we
### can't easily address because they are lower in the stack.
### All the other suppressions should be added ton common/gst.supp
{
Leak in mesa fixed with http://lists.freedesktop.org/archives/mesa-dev/2015-April/082101.html
Memcheck:Leak
fun:malloc
fun:read_packet
fun:_xcb_in_read
fun:_xcb_conn_wait
fun:wait_for_reply
fun:xcb_wait_for_reply
fun:dri3_open
fun:dri3_create_screen
fun:AllocAndFetchScreenConfigs
fun:__glXInitialize
fun:glXQueryVersion
}
{
Leak in mesa fixed with http://lists.freedesktop.org/archives/mesa-dev/2015-April/082100.html
Memcheck:Leak
fun:malloc
fun:realloc
fun:udev_list_entry_add
fun:udev_enumerate_add_match_subsystem
fun:get_render_node_from_id_path_tag
fun:loader_get_user_preferred_fd
fun:dri3_create_screen
fun:AllocAndFetchScreenConfigs
fun:__glXInitialize
fun:glXQueryVersion
}

View file

@ -291,7 +291,7 @@ class Test(Loggable):
self.queue.put(None) self.queue.put(None)
def get_valgrind_suppressions(self): def get_valgrind_suppressions(self):
return None return [self.get_valgrind_suppression_file('data', 'gstvalidate.supp')]
def use_valgrind(self): def use_valgrind(self):
vglogsfile = self.logfile + '.valgrind' vglogsfile = self.logfile + '.valgrind'
@ -307,9 +307,8 @@ class Test(Loggable):
('error-exitcode', str(VALGRIND_ERROR_CODE)), ('error-exitcode', str(VALGRIND_ERROR_CODE)),
] ]
supps = self.get_valgrind_suppressions() for supp in self.get_valgrind_suppressions():
if supps: vg_args.append(('suppressions', supp))
vg_args.append(('suppressions', supps))
self.command = "valgrind %s %s" % (' '.join(map(lambda x: '--%s=%s' % (x[0], x[1]), vg_args)), self.command = "valgrind %s %s" % (' '.join(map(lambda x: '--%s=%s' % (x[0], x[1]), vg_args)),
self.command) self.command)
@ -619,21 +618,23 @@ class GstValidateTest(Test):
return position return position
def get_valgrind_suppressions(self): def get_valgrind_suppression_file(self, subdir, name):
# Are we running from sources? # Are we running from sources?
root_dir = os.path.abspath(os.path.dirname(os.path.join(os.path.dirname(os.path.abspath(__file__))))) root_dir = os.path.abspath(os.path.dirname(os.path.join(os.path.dirname(os.path.abspath(__file__)))))
p = os.path.join(root_dir, 'common', 'gst.supp') p = os.path.join(root_dir, subdir, name)
if os.path.exists(p): if os.path.exists(p):
return p return p
# Look in system data dirs # Look in system data dirs
p = os.path.join(config.DATADIR, 'gstreamer-1.0', 'validate', 'gst.supp') p = os.path.join(config.DATADIR, 'gstreamer-1.0', 'validate', name)
if os.path.exists(p): if os.path.exists(p):
return p return p
self.error("Could not find any gst.sup file") self.error("Could not find any %s file" % name)
return None def get_valgrind_suppressions(self):
result = super(GstValidateTest, self).get_valgrind_suppressions()
return result + [self.get_valgrind_suppression_file('common', 'gst.supp')]
class GstValidateEncodingTestInterface(object): class GstValidateEncodingTestInterface(object):