Ejemplo n.º 1
0
    def test_everything_we_hoped_for(self):
        uuid = '00000000-0000-0000-0000-000002140504'
        raw_crash = {'uuid': uuid}
        raw_dumps = {}
        processed_crash = {}
        processor_meta = get_basic_processor_meta()

        rule = IdentifierRule()
        rule.act(raw_crash, raw_dumps, processed_crash, processor_meta)

        assert processed_crash['crash_id'] == uuid
        assert processed_crash['uuid'] == uuid
Ejemplo n.º 2
0
    def test_uuid_missing(self):
        raw_crash = {}
        raw_dumps = {}
        processed_crash = {}
        processor_meta = get_basic_processor_meta()

        rule = IdentifierRule()
        rule.act(raw_crash, raw_dumps, processed_crash, processor_meta)

        # raw crash and processed crashes should be unchanged
        assert raw_crash == {}
        assert processed_crash == {}
Ejemplo n.º 3
0
    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),
        ]