autotest: clear system caches before running setup.sh.

This will help avoid the recent error with not being able
to allocate enough hugepages on VMs.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaf495458210da79501c7168104efe97c63b7afc7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2212
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Seth Howell 2020-05-06 13:34:57 -07:00 committed by Tomasz Zawadzki
parent 2c0980de71
commit a34329e831

View File

@ -22,6 +22,10 @@ if [ $(uname -s) = Linux ]; then
# set core_pattern to a known value to avoid ABRT, systemd-coredump, etc. # set core_pattern to a known value to avoid ABRT, systemd-coredump, etc.
echo "core" > /proc/sys/kernel/core_pattern echo "core" > /proc/sys/kernel/core_pattern
# Make sure that the hugepage state for our VM is fresh so we don't fail
# hugepage allocation
echo 1 > /proc/sys/vm/drop_caches
# make sure nbd (network block device) driver is loaded if it is available # make sure nbd (network block device) driver is loaded if it is available
# this ensures that when tests need to use nbd, it will be fully initialized # this ensures that when tests need to use nbd, it will be fully initialized
modprobe nbd || true modprobe nbd || true