Skip to content

Commit

Permalink
Remove check for rr traceback in stderr logs
Browse files Browse the repository at this point in the history
This has been moved to FFPuppet.
  • Loading branch information
tysmith committed May 21, 2024
1 parent 78fb816 commit 0816053
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
11 changes: 0 additions & 11 deletions grizzly/common/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from hashlib import sha1
from logging import getLogger
from mmap import ACCESS_READ, mmap
from os import SEEK_END
from pathlib import Path
from platform import machine, system
Expand Down Expand Up @@ -77,16 +76,6 @@ def __init__(
for log in log_path.iterdir():
if log.is_file() and log.stat().st_size > size_limit:
Report.tail(log, size_limit)
# check for rr traceback and warn
if self._logs.stderr and (log_path / "rr-traces").is_dir():
with self._logs.stderr.open("rb") as lfp:
try:
with mmap(lfp.fileno(), 0, access=ACCESS_READ) as lmm:
if lmm.find(b"=== Start rr backtrace:") != -1:
LOG.warning("rr traceback detected in stderr log")
except ValueError:
# cannot mmap an empty file on Windows
pass
# look through logs one by one until we find a stack
for log_file in (x for x in self._logs if x is not None):
stack = Stack.from_text(log_file.read_text("utf-8", errors="ignore"))
Expand Down
18 changes: 0 additions & 18 deletions grizzly/common/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,21 +412,3 @@ def test_report_16(mocker, tmp_path, hang, has_log, expected):
assert report.short_signature == expected
if hang:
assert report.crash_hash == "hang"


@mark.parametrize(
"log_data",
[
# empty stderr log
b"",
# contains rr traceback
b"foo\n=== Start rr backtrace:\nfoo",
# no traceback
b"foo\nfoo",
],
)
def test_report_17(tmp_path, log_data):
"""test Report check for rr traceback"""
(tmp_path / "log_stderr.txt").write_bytes(log_data)
(tmp_path / "rr-traces").mkdir()
assert Report(tmp_path, Path("bin"))

0 comments on commit 0816053

Please sign in to comment.