diff mbox series

[ovs-dev,v2,2/6] system-dpdk: skip all tests if there are no hugepages

Message ID 20180822133736.10768-3-aconole@redhat.com
State Changes Requested
Delegated to: Ian Stokes
Headers show
Series system-dpdk: add support to ping two namespaces | expand

Commit Message

Aaron Conole Aug. 22, 2018, 1:37 p.m. UTC
From: Bala Sankaran <bsankara@redhat.com>

A failure is quite harsh in this scenario.  It's better to
simply skip all the tests and let the user look at the logs
to understand the missing hugepages.

Signed-off-by: Bala Sankaran <bsankara@redhat.com>
Co-authored-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 tests/system-dpdk-macros.at | 2 +-
 tests/system-dpdk.at        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Stokes, Ian Aug. 27, 2018, 11:25 a.m. UTC | #1
On 8/22/2018 2:37 PM, Aaron Conole wrote:
> From: Bala Sankaran <bsankara@redhat.com>
> 
> A failure is quite harsh in this scenario.  It's better to
> simply skip all the tests and let the user look at the logs
> to understand the missing hugepages.

This is ok, again however I'd like to see the expected behavior called 
out clearly to a user in the docs i.e. all tests will skip if no huge 
pages are allocated. Phy test will skip if no phy device available.

Documentation/topics/testing.rst b/Documentation/topics/testing.rst

Thanks
Ian
> 
> Signed-off-by: Bala Sankaran <bsankara@redhat.com>
> Co-authored-by: Aaron Conole <aconole@redhat.com>
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
>   tests/system-dpdk-macros.at | 2 +-
>   tests/system-dpdk.at        | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
> index 2e5571fc4..f772a1945 100644
> --- a/tests/system-dpdk-macros.at
> +++ b/tests/system-dpdk-macros.at
> @@ -6,7 +6,7 @@
>   m4_define([OVS_DPDK_PRE_CHECK],
>     [dnl Check Hugepages
>      AT_CHECK([cat /proc/meminfo], [], [stdout])
> -   AT_CHECK([grep HugePages_ stdout], [], [stdout])
> +   AT_SKIP_IF([egrep 'HugePages_Free: *0' stdout], [], [stdout])
>      AT_CHECK([mount], [], [stdout])
>      AT_CHECK([grep 'hugetlbfs' stdout], [], [stdout], [])
>   
> diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
> index 6901d19e6..c1c908411 100644
> --- a/tests/system-dpdk.at
> +++ b/tests/system-dpdk.at
> @@ -47,7 +47,7 @@ dnl --------------------------------------------------------------------------
>   dnl Add vhost-user-client port
>   AT_SETUP([OVS-DPDK datapath - add vhost-user-client port])
>   AT_KEYWORDS([dpdk])
> -
> +OVS_DPDK_PRE_CHECK()
>   OVS_DPDK_START()
>   
>   dnl Add userspace bridge and attach it to OVS
>
diff mbox series

Patch

diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
index 2e5571fc4..f772a1945 100644
--- a/tests/system-dpdk-macros.at
+++ b/tests/system-dpdk-macros.at
@@ -6,7 +6,7 @@ 
 m4_define([OVS_DPDK_PRE_CHECK],
   [dnl Check Hugepages
    AT_CHECK([cat /proc/meminfo], [], [stdout])
-   AT_CHECK([grep HugePages_ stdout], [], [stdout])
+   AT_SKIP_IF([egrep 'HugePages_Free: *0' stdout], [], [stdout])
    AT_CHECK([mount], [], [stdout])
    AT_CHECK([grep 'hugetlbfs' stdout], [], [stdout], [])
 
diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index 6901d19e6..c1c908411 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -47,7 +47,7 @@  dnl --------------------------------------------------------------------------
 dnl Add vhost-user-client port
 AT_SETUP([OVS-DPDK datapath - add vhost-user-client port])
 AT_KEYWORDS([dpdk])
-
+OVS_DPDK_PRE_CHECK()
 OVS_DPDK_START()
 
 dnl Add userspace bridge and attach it to OVS