Bug 1432395 - Rename valgrind suppressions files to something more generic. r=froydnj

The MACHTYPE bash variable is an odd thing that returns e.g.
x86_64-redhat-linux-gnu on a CentOS system, but x86_64-pc-linux-gnu
on a Debian system, and possibly something different on other distros.

mach valgrind-test is the only place actually relying on MACHTYPE.
Others rely on information from python modules. Uniformize that, and use
the more generic 'pc' rather than 'redhat'.

--HG--
rename : build/valgrind/i386-redhat-linux-gnu.sup => build/valgrind/i386-pc-linux-gnu.sup
rename : build/valgrind/x86_64-redhat-linux-gnu.sup => build/valgrind/x86_64-pc-linux-gnu.sup
extra : rebase_source : ad94ce69e8094d2b9ddae97a3d261945886c0a61
This commit is contained in:
Mike Hommey 2018-01-27 10:22:56 +09:00
Родитель bade77fe89
Коммит 478ce5d0b3
8 изменённых файлов: 19 добавлений и 15 удалений

Просмотреть файл

@ -114,8 +114,8 @@ OBJDIR_FILES += ['/.ycm_extra_conf.py']
if CONFIG['MOZ_VALGRIND']:
OBJDIR_FILES._valgrind += [
'valgrind/cross-architecture.sup',
'valgrind/i386-redhat-linux-gnu.sup',
'valgrind/x86_64-redhat-linux-gnu.sup',
'valgrind/i386-pc-linux-gnu.sup',
'valgrind/x86_64-pc-linux-gnu.sup',
]
if CONFIG['MOZ_ARTIFACT_BUILDS']:

Просмотреть файл

@ -5,6 +5,7 @@
from __future__ import absolute_import, unicode_literals
import logging
import mozinfo
import os
import subprocess
@ -130,9 +131,12 @@ class MachCommands(MachCommandBase):
supps_file1 = os.path.join(supps_dir, 'cross-architecture.sup')
valgrind_args.append('--suppressions=' + supps_file1)
# MACHTYPE is an odd bash-only environment variable that doesn't
# show up in os.environ, so we have to get it another way.
machtype = subprocess.check_output(['bash', '-c', 'echo $MACHTYPE']).rstrip()
if mozinfo.os == 'linux':
machtype = {
'x86_64': 'x86_64-pc-linux-gnu',
'x86': 'i386-pc-linux-gnu',
}.get(mozinfo.processor)
if machtype:
supps_file2 = os.path.join(supps_dir, machtype + '.sup')
if os.path.isfile(supps_file2):
valgrind_args.append('--suppressions=' + supps_file2)

Просмотреть файл

@ -96,10 +96,10 @@ def get_default_valgrind_suppression_files():
rv = []
if mozinfo.os == "linux":
if mozinfo.processor == "x86_64":
rv.append(os.path.join(supps_path, "x86_64-redhat-linux-gnu.sup"))
rv.append(os.path.join(supps_path, "x86_64-pc-linux-gnu.sup"))
rv.append(os.path.join(supps_path, "cross-architecture.sup"))
elif mozinfo.processor == "x86":
rv.append(os.path.join(supps_path, "i386-redhat-linux-gnu.sup"))
rv.append(os.path.join(supps_path, "i386-pc-linux-gnu.sup"))
rv.append(os.path.join(supps_path, "cross-architecture.sup"))
return rv

Просмотреть файл

@ -39,8 +39,8 @@ TEST_HARNESS_FILES.testing.mochitest += [
'/build/sanitizers/lsan_suppressions.txt',
'/build/sanitizers/ubsan_suppressions.txt',
'/build/valgrind/cross-architecture.sup',
'/build/valgrind/i386-redhat-linux-gnu.sup',
'/build/valgrind/x86_64-redhat-linux-gnu.sup',
'/build/valgrind/i386-pc-linux-gnu.sup',
'/build/valgrind/x86_64-pc-linux-gnu.sup',
'/netwerk/test/httpserver/httpd.js',
'bisection.py',
'browser-harness.xul',

Просмотреть файл

@ -21,14 +21,14 @@ if platform.architecture()[0] == "64bit":
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux64/releng.manifest"
MINIDUMP_STACKWALK_PATH = "linux64-minidump_stackwalk"
VALGRIND_SUPP_ARCH = os.path.join(VALGRIND_SUPP_DIR,
"x86_64-redhat-linux-gnu.sup")
"x86_64-pc-linux-gnu.sup")
NODEJS_PATH = "node-linux-x64/bin/node"
NODEJS_TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux64/nodejs.manifest"
else:
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest"
MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
VALGRIND_SUPP_ARCH = os.path.join(VALGRIND_SUPP_DIR,
"i386-redhat-linux-gnu.sup")
"i386-pc-linux-gnu.sup")
NODEJS_PATH = "node-linux-x86/bin/node"
NODEJS_TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/nodejs.manifest"

Просмотреть файл

@ -105,7 +105,7 @@ x_error_handler(Display *, XErrorEvent *ev)
// glxtest is declared inside extern "C" so that the name is not mangled.
// The name is used in build/valgrind/x86_64-redhat-linux-gnu.sup to suppress
// The name is used in build/valgrind/x86_64-pc-linux-gnu.sup to suppress
// memory leak errors because we run it inside a short lived fork and we don't
// care about leaking memory
extern "C" {