Files
gef/tests/regressions/gdbserver_connection.py
T
crazy hugsy 90cced847b [Maintenance] Remove unmaintained commands, tests, and documentation, and moved to Ruff (#1222)
## Description

This PR  
 - removes unmaintained `shellcode` commands, tests, and documentation
- (finally) switches to Ruff instead of Pylint (still handled by
`pre-commit`)
 - fixes a few ruff/ty-found issues
2026-05-02 12:15:26 -07:00

24 lines
786 B
Python

import pytest
from tests.base import RemoteGefUnitTestGeneric
from tests.utils import (
ARCH,
IN_GITHUB_ACTIONS,
gdbserver_session,
)
class RegressionGdbserverConnection(RemoteGefUnitTestGeneric):
@pytest.mark.skipif(
ARCH == "aarch64" and IN_GITHUB_ACTIONS, reason=f"Skipped for {ARCH} on CI"
)
def test_can_establish_connection_to_gdbserver_again_after_disconnect(self):
"""Ensure that gdb can connect to a gdbserver again after disconnecting (PR #896)."""
gdb = self._gdb
with gdbserver_session(port=5001) as _, gdbserver_session(port=5002) as _:
gdb.execute("gef-remote 127.0.0.1 5001")
gdb.execute("detach")
gdb.execute("gef-remote 127.0.0.1 5002")
gdb.execute("continue")