From 94262269de06cea98205e41748ee628b6219ed50 Mon Sep 17 00:00:00 2001 From: Vishal Verma Date: Wed, 9 Aug 2017 09:32:27 -0700 Subject: [PATCH] test/blobfs: add 'drop_cache' in run_tests script This adds support for cleaning page caches between each of the db_bench test within run_test.sh script. Change-Id: Ibcf37945d530a7a940d4a6365e3f1a9eeffb26c0 Signed-off-by: Vishal Verma Reviewed-on: https://review.gerrithub.io/373631 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker --- test/blobfs/rocksdb/run_tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/blobfs/rocksdb/run_tests.sh b/test/blobfs/rocksdb/run_tests.sh index b4c5f19cd..a110e934f 100755 --- a/test/blobfs/rocksdb/run_tests.sh +++ b/test/blobfs/rocksdb/run_tests.sh @@ -148,6 +148,7 @@ run_step() { if [ "$NO_SPDK" = "1" ] then + drop_caches cat /sys/block/nvme0n1/stat >> "$1"_blockdev_stats.txt fi @@ -161,6 +162,12 @@ run_step() { fi } +drop_caches() { + echo -n Cleaning Page Cache... + echo 3 > /proc/sys/vm/drop_caches + echo done. +} + if [ -z "$SKIP_INSERT" ] then run_step insert