File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2129,9 +2129,13 @@ def setup(self):
21292129 def test (self ):
21302130 # Execute 2 instructions.
21312131 output = self .gdb .command ("monitor riscv icount set m 2" )
2132- assertNotIn ("Failed" , output )
2132+ if self .target .icount_limit > 1 :
2133+ assertNotIn ("Failed" , output )
2134+ else :
2135+ assertIn ("Failed" , output )
2136+ self .gdb .b ("main_post_csrr" )
21332137 output = self .gdb .c ()
2134- assertIn ("breakpoint " , output )
2138+ assertIn ("main_post_csrr " , output )
21352139 main_post_csrr = self .gdb .p ("&main_post_csrr" )
21362140 assertEqual (self .gdb .p ("$pc" ), main_post_csrr )
21372141
Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ class Target:
138138 # Supports controlling hart availability through DMCUSTOM.
139139 support_unavailable_control = False
140140
141+ # Instruction count limit
142+ icount_limit = 4
143+
141144 # Internal variables:
142145 directory = None
143146 temporary_files = []
You can’t perform that action at this time.
0 commit comments