Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly close the remote session (#896)
* Explicitly close the remote session * Add regression test * Styling fixes
- Loading branch information
Showing
2 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from tests.utils import ( | ||
GefUnitTestGeneric, | ||
gdb_run_cmd, | ||
gdbserver_session, | ||
) | ||
|
||
|
||
class RegressionGdbserverConnection(GefUnitTestGeneric): | ||
def test_can_establish_connection_to_gdbserver_again_after_disconnect(self): | ||
"""Ensure that gdb can connect to a gdbserver again after disconnecting (PR #896).""" | ||
|
||
with gdbserver_session(port=5001) as _, gdbserver_session(port=5002) as _: | ||
buf = gdb_run_cmd("gef-remote 127.0.0.1 5001", | ||
after=["detach", "gef-remote 127.0.0.1 5002", "continue"]) | ||
self.assertNoException(buf) |