Skip to content

Commit

Permalink
Flash: fix flash_suspend example to include worst case
Browse files Browse the repository at this point in the history
flash_suspend example will now test the worst case in order to be able
to detect real regression:
- shorter response time is acceptable, as the tested function may be in the cache already
- response time longer than 120us will be considered a potential regression
  • Loading branch information
o-marshmallow committed Sep 15, 2022
1 parent 6798bfc commit 79598b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/system/flash_suspend/pytest_flash_suspend.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_flash_suspend_example(dut: Dut) -> None:
dut.expect_exact('found partition')
res = dut.expect(r'During Erase, ISR callback function\(in flash\) response time:\s+(\d+(\.\d{1,2})) us')
response_time = res.group(1).decode('utf8')
assert 0 <= float(response_time) < 40
assert 0 <= float(response_time) < 120

res = dut.expect(r'During Erase, ISR callback function\(in iram\) response time:\s+(\d+(\.\d{1,2})) us')
response_time = res.group(1).decode('utf8')
Expand Down

0 comments on commit 79598b1

Please sign in to comment.