| 1 |
From: Keith Packard <[email protected]> |
| 2 |
Date: Sun, 5 Jan 2025 16:52:48 -0800 |
| 3 |
Subject: test: Fix use of allowed_failures in pathological_tests.py |
| 4 |
|
| 5 |
The test needs to check if the test description is a valid key in the |
| 6 |
allowed_failures dictionary instead of attempting to fetch from the |
| 7 |
dictionary as most of the descriptions are not present in the |
| 8 |
dictionary leading to a missing key error at runtime. |
| 9 |
|
| 10 |
Signed-off-by: Keith Packard <[email protected]> |
| 11 |
--- |
| 12 |
test/pathological_tests.py | 4 ++-- |
| 13 |
1 file changed, 2 insertions(+), 2 deletions(-) |
| 14 |
|
| 15 |
diff --git a/test/pathological_tests.py b/test/pathological_tests.py |
| 16 |
index 80b5261..c2fdff6 100644 |
| 17 |
--- a/test/pathological_tests.py |
| 18 |
+++ b/test/pathological_tests.py |
| 19 |
@@ -146,12 +146,12 @@ if __name__ == '__main__': |
| 20 |
p.terminate() |
| 21 |
p.join() |
| 22 |
print('[TIMED OUT]') |
| 23 |
- if allowed_failures[description]: |
| 24 |
+ if description in allowed_failures: |
| 25 |
ignored += 1 |
| 26 |
else: |
| 27 |
errored += 1 |
| 28 |
elif p.exitcode != 0: |
| 29 |
- if allowed_failures[description]: |
| 30 |
+ if description in allowed_failures: |
| 31 |
ignored += 1 |
| 32 |
else: |
| 33 |
errored += 1 |