Skip to contentSkip to conversation

kunit: fix missing f in f-string in run_checks.py

PATCH In review Daniel Latypov 3 participants 3 messages Jan 27, 2022 – Jan 31, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kunit: fix missing f in f-string in run_checks.py

We're missing the f prefix to have python do string interpolation, so we'd never end up printing what the actual "unexpected" error is.

Fixes ee92ed38364e ("kunit: add run_checks.py script to validate kunit changes")
---
 tools/testing/kunit/run_checks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/kunit/run_checks.py +1 -1
index 4f32133ed77c..13d854afca9d 100755
@@ -61,7 +61,7 @@ def main(argv: Sequence[str]) -> None:
 		elif isinstance(ex, subprocess.CalledProcessError):
 			print(f'{name}: FAILED')
 		else:
-			print('{name}: unexpected exception: {ex}')
+			print(f'{name}: unexpected exception: {ex}')
 			continue
 
 		output = ex.output

base-commit: 6125a5c70acddd9fc1fb7329047a254c74d0173c

Signature · 1 line
2.35.0.rc2.247.g8bbb082509-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Daniel Latypov

We're missing the f prefix to have python do string interpolation, so we'd never end up printing what the actual "unexpected" error is.

Fixes ee92ed38364e ("kunit: add run_checks.py script to validate kunit changes")

---

Looks good!

Cheers,
-- David

Quoted 21 lines
 tools/testing/kunit/run_checks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/kunit/run_checks.py +1 -1
index 4f32133ed77c..13d854afca9d 100755
@@ -61,7 +61,7 @@ def main(argv: Sequence[str]) -> None:
                elif isinstance(ex, subprocess.CalledProcessError):
                        print(f'{name}: FAILED')
                else:
-                       print('{name}: unexpected exception: {ex}')
+                       print(f'{name}: unexpected exception: {ex}')
                        continue
 
                output = ex.output

base-commit: 6125a5c70acddd9fc1fb7329047a254c74d0173c --
2.35.0.rc2.247.g8bbb082509-goog