Skip to contentSkip to conversation

scripts: improve message when TAP based tests fail

PATCH Applied Daniel P. Berrangé 2 participants 2 messages Jul 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: improve message when TAP based tests fail

If one of the qtests fails, the TAP driver prints out a message like:

ERROR - too few tests run (expected 3, got 1)

which fails to tell you which test program failed. This is a critical ommission when many tests are running in parallel as their output is interleaved. The improved message is:

ERROR endianness-test - too few tests run (expected 3, got 1)

---
 scripts/tap-driver.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/tap-driver.pl +1 -1
index 6621a5cd67..b1d3880c50 100755
@@ -217,7 +217,7 @@ sub report ($;$)
 
 sub testsuite_error ($)
 {
-  report "ERROR", "- $_[0]";
+  report "ERROR", "$test_name - $_[0]";
 }
 
 sub handle_tap_result ($)
Signature · 1 line
2.26.2
#1 lore raw
Quoted 21 lines · Daniel P. Berrangé

If one of the qtests fails, the TAP driver prints out a message like:

ERROR - too few tests run (expected 3, got 1)

which fails to tell you which test program failed. This is a critical ommission when many tests are running in parallel as their output is interleaved. The improved message is:

ERROR endianness-test - too few tests run (expected 3, got 1)

---
 scripts/tap-driver.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/tap-driver.pl +0 -0
index 6621a5cd67..b1d3880c50 100755

scripts/tap-driver.pl sub report ($;$) · line 223

Quoted 8 lines
scripts/tap-driver.pl +1 -1
@@ -217,7 +217,7 @@ sub report ($;$)
 
 sub testsuite_error ($)
 {
-  report "ERROR", "- $_[0]";
+  report "ERROR", "$test_name - $_[0]";
 }
 
 sub handle_tap_result ($)

Queued, thanks.

Paolo