diff --git a/gdbinit.py b/gdbinit.py index faf48f9f1..da41f036d 100644 --- a/gdbinit.py +++ b/gdbinit.py @@ -1,7 +1,6 @@ from __future__ import annotations import cProfile -import glob import locale import os import site diff --git a/pwndbg/gdblib/elf.py b/pwndbg/gdblib/elf.py index bed316487..207e2663b 100644 --- a/pwndbg/gdblib/elf.py +++ b/pwndbg/gdblib/elf.py @@ -415,7 +415,6 @@ def map_inner(ei_class, ehdr, objfile: str) -> Tuple[pwndbg.lib.memory.Page, ... vaddr = int(phdr.p_vaddr) offset = int(phdr.p_offset) flags = int(phdr.p_flags) - # ptype = int(phdr.p_type) memsz += pwndbg.lib.memory.page_offset(vaddr) memsz = pwndbg.lib.memory.page_size_align(memsz) diff --git a/pyproject.toml b/pyproject.toml index 415dbb923..cc2e18056 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,6 @@ ignore = [ "E501", "E731", "F405", - "F811", "F821", "W505", ] diff --git a/tests/gdb-tests/tests/heap/test_try_free.py b/tests/gdb-tests/tests/heap/test_try_free.py index 6608781e5..47730f7de 100644 --- a/tests/gdb-tests/tests/heap/test_try_free.py +++ b/tests/gdb-tests/tests/heap/test_try_free.py @@ -201,14 +201,6 @@ def test_try_free_corrupted_consolidate_backward(start_binary): os.remove(OUTPUT_FILE) -def test_try_free_corrupted_consolidate_backward(start_binary): - chunks = setup_heap(start_binary, 13) - - result = gdb.execute(f"try_free {hex(chunks['e'])}", to_string=True) - assert "corrupted size vs. prev_size while consolidating" in result - os.remove(OUTPUT_FILE) - - @pytest.mark.skip( reason="Needs review. In the heap.py on the line 972 the condition is true always. The heap_bug.c file has the function: corrupted_unsorted_chunks()" ) diff --git a/tests/qemu-tests/tests/system/test_commands_kernel.py b/tests/qemu-tests/tests/system/test_commands_kernel.py index 25f74dcb4..5ebe049f7 100644 --- a/tests/qemu-tests/tests/system/test_commands_kernel.py +++ b/tests/qemu-tests/tests/system/test_commands_kernel.py @@ -11,13 +11,13 @@ def test_command_kbase(): def test_command_kchecksec(): res = gdb.execute("kchecksec", to_string=True) - assert res is not None # for F841 warning + assert res != "" # for F841 warning # TODO: do something with res def test_command_kcmdline(): res = gdb.execute("kcmdline", to_string=True) - assert res is not None # for F841 warning + assert res != "" # for F841 warning # TODO: do something with res diff --git a/tests/unit-tests/test_find_fastbin_size.py b/tests/unit-tests/test_find_fastbin_size.py index 04a5c4d0d..79ebd4ae1 100644 --- a/tests/unit-tests/test_find_fastbin_size.py +++ b/tests/unit-tests/test_find_fastbin_size.py @@ -61,16 +61,6 @@ def test_nozero_flags(): assert 0x0 == next(find_fastbin_size(buf, max_size, 8)) -def test_normal(): - max_size = 0x20 - offsets = { - 0x8: 0x20, - } - buf = setup_mem(max_size, offsets) - assert 0x0 == next(find_fastbin_size(buf, max_size, 1)) - assert 0x0 == next(find_fastbin_size(buf, max_size, 8)) - - def test_unaligned(): max_size = 0x20 offsets = {