def test_everything_we_hoped_for(self): raw_crash = copy.copy(canonical_standard_raw_crash) raw_dumps = {} processed_crash = DotDict() processed_crash.json_dump = copy.copy(canonical_stackwalker_output) processor_meta = get_basic_processor_meta() rule = CrashingThreadRule() rule.act(raw_crash, raw_dumps, processed_crash, processor_meta) assert processed_crash.crashedThread == 0
def test_everything_we_hoped_for(self): raw_crash = copy.deepcopy(canonical_standard_raw_crash) raw_dumps = {} processed_crash = { "json_dump": copy.deepcopy(canonical_stackwalker_output) } processor_meta = get_basic_processor_meta() rule = CrashingThreadRule() rule.act(raw_crash, raw_dumps, processed_crash, processor_meta) assert processed_crash["crashedThread"] == 0
def test_stuff_missing(self): raw_crash = copy.deepcopy(canonical_standard_raw_crash) raw_dumps = {} processed_crash = {"json_dump": {}} processor_meta = get_basic_processor_meta() rule = CrashingThreadRule() rule.act(raw_crash, raw_dumps, processed_crash, processor_meta) assert processed_crash["crashedThread"] is None assert processor_meta["processor_notes"] == [ "MDSW did not identify the crashing thread" ]
def test_stuff_missing(self): raw_crash = copy.copy(canonical_standard_raw_crash) raw_dumps = {} processed_crash = DotDict() processed_crash.json_dump = {} processor_meta = get_basic_processor_meta() rule = CrashingThreadRule() rule.act(raw_crash, raw_dumps, processed_crash, processor_meta) assert processed_crash.crashedThread is None assert processor_meta.processor_notes == [ 'MDSW did not identify the crashing thread' ]
def get_ruleset(self, config): """Generate rule set for Mozilla crash processing. :arg config: configman DotDict config instance :returns: pipeline of rules """ return [ # fix the raw crash removing null characters DeNullRule(), # rules to change the internals of the raw crash ProductRewrite(), ESRVersionRewrite(), PluginContentURL(), PluginUserComment(), # rules to transform a raw crash into a processed crash IdentifierRule(), MinidumpSha256Rule(), BreakpadStackwalkerRule2015( dump_field=config.breakpad.dump_field, symbols_urls=config.breakpad.symbols_urls, command_line=config.breakpad.command_line, command_pathname=config.breakpad.command_pathname, kill_timeout=config.breakpad.kill_timeout, symbol_tmp_path=config.breakpad.symbol_tmp_path, symbol_cache_path=config.breakpad.symbol_cache_path, tmp_storage_path=config.breakpad.tmp_storage_path), ProductRule(), UserDataRule(), EnvironmentRule(), PluginRule(), AddonsRule(), DatesAndTimesRule(), OutOfMemoryBinaryRule(), JavaProcessRule(), MozCrashReasonRule(), # post processing of the processed crash CrashingThreadRule(), CPUInfoRule(), OSInfoRule(), BetaVersionRule( version_string_api=config.betaversion.version_string_api), ExploitablityRule(), FlashVersionRule(), OSPrettyVersionRule(), TopMostFilesRule(), ThemePrettyNameRule(), MemoryReportExtraction(), # generate signature now that we've done all the processing it depends on SignatureGeneratorRule(), # a set of classifiers to help with jit crashes--must be last since it # depends on signature generation JitCrashCategorizeRule( dump_field=config.jit.dump_field, command_line=config.jit.command_line, command_pathname=config.jit.command_pathname, kill_timeout=config.jit.kill_timeout), ]