aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-09-02 10:07:53 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-09-12 12:23:42 +0200
commitd73565150d125bf96fd7123a650cd5327e53e913 (patch)
tree821d64d6310210adee111da371dbb9757941dabd
parentcc19a03bf80eb09cce89ca5643ea11a784ae2d0a (diff)
d/tests: extend test-initscripts for 16M huge pages
Since we already had the code from 1G pages to not fail if not supported this was just adding about the same. But for a 16M supporting environment we expect is to be able to get 2x16M hugepages, so as with 2M pages we test for mountpoints and the actual alloc to be correct. Change-Id: I0b4e106f11eaebfe068dbb20130add5840e98368 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
-rw-r--r--debian/tests/test-initscripts12
1 files changed, 9 insertions, 3 deletions
diff --git a/debian/tests/test-initscripts b/debian/tests/test-initscripts
index 069c57b8..1643a2ea 100644
--- a/debian/tests/test-initscripts
+++ b/debian/tests/test-initscripts
@@ -14,6 +14,7 @@ EXPECT2MHP=10
# We will not check for the 1G alloc, as we know it often fails in small adt's
# - has no 1G huge page size (HW feature) => we check if it fails gracefully
EXPECT1GHP=1
+EXPECT16MHP=2
DPDK_CONF="/etc/dpdk/dpdk.conf"
DPDK_INTERF="/etc/dpdk/interfaces"
@@ -63,6 +64,9 @@ checkstatus() {
if [ ! -d /sys/kernel/mm/hugepages/hugepages-2048kB ]; then
EXPMPCOUNT=$((EXPMPCOUNT-1))
fi
+ if [ ! -d /sys/kernel/mm/hugepages/hugepages-16384kB ]; then
+ EXPMPCOUNT=$((EXPMPCOUNT-1))
+ fi
if [ ! -d /sys/kernel/mm/hugepages/hugepages-1048576kB ]; then
EXPMPCOUNT=$((EXPMPCOUNT-1))
fi
@@ -78,7 +82,8 @@ checkstatus() {
# check if setting HP worked
if [ "${EXPMPCOUNT}" -ne "0" ]; then
checkhp "hugepages-2048kB" "${EXPECT2MHP}"
- # We do not check 1G alloc, as it is known to be often not available
+ checkhp "hugepages-16384kB" "${EXPECT16MHP}"
+ # We do not check 1G/16M alloc, as it is known to be often not available
fi
}
@@ -110,14 +115,15 @@ checkinitstyle() {
checkstatus "${TYPE}-BEGIN" 0 "${PRE}" "${POST}" "inactive"
echo "### Starting Service ###"
${PRE} start "${POST}"
- checkstatus "${TYPE}-START" 2 "${PRE}" "${POST}" "active"
+ checkstatus "${TYPE}-START" 3 "${PRE}" "${POST}" "active"
echo "### Restarting Service ###"
${PRE} restart "${POST}"
- checkstatus "${TYPE}-RESTART" 2 "${PRE}" "${POST}" "active"
+ checkstatus "${TYPE}-RESTART" 3 "${PRE}" "${POST}" "active"
}
echo "NR_2M_PAGES=$EXPECT2MHP" >> ${DPDK_CONF}
echo "NR_1G_PAGES=$EXPECT1GHP" >> ${DPDK_CONF}
+echo "NR_16M_PAGES=$EXPECT16MHP" >> ${DPDK_CONF}
# We can't rely on any real device for DPDK tests in adt-* environments. But
# we can expect all kind of broken configuration not to break it (would be