Skip to content

Commit

Permalink
system-dpdk: Skip all tests if there are no hugepages
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
  • Loading branch information
2 people authored and istokes committed Oct 12, 2018
1 parent a01786b commit f9e1eba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Documentation/topics/testing.rst
Expand Up @@ -322,6 +322,12 @@ the NIC to the DPDK-compatible driver.

.. _DPDK supported NIC: http://dpdk.org/doc/nics

All tests are skipped if no hugepages are configured. User must look into the DPDK
manual to figure out how to `Configure hugepages`_.
The phy test will skip if no compatible physical device is available.

.. _Configure hugepages: http://doc.dpdk.org/guides/linux_gsg/sys_reqs.html

Kernel datapath
'''''''''''''''

Expand Down
2 changes: 1 addition & 1 deletion tests/system-dpdk-macros.at
Expand Up @@ -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], [])

Expand Down
2 changes: 1 addition & 1 deletion tests/system-dpdk.at
Expand Up @@ -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
Expand Down

0 comments on commit f9e1eba

Please sign in to comment.