Compare commits

..

No commits in common. "f43" and "rawhide" have entirely different histories.

3 changed files with 2 additions and 61 deletions

View file

@ -18,8 +18,6 @@ Source1: gdb-gef
# https://github.com/hugsy/gef/pull/1094
Patch0: gef-got-audit.patch
Patch1: gef-gcc15.patch
Patch2: gef-buffer.patch
Patch3: gef-tcache-tests.patch
BuildArch: noarch
ExclusiveArch: x86_64
@ -37,6 +35,7 @@ BuildRequires: file
BuildRequires: binutils
BuildRequires: procps-ng
BuildRequires: python3
BuildRequires: python3-pylint
BuildRequires: python3-pytest
BuildRequires: python3-pytest-benchmark
BuildRequires: python3-pytest-cov
@ -68,8 +67,6 @@ the relevant information from the debugging runtime.
%forgesetup
%patch 0 -p1
%patch 1 -p1
%patch 2 -p1
%patch 3 -p1
%build
@ -87,7 +84,7 @@ install -m 0755 %{SOURCE1}.sh %{buildroot}/%{_bindir}/gdb-gef
%if %{with check}
%check
make -C tests/binaries
python3 -m pytest -v -m "not benchmark and not online and not tcache" tests/
python3 -m pytest -v -m "not benchmark" -m "not online" tests/
%endif

View file

@ -1,18 +0,0 @@
diff --git a/gef.py b/gef.py
index 7ce988f..61a75f5 100644
--- a/gef.py
+++ b/gef.py
@@ -82,8 +82,12 @@ import warnings
from functools import lru_cache
from io import StringIO, TextIOWrapper
from types import ModuleType
-from typing import (Any, ByteString, Callable, Generator, Iterable, Iterator,
+from typing import (Any, Callable, Generator, Iterable, Iterator,
NoReturn, Sequence, Type, TypeVar, cast)
+try:
+ from typing import ByteString
+except ImportError:
+ from collections.abc import Buffer as ByteString
from urllib.request import urlopen

View file

@ -1,38 +0,0 @@
diff --git a/tests/commands/heap.py b/tests/commands/heap.py
index b3bce6f..49226ba 100644
--- a/tests/commands/heap.py
+++ b/tests/commands/heap.py
@@ -2,6 +2,8 @@
Heap commands test module
"""
+import pytest
+
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
@@ -179,6 +181,7 @@ class HeapCommandNonMain(RemoteGefUnitTestGeneric):
res = gdb.execute(cmd, to_string=True)
self.assertIn("size=0x20", res)
+ @pytest.mark.tcache
def test_cmd_heap_bins_tcache(self):
gdb = self._gdb
gdb.execute("run")
@@ -292,6 +295,7 @@ class HeapCommandTcache(RemoteGefUnitTestGeneric):
self.expected_tcache_bin_size = 0x20 if ARCH == "i686" or is_64b() else 0x18
return super().setUp()
+ @pytest.mark.tcache
def test_cmd_heap_bins_tcache_all(self):
gdb = self._gdb
gdb.execute("run")
diff --git a/tests/pytest.ini b/tests/pytest.ini
index 726db8e..7b86b98 100644
--- a/tests/pytest.ini
+++ b/tests/pytest.ini
@@ -14,3 +14,4 @@ testpaths =
markers =
slow: flag test as slow (deselect with '-m "not slow"')
online: flag test as requiring internet to work (deselect with '-m "not online"')
+ tcache: flag test as checking glibc tcache (deselect with '-m "not tcache"')