mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
more pytest POC + fixed debugger code + test FunctionHXBP
This commit is contained in:
@@ -11,7 +11,7 @@ import windows.native_exec.simple_x64 as x64
|
||||
from conftest import generate_pop_and_exit_fixtures, pop_proc_32, pop_proc_64
|
||||
from pfwtest import *
|
||||
|
||||
pytestmark = pytest.mark.usefixtures('check_for_gc_garbage')
|
||||
# pytestmark = pytest.mark.usefixtures('check_for_gc_garbage', "check_for_handle_leak")
|
||||
|
||||
proc32_debug = generate_pop_and_exit_fixtures([pop_proc_32], ids=["proc32dbg"], dwCreationFlags=gdef.DEBUG_PROCESS)
|
||||
proc64_debug = generate_pop_and_exit_fixtures([pop_proc_64], ids=["proc64dbg"], dwCreationFlags=gdef.DEBUG_PROCESS)
|
||||
@@ -106,9 +106,11 @@ def test_multiple_hwx_breakpoint(proc32_64_debug):
|
||||
# Used to verif we actually called the Breakpoints
|
||||
assert TSTBP.COUNTER == 4
|
||||
|
||||
|
||||
# @check_for_gc_garbage
|
||||
@check_for_handle_leak
|
||||
def test_four_hwx_breakpoint_fail(proc32_64_debug):
|
||||
"""Check that setting 4HXBP in the same thread fails"""
|
||||
# print("test_four_hwx_breakpoint_fail {0}".format(proc32_64_debug))
|
||||
class TSTBP(windows.debug.HXBreakpoint):
|
||||
def __init__(self, addr, expec_before):
|
||||
self.addr = addr
|
||||
@@ -165,7 +167,8 @@ def test_hwx_breakpoint_are_on_all_thread(proc32_64_debug):
|
||||
# Used to verif we actually called the Breakpoints
|
||||
assert TSTBP.COUNTER == 2
|
||||
|
||||
@check_for_handle_leak
|
||||
# @check_for_handle_leak
|
||||
# @check_for_gc_garbage
|
||||
@pytest.mark.parametrize("bptype", [windows.debug.Breakpoint, windows.debug.HXBreakpoint])
|
||||
def test_simple_breakpoint_name_addr(proc32_64_debug, bptype):
|
||||
"""Check breakpoint address resolution for format dll!api"""
|
||||
|
||||
Reference in New Issue
Block a user