[v2,5/9] test/bbdev: improve timeout message format

Message ID 20240624150237.47169-6-hernan.vargas@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series test-bbdev fixes and improvements for 24.07 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hernan Vargas June 24, 2024, 3:02 p.m. UTC
Print more info and format message for test timeouts.
No functional impact.

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)
  

Patch

diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
index 9ddca9e78d3b..d5b679f7867f 100755
--- a/app/test-bbdev/test-bbdev.py
+++ b/app/test-bbdev/test-bbdev.py
@@ -108,15 +108,29 @@  def kill(process):
         try:
             output = subprocess.run(call_params, timeout=args.timeout, universal_newlines=True)
         except subprocess.TimeoutExpired as e:
+            print("===========================================================")
             print("Starting Test Suite : BBdev TimeOut Tests")
+            print("INFO: One of the tests timed out {}".format(e))
+            print("INFO: Unexpected Error")
+            print("+ ------------------------------------------------------- +")
             print("== test: timeout")
-            print("TestCase [ 0] : timeout passed")
-            print(" + Tests Failed :       1")
             print("Unexpected Error")
+            print("TestCase [ 0] : timeout failed")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            print(" + Tests Failed :       1")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            exit_status = 1
         if output.returncode < 0:
+            print("===========================================================")
             print("Starting Test Suite : BBdev Exception Tests")
+            print("INFO: One of the tests returned {}".format(output.returncode))
+            print("INFO: Unexpected Error")
+            print("+ ------------------------------------------------------- +")
             print("== test: exception")
-            print("TestCase [ 0] : exception passed")
-            print(" + Tests Failed :       1")
             print("Unexpected Error")
+            print("TestCase [ 0] : exception failed")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            print(" + Tests Failed :       1")
+            print(" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +")
+            exit_status = 1
 sys.exit(exit_status)