Commit dbfe008b authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Add test isolation and parameters for ubsan

This adds a missing swarming config to the ubsan builders to fix
test isolation.

This also adds ubsan_vptr to the inferred options from build metadata.

For ubsan_vptr builds, the test runner makes sure to set up the
required options.

TBR=ishell@chromium.org

Bug: chromium:726584
Change-Id: I9667ba2b6d9d0f363f7cc94d23308e09da002d99
Reviewed-on: https://chromium-review.googlesource.com/577689Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46866}
parent 4f2e6e9d
......@@ -813,6 +813,7 @@ action("v8_dump_build_config") {
"is_gcov_coverage=$is_gcov_coverage",
"is_msan=$is_msan",
"is_tsan=$is_tsan",
"is_ubsan_vptr=$is_ubsan_vptr",
"target_cpu=\"$target_cpu\"",
"v8_current_cpu=\"$v8_current_cpu\"",
"v8_enable_i18n_support=$v8_enable_i18n_support",
......
......@@ -407,9 +407,9 @@
'gn_release_x64_tsan_minimal_symbols': [
'gn', 'release_bot', 'x64', 'tsan', 'minimal_symbols', 'swarming'],
'gn_release_x64_ubsan_vptr': [
'gn', 'release_bot', 'x64', 'ubsan_vptr'],
'gn', 'release_bot', 'x64', 'ubsan_vptr', 'swarming'],
'gn_release_x64_ubsan_vptr_minimal_symbols': [
'gn', 'release_bot', 'x64', 'ubsan_vptr', 'minimal_symbols'],
'gn', 'release_bot', 'x64', 'ubsan_vptr', 'minimal_symbols', 'swarming'],
'gn_release_x64_valgrind': [
'gn', 'release_bot', 'x64', 'swarming', 'valgrind',
'no_custom_libcxx'],
......
......@@ -404,6 +404,7 @@ def Execute(arch, mode, args, options, suites, workspace):
"predictable": False,
"byteorder": sys.byteorder,
"no_harness": False,
"ubsan_vptr": False,
}
all_tests = []
num_tests = 0
......
......@@ -364,8 +364,11 @@ def BuildOptions():
result.add_option("--random-seed-stress-count", default=1, type="int",
dest="random_seed_stress_count",
help="Number of runs with different random seeds")
result.add_option("--ubsan-vptr",
help="Regard test expectations for UBSanVptr",
default=False, action="store_true")
result.add_option("--msan",
help="Regard test expectations for MSAN",
help="Regard test expectations for UBSanVptr",
default=False, action="store_true")
return result
......@@ -423,6 +426,12 @@ def SetupEnvironment(options):
symbolizer,
])
if options.ubsan_vptr:
os.environ['UBSAN_OPTIONS'] = ":".join([
'print_stacktrace=1',
symbolizer,
])
if options.msan:
os.environ['MSAN_OPTIONS'] = symbolizer
......@@ -502,7 +511,8 @@ def ProcessOptions(options):
('msan', build_config["is_msan"]),
('no_i18n', not build_config["v8_enable_i18n_support"]),
('no_snap', not build_config["v8_use_snapshot"]),
('tsan', build_config["is_tsan"])):
('tsan', build_config["is_tsan"]),
('ubsan_vptr', build_config["is_ubsan_vptr"])):
cmd_line_value = getattr(options, param)
if cmd_line_value not in [None, True, False] and cmd_line_value != value:
# TODO(machenbach): This is for string options only. Requires options
......@@ -831,7 +841,8 @@ def Execute(arch, mode, args, options, suites):
"novfp3": options.novfp3,
"predictable": options.predictable,
"byteorder": sys.byteorder,
"no_harness": options.no_harness
"no_harness": options.no_harness,
"ubsan_vptr": options.ubsan_vptr,
}
all_tests = []
num_tests = 0
......
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