From 98a5f052a7d98dbf8ca5a7f50df2fcaeb8a4f632 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Wed, 18 Oct 2017 08:24:10 -0600 Subject: [PATCH] Add missing sudo for swap actions The previous patch did not properly add sudo for the swapoff commands when it is currently enabled. Change-Id: I37c2ff9299a8ccff3f0c4f3eebb7d00d5cb5a7c3 --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index b1da29dfd..d3706db41 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -78,7 +78,7 @@ if [ "${ADD_SWAP}" = true ]; then RESULT=$? set -e if [ $RESULT -eq 0 ]; then - swapoff /swapfile && rm -f /swapfile + $SUDO swapoff /swapfile && $SUDO rm -f /swapfile fi $SUDO dd if=/dev/zero of=/swapfile count=${SWAP_SIZE_GB}k bs=1M $SUDO chmod 0600 /swapfile