forked from Imagelibrary/littlefs
Fixed race condition killing test processes in test/bench.py
Note sure why we weren't hitting this earlier, but I've been hitting this race condition a bunch recently and it's annoying. Now every failed process kills the other test processes unconditionally. It's not clear if this actually _fixes_ the race condition or just makes it less likely, but it's good enough to keep the test script user friendly.
This commit is contained in:
@@ -1134,16 +1134,15 @@ def run_stage(name, runner, bench_ids, stdout_, trace_, output_, **args):
|
||||
|
||||
except BenchFailure as failure:
|
||||
# race condition for multiple failures?
|
||||
if failures and not args.get('keep_going'):
|
||||
break
|
||||
if not failures or args.get('keep_going'):
|
||||
# keep track of how many failed
|
||||
failed_perms += 1
|
||||
|
||||
# keep track of how many failed
|
||||
failed_perms += 1
|
||||
|
||||
# do not store more failures than we need to, otherwise we
|
||||
# quickly explode RAM when a common bug fails a bunch of cases
|
||||
if len(failures) < args.get('failures', 3):
|
||||
failures.append(failure)
|
||||
# do not store more failures than we need to, otherwise
|
||||
# we quickly explode RAM when a common bug fails a bunch
|
||||
# of cases
|
||||
if len(failures) < args.get('failures', 3):
|
||||
failures.append(failure)
|
||||
|
||||
if args.get('keep_going') and not killed:
|
||||
# resume after failed bench
|
||||
|
||||
Reference in New Issue
Block a user