Skip to content

Commit 11665c4

Browse files
committed
More xfail for ARM64 -> @cross_heaven_gates
1 parent 45b781b commit 11665c4

7 files changed

Lines changed: 17 additions & 2 deletions

File tree

tests/test_handle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33

44
from .pfwtest import *
55

6+
@cross_heaven_gates # windows.system.handles
67
def test_handle_process_id():
78
handle_with_process = [h for h in windows.system.handles if h.dwProcessId]
89
handle = handle_with_process[-1]
910
proc = handle.process
1011
assert proc.pid == handle.dwProcessId == handle.pid
1112

12-
13+
@cross_heaven_gates # windows.current_process.handles
1314
def test_local_handle_type():
1415
t = windows.current_process.threads[0]
1516
th = t.handle

tests/test_parse_pe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def pe(request):
1616

1717
pop_proc = request.param
1818
proc = pop_proc()
19+
1920
for i in range(10):
2021
try:
2122
time.sleep(0.1)
@@ -91,7 +92,7 @@ def test_pe_parsing_strange_optional_header_size(tmp_path, proc32):
9192
# Also check that section retrieval works (as its position is based on OptionalHeader Size)
9293
assert set(s.name for s in mod.pe.sections) == {".text", ".data", ".l1"}
9394

94-
# Make a test from current_process parsing ?
95+
@dll_injection
9596
def test_pe_parsing_dotnet32_process_64(proc64, pe_dotnet32):
9697
# .NET pe32 loadable in 64bit process -> rewrite of the OptionalHeader
9798
mod = proc64.load_library(pe_dotnet32)
@@ -108,6 +109,7 @@ def test_pe_parsing_dotnet32_process_64(proc64, pe_dotnet32):
108109
assert mod.pe.sections
109110
assert ".text" in set(s.name for s in mod.pe.sections)
110111

112+
@dll_injection
111113
def test_pe_parsing_dotnet32_current_process_64(proc64, pe_dotnet32):
112114
# .NET pe32 loadable in 64bit process -> rewrite of the OptionalHeader
113115
# So we injecte python code in a the remote proc64 to test the parsing from itself

tests/test_process.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,12 @@ def test_current_thread_teb(self):
487487
# Check type of teb.peb is the correct subclass (with modules & co)
488488
assert teb.peb.modules
489489

490+
@cross_heaven_gates
490491
def test_thread_teb_base(self, proc32_64):
491492
t = proc32_64.threads[0]
492493
assert t.teb_base != 0
493494

495+
@cross_heaven_gates
494496
def test_teb(self, proc32_64):
495497
teb = proc32_64.threads[0].teb
496498
if proc32_64.bitness == 32:
@@ -503,13 +505,15 @@ def test_teb(self, proc32_64):
503505
assert teb.peb.modules
504506

505507
@windows_64bit_only
508+
@cross_heaven_gates
506509
def test_thread_teb_syswow_base(self, proc32):
507510
t = proc32.threads[0]
508511
assert t.teb_base != 0
509512
assert t.teb_syswow_base != 0
510513
assert t.teb_base == t.teb_syswow_base + 0x2000
511514

512515
@windows_64bit_only
516+
@cross_heaven_gates
513517
def test_thread_teb_syswow(self, proc32):
514518
teb_syswow = proc32.threads[0].teb_syswow
515519
assert type(teb_syswow) == windows.winobject.process.RemoteTEB64

tests/test_system.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_logicaldrives(self):
5151
def test_wmi(self):
5252
assert windows.system.wmi is not None
5353

54+
@cross_heaven_gates
5455
def test_handles(self):
5556
assert windows.system.handles
5657

@@ -66,6 +67,7 @@ def test_task_scheduler(self):
6667
def test_task_object_manager(self):
6768
assert windows.system.object_manager
6869

70+
@cross_heaven_gates
6971
def test_system_modules_ntosk(self):
7072
# NtQuerySystemInformation(gdef.SystemModuleInformation) returns CHAR so not unicode
7173
# Another Nt API that returns unicode ?
@@ -83,6 +85,7 @@ def test_processes(self):
8385
assert windows.current_process.pid in [p.pid for p in procs]
8486
assert is_unicode(windows.system.processes[0].name)
8587

88+
@cross_heaven_gates
8689
def test_system_modules(self):
8790
assert windows.system.modules
8891

tests/test_system_modules.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import windows
22
import ctypes
33

4+
from pfwtest import *
5+
6+
@cross_heaven_gates
47
def test_system_module_gc():
58
# Test for issue 12 (Py3)
69
# https://github.com/hakril/PythonForWindows/issues/12

tests/test_syswow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def test_self_pebsyswow(self):
5252
@python_injection
5353
@windows_64bit_only
5454
class TestSyswowRemoteProcess(object):
55+
@cross_heaven_gates
5556
def test_remote_pebsyswow(self, proc32):
5657
peb64 = proc32.peb_syswow
5758
modules_names = [m.name for m in peb64.modules]

tests/test_wmi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def test_get_object(name, cls):
7575
# Todo: test
7676
# - put_instance
7777

78+
@cross_heaven_gates # proc.peb.commandline.str == cmdline
7879
@pytest.mark.parametrize("cmdline", [r"winver.exe test_string_pfw"])
7980
def test_exec_method_Win32_Process_create(cmdline):
8081
namespace = windows.system.wmi["root\\cimv2"]

0 commit comments

Comments
 (0)