more pytest POC + fixed debugger code + test FunctionHXBP

This commit is contained in:
Clement Rouault
2017-09-07 17:13:59 +02:00
parent 89e486cd95
commit 7db5620210
7 changed files with 57 additions and 53 deletions
+6 -3
View File
@@ -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"""