From 434cd3e0f3e6dd97f21aebcd9b2b08686ef4e39a Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Thu, 8 Dec 2011 19:54:35 +0800 Subject: [PATCH] add ukey cases to fat --- cases-common.sh | 17 ++++++----------- fat-config.sh | 21 +++++++++++++++++++++ main-loop.sh | 1 + 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/cases-common.sh b/cases-common.sh index 278398f..750a9b1 100644 --- a/cases-common.sh +++ b/cases-common.sh @@ -88,18 +88,13 @@ dd_job() { echo $job } -ukey_hdd() { - make_dir UKEY-HDD $(dd_job) || return - run_test dd -} - thresh() { local dirty_thresh=$1 local unit=$2 local ndisk=${3:-1} local array=${4:-JBOD} - local bits output_dir bg_dirty_thresh bg_name + local bits output_dir bg_dirty_thresh bg_name storage_prefix [[ $dirty_thresh =~ : ]] && { bg_dirty_thresh=${dirty_thresh##*:} @@ -116,16 +111,16 @@ thresh() { ndisk=$(echo $devices | wc -w) if (( $ndisk == 1 )); then - output_dir="thresh=${dirty_thresh}${unit}${bg_name}" + [[ $storage != HDD ]] && storage_prefix=$storage- + output_dir="${storage_prefix}thresh=${dirty_thresh}${unit}${bg_name}" else - : ${STORAGE=HDD} - output_dir="$array-${ndisk}${STORAGE}-thresh=${dirty_thresh}${unit}${bg_name}" + output_dir="$array-${ndisk}${storage}-thresh=${dirty_thresh}${unit}${bg_name}" fi make_dir $output_dir $(dd_job) || return - [[ $2 = M ]] && bits=20 - [[ $2 = G ]] && bits=30 + [[ $unit = M || $unit = m ]] && bits=20 + [[ $unit = G || $unit = g ]] && bits=30 [[ $bg_dirty_thresh ]] && { echo $((bg_dirty_thresh< /proc/sys/vm/dirty_background_bytes diff --git a/fat-config.sh b/fat-config.sh index cfbb60b..6c1d4fa 100644 --- a/fat-config.sh +++ b/fat-config.sh @@ -16,12 +16,15 @@ DD_TASKS="1 10 100" test_cases() { echo echo ukey_hdd + echo ukey_thresh_100m + echo thresh_1000m_999m echo thresh_1000m_990m echo thresh_1000m echo thresh_100m echo thresh_10m echo thresh_1m + echo fio_fat_mmap_randwrite_4k echo fio_fat_mmap_randwrite_64k echo fio_fat_rates @@ -30,3 +33,21 @@ test_cases() { # echo fat-fio-mmap.sh # echo fat-fio-rates.sh } + +ukey_hdd() { + make_dir UKEY-HDD $(dd_job) || return + run_test dd +} + +ukey_thresh() { + storage=UKEY + devices=/dev/sdb3 + thresh "$@" +} + +ukey_thresh_0() { ukey_thresh 0; } +ukey_thresh_1m() { ukey_thresh 1 M; } +ukey_thresh_10m() { ukey_thresh 10 M; } +ukey_thresh_100m() { ukey_thresh 100 M; } +ukey_thresh_1000m() { ukey_thresh 1000 M; } + diff --git a/main-loop.sh b/main-loop.sh index 157f84a..2751684 100755 --- a/main-loop.sh +++ b/main-loop.sh @@ -25,6 +25,7 @@ for fs in ${FILESYSTEMS:-ext4} do for scheme in $(test_cases) do + storage=${STORAGE:-HDD} devices=$DEVICES [[ $fs =~ nfs ]] && devices=$NFS_DEVICE