From a34329e831adc685ec5a6a2d112a57e2867c745b Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 6 May 2020 13:34:57 -0700 Subject: [PATCH] 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 Change-Id: Iaf495458210da79501c7168104efe97c63b7afc7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2212 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Reviewed-by: Karol Latecki Reviewed-by: Darek Stojaczyk --- autotest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autotest.sh b/autotest.sh index 84c855b34..af7f1668f 100755 --- a/autotest.sh +++ b/autotest.sh @@ -22,6 +22,10 @@ if [ $(uname -s) = Linux ]; then # set core_pattern to a known value to avoid ABRT, systemd-coredump, etc. 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 # this ensures that when tests need to use nbd, it will be fully initialized modprobe nbd || true