test/autotest: checking for skipped or unsupported tests

Message ID 20200302204132.121802-1-thinhtr@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series test/autotest: checking for skipped or unsupported tests |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Thinh Tran March 2, 2020, 8:41 p.m. UTC
  - When running the dedault configuration of autotest of the make test
  it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
  Failed for a specific device test that is not supported on the
  system under test.
- Adding the checking for those tests, print out as "Skipped [Not Run]"
  quickly return and continue for next test

Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
---
 app/test/autotest_test_funcs.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--
2.17.1
  

Comments

Thomas Monjalon May 24, 2020, 3:54 p.m. UTC | #1
We are missing a review for this patch, please.


02/03/2020 21:41, Thinh Tran:
> - When running the dedault configuration of autotest of the make test
>   it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
>   Failed for a specific device test that is not supported on the
>   system under test.
> - Adding the checking for those tests, print out as "Skipped [Not Run]"
>   quickly return and continue for next test
> 
> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> ---
> --- a/app/test/autotest_test_funcs.py
> +++ b/app/test/autotest_test_funcs.py
> @@ -12,13 +12,16 @@
>  def default_autotest(child, test_name):
>      child.sendline(test_name)
>      result = child.expect(["Test OK", "Test Failed",
> -                           "Command not found", pexpect.TIMEOUT], timeout=900)
> +                           "Command not found", pexpect.TIMEOUT,
> +                           "Test Skipped"], timeout=900)
>      if result == 1:
>          return -1, "Fail"
>      elif result == 2:
>          return -1, "Fail [Not found]"
>      elif result == 3:
>          return -1, "Fail [Timeout]"
> +    elif result == 4:
> +        return 0, "Skipped [Not Run]"
>      return 0, "Success"
  
David Christensen June 2, 2020, 4:53 p.m. UTC | #2
]> - When running the dedault configuration of autotest of the make test
>    it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
>    Failed for a specific device test that is not supported on the
>    system under test.
> - Adding the checking for those tests, print out as "Skipped [Not Run]"
>    quickly return and continue for next test
> 
> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
> ---

Reviewed-By: David Christensen <drc@linux.vnet.ibm.com>
  
David Marchand March 25, 2021, 3:25 p.m. UTC | #3
On Tue, Jun 2, 2020 at 6:53 PM David Christensen <drc@linux.vnet.ibm.com> wrote:
>
> > - When running the dedault configuration of autotest of the make test
> >    it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
> >    Failed for a specific device test that is not supported on the
> >    system under test.
> > - Adding the checking for those tests, print out as "Skipped [Not Run]"
> >    quickly return and continue for next test

Fixes: da0af48a67a5 ("test: add skipped return result")
Cc: stable@dpdk.org

> >
> > Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>


Applied, thanks.
  

Patch

diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index 26688b713..0ff17f75f 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -12,13 +12,16 @@ 
 def default_autotest(child, test_name):
     child.sendline(test_name)
     result = child.expect(["Test OK", "Test Failed",
-                           "Command not found", pexpect.TIMEOUT], timeout=900)
+                           "Command not found", pexpect.TIMEOUT,
+                           "Test Skipped"], timeout=900)
     if result == 1:
         return -1, "Fail"
     elif result == 2:
         return -1, "Fail [Not found]"
     elif result == 3:
         return -1, "Fail [Timeout]"
+    elif result == 4:
+        return 0, "Skipped [Not Run]"
     return 0, "Success"

 # autotest used to run dump commands