77from lldbsuite .test .decorators import *
88from lldbsuite .test .lldbtest import *
99from lldbsuite .test import lldbutil
10- from dataclass import dataclass
1110
1211
1312class AddressRange :
@@ -19,6 +18,8 @@ def __init__(self, begin, end):
1918 self .end = end
2019
2120
21+ # We skip all these tests on Windows because on Windows Minidumps
22+ # are not generated by LLDB.
2223class ProcessSaveCoreMinidumpTestCaseYaml (TestBase ):
2324 def process_from_yaml (self , yaml_file ):
2425 minidump_path = self .getBuildArtifact (os .path .basename (yaml_file ) + ".dmp" )
@@ -27,6 +28,7 @@ def process_from_yaml(self, yaml_file):
2728 self .process = self .target .LoadCore (minidump_path )
2829 return self .process
2930
31+ @skipIfWindows
3032 def validate_regions_saved_correctly (
3133 self , core_process , expected_region , expected_invalid_region = None
3234 ):
@@ -52,11 +54,12 @@ def validate_regions_saved_correctly(
5254 # Validate we can't read the original_region
5355 core_process .ReadMemory (
5456 expected_invalid_region .begin ,
55- expected_invalid_region .end - expected_invalid_region .end ,
57+ expected_invalid_region .end - expected_invalid_region .begin ,
5658 error ,
5759 )
58- self .assertTrue (error .Success (), error .GetCString ())
60+ self .assertTrue (error .Fail (), error .GetCString ())
5961
62+ @skipIfWindows
6063 def test_saving_sub_memory_range (self ):
6164 """
6265 Validate we can save a Minidump for a subsection of a memory range.
@@ -89,6 +92,7 @@ def test_saving_sub_memory_range(self):
8992 core_process , expected_address_range , expected_invalid_range
9093 )
9194
95+ @skipIfWindows
9296 def test_saving_super_memory_range (self ):
9397 """
9498 Validate we can save a Minidump for a subsection of a memory range.
@@ -121,6 +125,7 @@ def test_saving_super_memory_range(self):
121125 core_process , expected_address_range , expected_invalid_range
122126 )
123127
128+ @skipIfWindows
124129 def test_region_that_goes_out_of_bounds (self ):
125130 """
126131 Validate we can save a Minidump for a custom region
@@ -151,6 +156,7 @@ def test_region_that_goes_out_of_bounds(self):
151156 core_process , expected_address_range , expected_invalid_range
152157 )
153158
159+ @skipIfWindows
154160 def test_region_that_starts_out_of_bounds (self ):
155161 """
156162 Validate we can save a Minidump for a custom region
@@ -181,6 +187,7 @@ def test_region_that_starts_out_of_bounds(self):
181187 core_process , expected_address_range , expected_invalid_range
182188 )
183189
190+ @skipIfWindows
184191 def test_region_spans_multiple_regions (self ):
185192 """
186193 Validate we can save a Minidump for a custom region
@@ -208,6 +215,7 @@ def test_region_spans_multiple_regions(self):
208215 expected_address_range = AddressRange (begin , end )
209216 self .validate_regions_saved_correctly (core_process , expected_address_range )
210217
218+ @skipIfWindows
211219 def test_region_spans_multiple_regions_with_one_subrange (self ):
212220 """
213221 Validate we can save a Minidump for a custom region
0 commit comments