Commit 0a3a466a authored by thestig@chromium.org's avatar thestig@chromium.org

Cleanup: Remove heapchecker references in tools/valgrind.

BUG=325380
NOTRY=true

Review URL: https://codereview.chromium.org/132983007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245629 0039d316-1c4b-4281-b951-d872f2087c98
parent 6d88aed5
......@@ -65,9 +65,6 @@ def GetSuppressions():
tsan_win = ReadSuppressionsFromFile(supp_filename)
result['win_suppressions'] = tsan_win
supp_filename = JOIN(suppressions_root, "..", "heapcheck", "suppressions.txt")
result['heapcheck_suppressions'] = ReadSuppressionsFromFile(supp_filename)
supp_filename = JOIN(suppressions_root, "drmemory", "suppressions.txt")
result['drmem_suppressions'] = ReadSuppressionsFromFile(supp_filename)
supp_filename = JOIN(suppressions_root, "drmemory", "suppressions_full.txt")
......@@ -150,7 +147,6 @@ def FilenameToTool(filename):
"""Return the name of the tool that a file is related to, or None.
Example mappings:
tools/heapcheck/suppressions.txt -> heapcheck
tools/valgrind/tsan/suppressions.txt -> tsan
tools/valgrind/drmemory/suppressions.txt -> drmemory
tools/valgrind/drmemory/suppressions_full.txt -> drmemory
......@@ -160,7 +156,7 @@ def FilenameToTool(filename):
filename = os.path.abspath(filename)
parts = filename.split(os.sep)
tool = parts[-2]
if tool in ('heapcheck', 'drmemory', 'memcheck', 'tsan'):
if tool in ('drmemory', 'memcheck', 'tsan'):
return tool
return None
......@@ -171,7 +167,6 @@ def ReadSuppressionsFromFile(filename):
"drmemory": ReadDrMemorySuppressions,
"memcheck": ReadValgrindStyleSuppressions,
"tsan": ReadValgrindStyleSuppressions,
"heapcheck": ReadValgrindStyleSuppressions,
}
tool = FilenameToTool(filename)
assert tool in tool_to_parser, (
......@@ -194,14 +189,14 @@ class ValgrindStyleSuppression(Suppression):
"""A suppression using the Valgrind syntax.
Most tools, even ones that are not Valgrind-based, use this syntax, ie
Heapcheck, TSan, etc.
TSan, etc.
Attributes:
Same as Suppression.
"""
def __init__(self, description, type, stack, defined_at):
"""Creates a suppression using the Memcheck, TSan, and Heapcheck syntax."""
"""Creates a suppression using the Memcheck and TSan, syntax."""
regex = '{\n.*\n%s\n' % type
for line in stack:
if line == ELLIPSIS:
......@@ -302,11 +297,10 @@ def ReadValgrindStyleSuppressions(lines, supp_descriptor):
continue
elif not cur_type:
if (not line.startswith("Memcheck:") and
not line.startswith("ThreadSanitizer:") and
(line != "Heapcheck:Leak")):
not line.startswith("ThreadSanitizer:")):
raise SuppressionError(
'Expected "Memcheck:TYPE", "ThreadSanitizer:TYPE" '
'or "Heapcheck:Leak", got "%s"' % line,
'Expected "Memcheck:TYPE" or "ThreadSanitizer:TYPE", '
'got "%s"' % line,
"%s:%d" % (supp_descriptor, nline))
supp_type = line.split(':')[1]
if not supp_type in ["Addr1", "Addr2", "Addr4", "Addr8",
......@@ -635,16 +629,6 @@ def SelfTest():
fun:expression
}"""
test_heapcheck_stack = """{
test
Heapcheck:Leak
fun:absolutly
fun:brilliant
obj:condition
fun:detection
fun:expression
}"""
test_tsan_stack = """{
test
ThreadSanitizer:Race
......@@ -696,11 +680,6 @@ def SelfTest():
"{\nzzz\nMemcheck:Addr4\n...\nfun:detection\n}",
]
positive_heapcheck_suppressions = [
"{\nzzz\nHeapcheck:Leak\n...\nobj:condition\n}",
"{\nzzz\nHeapcheck:Leak\nfun:absolutly\n}",
]
positive_tsan_suppressions = [
"{\nzzz\nThreadSanitizer:Race\n...\nobj:condition\n}",
"{\nzzz\nThreadSanitizer:Race\nfun:absolutly\n}",
......@@ -744,11 +723,6 @@ def SelfTest():
"{\nzzz\nMemcheck:Addr8\nfun:brilliant\n}",
]
negative_heapcheck_suppressions = [
"{\nzzz\nMemcheck:Leak\nfun:absolutly\n}",
"{\nzzz\nHeapcheck:Leak\nfun:brilliant\n}",
]
negative_tsan_suppressions = [
"{\nzzz\nThreadSanitizer:Leak\nfun:absolutly\n}",
"{\nzzz\nThreadSanitizer:Race\nfun:brilliant\n}",
......@@ -766,8 +740,6 @@ def SelfTest():
TestStack(test_memcheck_stack_4,
positive_memcheck_suppressions_4,
negative_memcheck_suppressions_4)
TestStack(test_heapcheck_stack, positive_heapcheck_suppressions,
negative_heapcheck_suppressions)
TestStack(test_tsan_stack, positive_tsan_suppressions,
negative_tsan_suppressions)
......@@ -960,7 +932,6 @@ def SelfTest():
# Test FilenameToTool.
filenames_to_tools = {
"tools/heapcheck/suppressions.txt": "heapcheck",
"tools/valgrind/tsan/suppressions.txt": "tsan",
"tools/valgrind/drmemory/suppressions.txt": "drmemory",
"tools/valgrind/drmemory/suppressions_full.txt": "drmemory",
......
......@@ -128,10 +128,6 @@ def main(argv):
cur_supp += supp['win_suppressions']
elif all([re.search("Linux%20", url) for url in all_reports[r]]):
cur_supp += supp['linux_suppressions']
# Separate from OS matches as we want to match "Linux%20Heapcheck" twice:
if all([re.search("%20Heapcheck", url)
for url in all_reports[r]]):
cur_supp += supp['heapcheck_suppressions']
if all(["DrMemory" in url for url in all_reports[r]]):
cur_supp += supp['drmem_suppressions']
if all(["DrMemory%20full" in url for url in all_reports[r]]):
......
......@@ -97,10 +97,10 @@ fetch_logs() {
REPORT_FILE="$LOGS_DIR/report_${S}_${BUILD}"
rm -f $REPORT_FILE 2>/dev/null || true # make sure it doesn't exist
REPORT_URLS=$(grep -o "[0-9]\+/steps/\(memory\|heapcheck\).*/logs/[0-9A-F]\{16\}" \
REPORT_URLS=$(grep -o "[0-9]\+/steps/memory.*/logs/[0-9A-F]\{16\}" \
"$TMPFILE" \
|| true) # `true` is to succeed on empty output
FAILED_TESTS=$(grep -o "[0-9]\+/steps/\(memory\|heapcheck\).*/logs/[A-Za-z0-9_.]\+" \
FAILED_TESTS=$(grep -o "[0-9]\+/steps/memory.*/logs/[A-Za-z0-9_.]\+" \
"$TMPFILE" | grep -v "[0-9A-F]\{16\}" \
| grep -v "stdio" || true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment