diff --git a/grizzly/common/reporter.py b/grizzly/common/reporter.py index ef95337c..bdf42284 100644 --- a/grizzly/common/reporter.py +++ b/grizzly/common/reporter.py @@ -226,25 +226,6 @@ def _process_rr_trace(self, report): # remove traces so they are not uploaded to FM (because they are huge) rmtree(trace_path) - @staticmethod - def _ignored(report): - # This is here to prevent reporting stack-less crashes - # that were caused by system OOM - log_data = report.preferred.read_text("utf-8", errors="ignore") - # ignore sanitizer OOMs missing stack - if report.stack is None: - mem_errs = ( - "ERROR: Failed to mmap", - # NOTE: max_allocation_size_mb can trigger a similar message - ": AddressSanitizer failed to allocate", - "Sanitizer: internal allocator is out of memory trying to allocate", - ) - # scan log data for memory error strings - if any(msg in log_data for msg in mem_errs): - return True - # ignore Valgrind crashes - return log_data.startswith("VEX temporary storage exhausted.") - def _submit_report(self, report, test_cases, force): collector = Collector(tool=self.tool) @@ -263,10 +244,6 @@ def _submit_report(self, report, test_cases, force): else: LOG.debug("sigCacheDir does not exist (%r)", collector.sigCacheDir) - if self._ignored(report): - LOG.info("Report is in ignore list") - return None - if report.is_hang: self.add_extra_metadata("is_hang", True) diff --git a/grizzly/common/test_reporter.py b/grizzly/common/test_reporter.py index a6623d72..06041785 100644 --- a/grizzly/common/test_reporter.py +++ b/grizzly/common/test_reporter.py @@ -156,31 +156,22 @@ def test_fuzzmanager_reporter_01(mocker, tmp_path): @mark.parametrize( - "tests, frequent, ignored, force, sig_cache", + "tests, frequent, force, sig_cache", [ # report - without test - (False, False, False, False, True), + (False, False, False, True), # report - with test - (True, False, False, False, True), + (True, False, False, True), # report - frequent - (True, True, False, False, True), + (True, True, False, True), # report - forced frequent - (True, True, False, True, True), - # report - ignored - (True, False, True, False, True), + (True, True, True, True), # report - missing sigCacheDir - (False, False, False, False, False), + (False, False, False, False), ], ) -def test_fuzzmanager_reporter_02( - mocker, tmp_path, tests, frequent, ignored, force, sig_cache -): +def test_fuzzmanager_reporter_02(mocker, tmp_path, tests, frequent, force, sig_cache): """test FuzzManagerReporter.submit()""" - mocker.patch( - "grizzly.common.reporter.FuzzManagerReporter._ignored", - new_callable=mocker.MagicMock, - return_value=ignored, - ) mocker.patch("grizzly.common.reporter.Path.cwd", return_value=tmp_path) mocker.patch("grizzly.common.reporter.getenv", autospec=True, return_value="0") fake_collector = mocker.patch("grizzly.common.reporter.Collector", autospec=True) @@ -213,7 +204,7 @@ def test_fuzzmanager_reporter_02( ) assert not log_path.is_dir() assert fake_collector.call_args == ({"tool": "fake-tool"},) - if (frequent and not force) or ignored: + if frequent and not force: assert fake_collector.return_value.submit.call_count == 0 assert fake_test.dump.call_count == 0 else: @@ -222,21 +213,6 @@ def test_fuzzmanager_reporter_02( assert fake_test.dump.call_count == 1 -def test_fuzzmanager_reporter_03(mocker, tmp_path): - """test FuzzManagerReporter._ignored()""" - log_file = tmp_path / "test.log" - log_file.touch() - report = mocker.Mock(spec_set=Report, path=tmp_path, preferred=log_file, stack=None) - # not ignored - assert not FuzzManagerReporter._ignored(report) - # ignored - sanitizer OOM missing stack - log_file.write_bytes(b"ERROR: Failed to mmap") - assert FuzzManagerReporter._ignored(report) - # ignored - Valgrind OOM - log_file.write_bytes(b"VEX temporary storage exhausted.") - assert FuzzManagerReporter._ignored(report) - - @mark.parametrize( "tool, sanitized", [ @@ -250,7 +226,7 @@ def test_fuzzmanager_reporter_03(mocker, tmp_path): ("TeSt-ToOl", "test-tool"), ], ) -def test_fuzzmanager_reporter_04(tool, sanitized): +def test_fuzzmanager_reporter_03(tool, sanitized): """test FuzzManagerReporter() sanitizing tool""" assert FuzzManagerReporter(tool).tool == sanitized