Added swap settings

This commit is contained in:
Jason Hee committed 2016-11-29 00:06:11 +08:00
1 parent 02e48fe201
commit a82bf4ff21
3 files changed
+38

No files matched your search

+12
View File
@@ -63,6 +63,18 @@ function testSwap() {
assertContains "/swapfile" "$(sudo swapon --show)"
}
function testSwapSettings() {
local swappiness=$(cat /proc/sys/vm/swappiness)
local cache_pressure=$(cat /proc/sys/vm/vfs_cache_pressure)
tweakSwapSettings 10 50
assertEquals "$(cat /proc/sys/vm/swappiness)" "10"
assertEquals "$(cat /proc/sys/vm/vfs_cache_pressure)" "50"
tweakSwapSettings "${swappiness}" "${cache_pressure}"
}
function testTeardown () {
echo "Test Teardown"