[PATCH v1 5/9] test/bbdev: improve timeout message format
Maxime Coquelin
maxime.coquelin at redhat.com
Wed Jun 12 12:36:06 CEST 2024
On 4/22/24 21:07, Hernan Vargas wrote:
> Print more info and format message for test timeouts.
> No functional impact.
>
> Signed-off-by: Hernan Vargas <hernan.vargas at intel.com>
> ---
> app/test-bbdev/test-bbdev.py | 22 ++++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
> 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)
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list