diff --git a/.gitignore b/.gitignore index 1896c6381..e0118617d 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ /resources /src/supplement.gypi /testing +/third_party/asan /third_party/cygwin /third_party/expat /third_party/google-gflags/src diff --git a/tools/valgrind-webrtc/memcheck/suppressions.txt b/tools/valgrind-webrtc/memcheck/suppressions.txt new file mode 100644 index 000000000..112301799 --- /dev/null +++ b/tools/valgrind-webrtc/memcheck/suppressions.txt @@ -0,0 +1,30 @@ +# There are four kinds of suppressions in this file. +# 1. third party stuff we have no control over +# +# 2. intentional unit test errors, or stuff that is somehow a false positive +# in our own code, or stuff that is so trivial it's not worth fixing +# +# 3. Suppressions for real WebRTC bugs that are not yet fixed. +# These should all be in WebRTC's bug tracking system. +# Periodically we should sweep this file and the bug tracker clean by +# running overnight and removing outdated bugs/suppressions. +# +# 4. issues that happen only on Google workstations. +#----------------------------------------------------------------------- + + + +# 1. third party stuff we have no control over + +#----------------------------------------------------------------------- +# 2. intentional unit test errors, or stuff that is somehow a false positive +# in our own code, or stuff that is so trivial it's not worth fixing + +#----------------------------------------------------------------------- +# 3. Suppressions for real chromium bugs that are not yet fixed. +# These should all be in WebRTC's bug tracking system. + + +#----------------------------------------------------------------------- +# 4. These only occur on our Google workstations + diff --git a/tools/valgrind-webrtc/memcheck/suppressions_mac.txt b/tools/valgrind-webrtc/memcheck/suppressions_mac.txt new file mode 100644 index 000000000..a387a6416 --- /dev/null +++ b/tools/valgrind-webrtc/memcheck/suppressions_mac.txt @@ -0,0 +1,323 @@ +# There are three kinds of suppressions in this file: +# 1. Third party stuff we have no control over. +# +# 2. Intentional unit test errors, stuff that is somehow a false positive +# in our own code, or stuff that is so trivial it's not worth fixing. +# +# 3. Suppressions for real WebRTC bugs that are not yet fixed. +# These should all be in WebRTC's bug tracking system. +# Periodically we should sweep this file and the bug tracker clean by +# running overnight and removing outdated bugs/suppressions. +#----------------------------------------------------------------------- + +# 1. Third party stuff we have no control over. +{ + FIXME mac kevent libevent probably needs valgrind hooks + Memcheck:Param + kevent(changelist) + fun:kevent + fun:event_base_new +} +{ + # CoreAudio leak. See http://crbug.com/9351 + bug_9351 + Memcheck:Leak + ... + fun:_ZN12HALCADClient19AddPropertyListenerEmPK26AudioObjectPropertyAddressPFlmmS2_PvES3_ + fun:_ZN16HALDefaultDevice22InstallServerListenersEv + fun:_ZN16HALDefaultDevice10InitializeEv + fun:_ZN9HALSystem16CheckOutInstanceEv +} +{ + # Mac test_shell_tests. See http://crbug.com/11134 + # Doesn't happen on bots, but happens like crazy on the smo + # test machine 'caliban'. Don't delete just because it + # doesn't happen on the bots. + bug_11134 + Memcheck:Uninitialized + fun:vCMMVectorConvert8BitRGBToRGB + fun:_ZNK15CMMConvRGBToRGB7ConvertER8CMM8BitsP14CMMRuntimeInfomm +} +{ + # Mac system library bug? See http://crbug.com/11327 + bug_11327 + Memcheck:Uninitialized + fun:_ZN19AudioConverterChain5ResetEv + fun:AudioConverterReset + obj:/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio +} +{ + # Mac system library bug? See http://crbug.com/11327 + bug_11327b + Memcheck:Uninitialized + fun:AUNetSendEntry + fun:AUNetSendEntry + obj:/System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio +} +{ + # Filed with Apple as rdar://6915060; see http://crbug.com/11270 + bug_11270 + Memcheck:Leak + fun:calloc + fun:CMSSetLabCLUT +} +{ + # Mac leak in CMOpenOrNewAccess in unit_tests PlatformCanvas_SkLayer_Test, + # ToolbarControllerTest_FocusLocation_Test. See http://crbug.com/11333. + bug_11333 + Memcheck:Leak + fun:malloc + fun:stdSmartNewPtr + fun:stdSmartNewHandle + fun:IOCreateAndOpen + fun:ScratchInit + fun:CMOpenOrNewAccess +} +{ + # suddenly very common as of 6 aug 2009 + bug_11333b + Memcheck:Leak + fun:malloc + fun:stdSmartNewPtr + fun:stdSmartNewHandle + fun:IOCreateAndOpen + fun:ScratchInit + fun:CMNewAccessFromAnother +} +{ + # Tiny one-time leak, widely seen by valgind users; everyone suppresses this. + # See related discussion at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39366 + plugin_bundle_global_leak + Memcheck:Leak + fun:malloc + fun:__cxa_get_globals + fun:__cxa_allocate_exception + fun:_ZN4dyld4loadEPKcRKNS_11LoadContextE + fun:dlopen + fun:dlopen + fun:_CFBundleDlfcnCheckLoaded +} +{ + bug_18215 + Memcheck:Uninitialized + fun:_DPSNextEvent + fun:-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + fun:-[NSApplication run] +} +{ + bug_18223 + Memcheck:Uninitialized + fun:_ZNK8Security12UnixPlusPlus17StaticForkMonitorclEv + fun:_ZN12ocspdGlobals10serverPortEv +} +{ + # Filed with Apple as rdar://7255382 + bug_20459a + Memcheck:Leak + ... + fun:_CFRuntimeCreateInstance + fun:CFRunLoopSourceCreate + fun:CFMachPortCreateRunLoopSource + fun:_ZN8Security12MachPlusPlus10CFAutoPort6enableEv + fun:_ZN8Security14SecurityServer14ThreadNotifierC2Ev +} +{ + # Also filed with Apple as rdar://7255382 + bug_20459b + Memcheck:Leak + fun:malloc_zone_malloc + fun:_CFRuntimeCreateInstance + fun:__CFArrayInit + fun:CFArrayCreateMutableCopy + fun:_ZN8Security12KeychainCore5Trust8evaluateEv +} +# See description of bug_20653a/b in suppressions.txt. +{ + bug_20653a_mac + Memcheck:Param + write(buf) + fun:write$UNIX2003 + fun:pager_write_pagelist +} +{ + bug_20653b_mac + Memcheck:Param + write(buf) + fun:write$UNIX2003 + ... + fun:pager_write +} + +# See http://www.openradar.me/8287193 +{ + Invalid redzone accesses in DKeyHas8Words + Memcheck:Unaddressable + fun:DKeyHas8Words +} + +# See https://bugs.kde.org/show_bug.cgi?id=188572 +# This suppression is missing in Valgrind on Mac 10.6 +# TODO(glider): remove it once it arrives in the trunk. +{ + Unavoidable leak in setenv() + Memcheck:Leak + fun:malloc_zone_malloc + fun:__setenv + fun:setenv$UNIX2003 +} +{ + # Reported to Apple as rdar://6915429 + bug_12525 + Memcheck:Leak + ... + fun:-[CIContextImpl render:toBitmap:rowBytes:bounds:format:colorSpace:] +} +{ + bug_69436 + Memcheck:Leak + ... + fun:-[CIKernel initWithCString:noCopy:] + ... + fun:-[NSPopUpButtonCell _drawIndicatorWithFrame:inView:] +} +{ + # Capturer on Mac uses OpenGL driver, which triggers several warnings. + # The check has to be quite generic, as different hardware graphics cards + # will cause different sets of warnings. + bug_75037 + Memcheck:Uninitialized + ... + fun:_ZN8remoting*CapturerMac* +} +{ + # See also http://openradar.appspot.com/radar?id=1235407 + bug_77063 + Memcheck:Free + fun:_ZdlPv + fun:_ZN15THFSPlusCatalogD2Ev + fun:_ZN5TNode10SetCatalogEP15THFSPlusCatalog + fun:_ZN15TMountPointList9AddVolumeEsb + fun:_ZN15TMountPointList4FindEsPN5TNode12StPopulatingE + fun:_ZN15TMountPointList20SupportsInvisibleBitEsPN5TNode12StPopulatingEb + fun:_ZNK21THFSPlusPropertyStore4OpenEbb + fun:_ZNK21THFSPlusPropertyStore13GetPropertiesEb + fun:_ZN16TFSCopyOperation22GetSourcePropertyStoreERK11THFSPlusRef + fun:_ZN16TFSCopyOperation13DoMoveToTrashERK11THFSPlusRef + fun:_ZN16TFSCopyOperation3RunEv + fun:_FSOperation + fun:_FSOperateOnObjectSync + fun:FSMoveObjectToTrashSync + fun:_Z9TrashFuncRK8FilePath +} +{ + # See also http://openradar.appspot.com/radar?id=1169404 + bug_79533a + Memcheck:Uninitialized + ... + fun:_Z*19cssm_DataAbortQuery17cssm_dl_db_handlel + fun:CSSM_DL_DataAbortQuery + fun:_ZN11SSDLSession14DataAbortQueryEll + fun:_Z*19cssm_DataAbortQuery17cssm_dl_db_handlel + fun:CSSM_DL_DataAbortQuery + fun:tpDbFindIssuerCrl + fun:tpVerifyCertGroupWithCrls +} +{ + # See also http://openradar.appspot.com/radar?id=1169404 + bug_79533b + Memcheck:Uninitialized + ... + fun:_Z*19cssm_DataAbortQuery17cssm_dl_db_handlel + fun:CSSM_DL_DataAbortQuery + fun:_ZN11SSDLSession14DataAbortQueryEll + fun:_Z*19cssm_DataAbortQuery17cssm_dl_db_handlel + fun:CSSM_DL_DataAbortQuery + fun:tpDbFindIssuerCrl + fun:tpVerifyCertGroupWithCrls +} +{ + bug_85213_a + Memcheck:Leak + ... + fun:_CFBundleCopyDirectoryContentsAtPath +} +{ + bug_85213_b + Memcheck:Leak + ... + fun:_CFBundleCopyInfoDictionaryInDirectoryWithVersion +} +{ + bug_85213_c + Memcheck:Leak + ... + fun:_CFBundleURLLooksLikeBundleVersion +} +{ + bug_85213_d + Memcheck:Leak + ... + fun:_CFBundleCreate + fun:_ZN6webkit5npapi9PluginLib17ReadWebPluginInfoERK8FilePathPNS0_13WebPluginInfoE +} +{ + bug_85213_e + Memcheck:Leak + ... + fun:CFBundlePreflightExecutable + fun:_ZN6webkit5npapi9PluginLib17ReadWebPluginInfoERK8FilePathPNS0_13WebPluginInfoE +} +{ + bug_85213_f + Memcheck:Leak + ... + fun:CFBundleGetPackageInfo + fun:_ZN6webkit5npapi9PluginLib17ReadWebPluginInfoERK8FilePathPNS0_13WebPluginInfoE +} +{ + bug_86927 + Memcheck:Leak + fun:malloc + fun:CGSMapShmem + fun:CGSResolveShmemReference + fun:CGSScoreboard + fun:initCGDisplayState + fun:initCGDisplayMappings + fun:cgsInit + fun:pthread_once + fun:CGSInitialize + fun:CGSServerOperationState + fun:+[NSThemeFrame initialize] + fun:_class_initialize +} +{ + # QTKit leak. See http://crbug.com/100772 and rdar://10319535. + bug_100772 + Memcheck:Leak + fun:calloc + fun:QTMLCreateMutex + fun:WarholCreateGlobals + fun:INIT_QuickTimeLibInternal + fun:pthread_once + fun:INIT_QuickTimeLib + fun:EnterMovies_priv + fun:EnterMovies + fun:TundraUnitInputFromTSFileEntry + fun:TundraUnitVDIGInputEntry + fun:TundraUnitCreateFromDescription + fun:+[QTCaptureVDIGDevice _refreshDevices] + fun:+[QTCaptureVDIGDevice devicesWithIOType:] + fun:+[QTCaptureDevice devicesWithIOType:] + fun:+[QTCaptureDevice inputDevices] + fun:+[QTCaptureDevice inputDevicesWithMediaType:] + fun:+[VideoCaptureDeviceQTKit deviceNames] + fun:_ZN5media18VideoCaptureDevice14GetDeviceNamesEPSt4listINS0_4NameESaIS2_EE + fun:_ZN5media21VideoCaptureDeviceMac4InitEv + fun:_ZN5media18VideoCaptureDevice6CreateERKNS0_4NameE + fun:_ZN5media45VideoCaptureDeviceTest_OpenInvalidDevice_Test8TestBodyEv +} + +# 2. Intentional unit test errors, stuff that is somehow a false positive +# in our own code, or stuff that is so trivial it's not worth fixing. + +# 3. Suppressions for real WebRTC bugs that are not yet fixed. diff --git a/tools/valgrind-webrtc/webrtc_tests.py b/tools/valgrind-webrtc/webrtc_tests.py new file mode 100755 index 000000000..b532a1f13 --- /dev/null +++ b/tools/valgrind-webrtc/webrtc_tests.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python +# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +''' Runs various WebRTC tests through valgrind_test.py. + +This script inherits the chrome_tests.py in Chrome, replacing its tests with +our own in WebRTC instead. +''' + +import optparse +import sys + +import logging_utils + +import chrome_tests + +class WebRTCTests(chrome_tests.ChromeTests): + # WebRTC tests, similar functions for each tests as the Chrome tests in the + # parent class. + def TestSignalProcessing(self): + return self.SimpleTest("signal_processing", "signal_processing_unittests") + + def TestResampler(self): + return self.SimpleTest("resampler", "resampler_unittests") + + def TestVAD(self): + return self.SimpleTest("vad", "vad_unittests") + + def TestCNG(self): + return self.SimpleTest("cng", "cng_unittests") + + def TestG711(self): + return self.SimpleTest("g711", "g711_unittests") + + def TestG722(self): + return self.SimpleTest("g722", "g722_unittests") + + def TestPCM16B(self): + return self.SimpleTest("pcm16b", "pcm16b_unittests") + + def TestNetEQ(self): + return self.SimpleTest("neteq", "neteq_unittests") + + def TestAudioConferenceMixer(self): + return self.SimpleTest("audio_conference_mixer", "audio_conference_mixer_unittests") + + def TestMediaFile(self): + return self.SimpleTest("media_file", "media_file_unittests") + + def TestRTPRTCP(self): + return self.SimpleTest("rtp_rtcp", "rtp_rtcp_unittests") + + def TestBWE(self): + return self.SimpleTest("test_bwe", "test_bwe") + + def TestUDPTransport(self): + return self.SimpleTest("udp_transport", "udp_transport_unittests") + + def TestWebRTCUtility(self): + return self.SimpleTest("webrtc_utility", "webrtc_utility_unittests") + + def TestVP8(self): + return self.SimpleTest("vp8", "vp8_unittests") + + def TestVideoCoding(self): + return self.SimpleTest("video_coding", "video_coding_unittests") + + def TestVideoProcessing(self): + return self.SimpleTest("video_processing", "video_processing_unittests") + + def TestSystemWrappers(self): + return self.SimpleTest("system_wrappers", "system_wrappers_unittests") + + def TestTestSupport(self): + return self.SimpleTest("test_support", "test_support_unittests") + +def _main(_): + parser = optparse.OptionParser("usage: %prog -b