Make Valgrind memcheck work in swarming.

Add a fallback path to tools/valgrind-webrtc/webrtc_tests.sh if locate_valgrind.sh fails.

This is a workaround to run memcheck on swarming, since locate_valgrind.sh fails even though the files are present. This is almost certainly because the way we use symlinks.

A warning message is displayed to warn the developers to follow the instructions to get the valgrind binaries.

Some extra suppressions were needed. The bug tracking them is https://bugs.webrtc.org/6773

R=kjellander@chromium.org
BUG=chromium:497757

Review-Url: https://codereview.webrtc.org/2531573003
Cr-Commit-Position: refs/heads/master@{#15244}
This commit is contained in:
ehmaldonado 2016-11-25 05:48:51 -08:00 committed by Commit bot
parent 57329102f9
commit 0fa164a22c
3 changed files with 62 additions and 3 deletions

View File

@ -30,6 +30,46 @@
#-----------------------------------------------------------------------
# webrtc stuff
{
bug_6773_3
Memcheck:Uninitialized
fun:vfprintf
fun:vsnprintf
fun:snprintf
fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo
fun:_ZN7testing9internal220PrintBytesInObjectToEPKhmPSo
fun:_ZN7testing8internal14DefaultPrintToISt6vectorIN6webrtc4rtcp3Fir7RequestESaIS6_EEEEviNS0_13bool_constantILb0EEERKT_PSo
fun:_ZN7testing8internal20MatchPrintAndExplainIKSt6vectorIN6webrtc4rtcp3Fir7RequestESaIS6_EERS9_EEbRT_RKNS_7MatcherIT0_EEPNS_19MatchResultListenerE
fun:_ZNK7testing8internal29PredicateFormatterFromMatcherINS0_18ElementsAreMatcherISt5tupleIJNS0_13BothOfMatcherINS_18PolymorphicMatcherINS0_12FieldMatcherIN6webrtc4rtcp3Fir7RequestEjEEEENS5_INS6_ISA_hEEEEEESF_EEEEEclISt6vectorISA_SaISA_EEEENS_15AssertionResultEPKcRKT_
fun:_ZN6webrtc36RtcpPacketFirTest_TwoFciEntries_Test8TestBodyEv
}
{
bug_6773_2
Memcheck:Uninitialized
fun:vfprintf
fun:vsnprintf
fun:snprintf
fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo
fun:_ZN7testing9internal220PrintBytesInObjectToEPKhmPSo
fun:_ZN7testing8internal25UntypedFunctionMockerBase17UntypedInvokeWithEPKv
fun:_ZNK6webrtc11MockRtpRtcp11FlexfecSsrcEv
fun:_ZN6webrtc12PacketRouter16TimeToSendPacketEjtlbi
fun:_ZN6webrtc38PacketRouterTest_TimeToSendPacket_Test8TestBodyEv
}
{
bug_6773_1
Memcheck:Uninitialized
fun:vfprintf
fun:vsnprintf
fun:snprintf
fun:_ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo
fun:_ZN7testing9internal220PrintBytesInObjectToEPKhmPSo
fun:_ZN7testing8internal14DefaultPrintToISt6vectorIN6webrtc4rtcp3Fir7RequestESaIS6_EEEEviNS0_13bool_constantILb0EEERKT_PSo
fun:_ZN7testing8internal20MatchPrintAndExplainIKSt6vectorIN6webrtc4rtcp3Fir7RequestESaIS6_EERS9_EEbRT_RKNS_7MatcherIT0_EEPNS_19MatchResultListenerE
fun:_ZNK7testing8internal29PredicateFormatterFromMatcherINS0_18ElementsAreMatcherISt5tupleIJNS0_13BothOfMatcherINS_18PolymorphicMatcherINS0_12FieldMatcherIN6webrtc4rtcp3Fir7RequestEjEEEENS5_INS6_ISA_hEEEEEEEEEEEclISt6vectorISA_SaISA_EEEENS_15AssertionResultEPKcRKT_
fun:_ZN6webrtc28RtcpPacketFirTest_Parse_Test8TestBodyEv
}
{
bug_3446
Memcheck:Uninitialized

View File

@ -13,7 +13,9 @@
# This script is a copy of the chrome_tests.sh wrapper script with the following
# changes:
# - The locate_valgrind.sh of Chromium's Valgrind scripts dir is used to locate
# the Valgrind framework install.
# the Valgrind framework install. If it fails a fallback path is used instead
# (../../chromium/src/third_party/valgrind/linux_x64) and a warning message
# is showed by |show_locate_valgrind_failed_warning|.
# - webrtc_tests.py is invoked instead of chrome_tests.py.
# - Chromium's Valgrind scripts directory is added to the PYTHONPATH to make it
# possible to execute the Python scripts properly.
@ -56,8 +58,24 @@ then
CHROME_VALGRIND=`sh $CHROME_VALGRIND_SCRIPTS/locate_valgrind.sh`
if [ "$CHROME_VALGRIND" = "" ]
then
# locate_valgrind.sh failed
exit 1
CHROME_VALGRIND=../../chromium/src/third_party/valgrind/linux_x64
echo
echo "-------------------- WARNING ------------------------"
echo "locate_valgrind.sh failed."
echo "Using $CHROME_VALGRIND as a fallback location."
echo "This might be because:"
echo "1) This is a swarming bot"
echo "2) You haven't set up the valgrind binaries correctly."
echo "In this case, please make sure you have followed the instructions at"
echo "http://www.chromium.org/developers/how-tos/using-valgrind/get-valgrind"
echo "Notice: In the .gclient file, you need to add this for the 'src'"
echo "solution since our directory structure is different from Chromium's:"
echo "\"custom_deps\": {"
echo " \"src/chromium/src/third_party/valgrind\":"
echo " \"https://chromium.googlesource.com/chromium/deps/valgrind/binaries\","
echo "},"
echo "-----------------------------------------------------"
echo
fi
echo "Using valgrind binaries from ${CHROME_VALGRIND}"

View File

@ -125,6 +125,7 @@
'linux_arm': 'release_bot_arm',
'linux_asan': 'asan_lsan_clang_release_bot_x64',
'linux_memcheck': 'release_bot_x64',
'linux_memcheck_swarming': 'memcheck_release_bot_x64',
'linux_msan': 'msan_clang_release_bot_x64',
'linux_tsan2': 'tsan_clang_release_bot_x64',
'linux_ubsan': 'ubsan_clang_release_bot_x64',