Bug 1458456 part 6 - Some TSan automation changes. r=sfink

This commit is contained in:
Jan de Mooij 2018-05-04 17:29:05 +02:00
Родитель 2997a50ac8
Коммит 8071de3bdd
2 изменённых файлов: 3 добавлений и 72 удалений

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

@ -501,7 +501,7 @@ if variant.get('ignore-test-failures'):
logging.warning("Ignoring test results %s" % (results,))
results = [0]
if args.variant in ('tsan', 'msan'):
if args.variant == 'msan':
files = filter(lambda f: f.startswith("sanitize_log."), os.listdir(OUTDIR))
fullfiles = [os.path.join(OUTDIR, f) for f in files]
@ -533,43 +533,6 @@ if args.variant in ('tsan', 'msan'):
if len(sites) > max_allowed:
results.append(1)
if 'expect-errors' in variant:
# Line numbers may shift around between versions, so just look for
# matching filenames and function names. This will still produce false
# positives when functions are renamed or moved between files, or
# things change so that the actual race is in a different place. But it
# still seems preferable to saying "You introduced an additional race.
# Here are the 21 races detected; please ignore the 20 known ones in
# this other list."
for site in sites:
# Grab out the file and function names.
m = re.search(r'/([^/]+):\d+ in (.+)', site)
if m:
error = tuple(m.groups())
else:
# will get here if eg tsan symbolication fails
error = (site, '(unknown)')
errors[error] += 1
remaining = Counter(errors)
for expect in variant['expect-errors']:
# expect-errors is an array of (filename, function) tuples.
expect = tuple(expect)
if remaining[expect] == 0:
print("Did not see known error in %s function %s" % expect)
else:
remaining[expect] -= 1
status = 0
for filename, function in (e for e, c in remaining.items() if c > 0):
if AUTOMATION:
print("TinderboxPrint: tsan error<br/>%s function %s" % (filename, function))
status = 1
else:
print("*** tsan error in %s function %s" % (filename, function))
results.append(status)
# Gather individual results into a tarball. Note that these are
# distinguished only by pid of the JS process running within each test, so
# given the 16-bit limitation of pids, it's totally possible that some of

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

@ -6,39 +6,7 @@
"env": {
"LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer",
"JITTEST_EXTRA_ARGS": "--jitflags=tsan --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt --unusable-error-status --exclude-from={DIR}/tsan-sighandlers.txt",
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt",
"TSAN_OPTIONS": "exitcode=0 log_path={OUTDIR}/sanitize_log"
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt"
},
"use_minidump": false,
"[comment on expect-errors]": "Note that expect-errors may contain duplicates. These indicate that tsan reports errors as two distinct line numbers in the same function. (Line number shift around, so we cannot just include them here.)",
"expect-errors": [
[ "Shape.h", "inDictionary" ],
[ "Shape.h", "maybeSlot" ],
[ "Shape.h", "slotSpan" ],
[ "Shape.h", "setSlotWithType" ],
[ "Shape.h", "search<js::MaybeAdding::NotAdding>" ],
[ "Shape.h", "setOverwritten" ],
[ "Shape.h", "incrementNumLinearSearches" ],
[ "Shape.h", "isBigEnoughForAShapeTable" ],
[ "Shape.h", "js::jit::CodeGenerator::emitGetPropertyPolymorphic(js::jit::LInstruction*, js::jit::Register, js::jit::Register, js::jit::TypedOrValueRegister const&)" ],
[ "ProtectedData.h", "operator=<js::CooperatingContext>" ],
[ "ProtectedData.h", "js::ZoneGroup::leave()" ],
[ "jsfriendapi.h", "GetObjectClass" ],
[ "jsfriendapi.h", "numFixedSlots" ],
[ "jsfriendapi.h", "numDynamicSlots" ],
[ "jsfriendapi.h", "EmulatesUndefined" ],
[ "jitprofiling.c", "iJIT_GetNewMethodID" ],
[ "Marking.cpp", "js::GCMarker::reset()" ],
[ "Statistics.h", "js::gc::GCRuntime::pickChunk(js::AutoLockGC const&, js::gc::AutoMaybeStartBackgroundAllocation&)" ],
[ "Statistics.h", "js::gc::GCRuntime::getOrAllocChunk(js::AutoLockGC const&, js::gc::AutoMaybeStartBackgroundAllocation&)" ],
[ "Barrier.h", "set" ],
[ "Stack.h", "context" ],
[ "Stack.h", "js::HelperThread::handleIonWorkload(js::AutoLockHelperThreadState&)" ],
[ "ObjectGroup.h", "addendumKind" ],
[ "ObjectGroup.h", "generation" ],
[ "ObjectGroup.h", "js::jit::MObjectState::New(js::jit::TempAllocator&, js::jit::MDefinition*)" ],
[ "TypeInference-inl.h", "setBasePropertyCount" ],
[ "jsfun.h", "setResolvedLength" ],
[ "jsfun.h", "needsSomeEnvironmentObject" ]
]
"use_minidump": false
}