[infra] Recognize the exit code for UBSAN failures.
This seems to only affect the bots and not local runs of test.py. Bug: https://github.com/dart-lang/sdk/issues/39427 Change-Id: I3d80fc662a29585416a61f454b21f977853c0e71 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147621 Reviewed-by: William Hesse <whesse@google.com> Commit-Queue: William Hesse <whesse@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
212b281d8f
commit
cb46dbb237
@@ -696,6 +696,7 @@ class VMCommandOutput extends CommandOutput with _UnittestSuiteMessagesMixin {
|
||||
static const _compileErrorExitCode = 254;
|
||||
static const _uncaughtExceptionExitCode = 255;
|
||||
static const _adbInfraFailureCodes = [10];
|
||||
static const _ubsanFailureExitCode = 1;
|
||||
|
||||
VMCommandOutput(Command command, int exitCode, bool timedOut,
|
||||
List<int> stdout, List<int> stderr, Duration time, int pid)
|
||||
@@ -751,6 +752,7 @@ class VMCommandOutput extends CommandOutput with _UnittestSuiteMessagesMixin {
|
||||
// The actual outcome depends on the exitCode.
|
||||
if (exitCode == _compileErrorExitCode) return Expectation.compileTimeError;
|
||||
if (exitCode == _uncaughtExceptionExitCode) return Expectation.runtimeError;
|
||||
if (exitCode == _ubsanFailureExitCode) return Expectation.fail;
|
||||
if (exitCode != 0) {
|
||||
var ourExit = 5;
|
||||
// Unknown nonzero exit code from vm command.
|
||||
|
||||
@@ -1014,8 +1014,10 @@ final Map<String, String> sanitizerEnvironmentVariables = (() {
|
||||
if (symbolizerPath != null) {
|
||||
symbolizerPath = path.join(Directory.current.path, symbolizerPath);
|
||||
environment['ASAN_SYMBOLIZER_PATH'] = symbolizerPath;
|
||||
environment['LSAN_SYMBOLIZER_PATH'] = symbolizerPath;
|
||||
environment['MSAN_SYMBOLIZER_PATH'] = symbolizerPath;
|
||||
environment['TSAN_SYMBOLIZER_PATH'] = symbolizerPath;
|
||||
environment['UBSAN_SYMBOLIZER_PATH'] = symbolizerPath;
|
||||
}
|
||||
|
||||
return environment;
|
||||
|
||||
@@ -351,8 +351,10 @@ def SanitizerEnvironmentVariables():
|
||||
if symbolizer_path:
|
||||
symbolizer_path = str(os.path.join(DART_ROOT, symbolizer_path))
|
||||
env['ASAN_SYMBOLIZER_PATH'] = symbolizer_path
|
||||
env['LSAN_SYMBOLIZER_PATH'] = symbolizer_path
|
||||
env['MSAN_SYMBOLIZER_PATH'] = symbolizer_path
|
||||
env['TSAN_SYMBOLIZER_PATH'] = symbolizer_path
|
||||
env['UBSAN_SYMBOLIZER_PATH'] = symbolizer_path
|
||||
return env
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user