test_suite: use MB instead of GB

This commit is contained in:
Frank Liepold 2014-03-10 10:58:47 +01:00 committed by Thomas Schoebel-Theuer
parent 11a051ffd8
commit eca8209d5f
3 changed files with 9 additions and 8 deletions

View File

@ -35,7 +35,7 @@ function datadev_full_run
resize_prepare
datadev_full_dd_on_device $primary_host $data_dev \
$(($data_dev_size_orig + 1)) 123 1
$(( 1024 * ($data_dev_size_orig + 1) )) 123 1
resize_do_resize $primary_host $secondary_host $res $dev \
$data_dev_size_new $mars_data_dev_size_new
@ -54,8 +54,8 @@ function datadev_full_run
function datadev_full_dd_on_device
{
[ $# -eq 5 ] || lib_exit 1 "wrong number $# of arguments (args = $*)"
local host=$1 dev=$2 size=$3 control_nr=$4 should_fail=$5
local bs=4096 count=$(($size * 1024 * 1024 / 4))
local host=$1 dev=$2 size_mb=$3 control_nr=$4 should_fail=$5
local bs=4096 count=$(($size_mb * 1024 / 4))
local dd_out rc
local err_msg='No space left on device'

View File

@ -123,8 +123,8 @@ function resize_check_resize_post_conditions
fi
for test_size in $(($mars_data_dev_size_new - 1)) $mars_data_dev_size_new
do
datadev_full_dd_on_device $primary_host $test_file $test_size 4711 \
$should_fail
datadev_full_dd_on_device $primary_host $test_file \
$(( 1024 * $test_size )) 4711 $should_fail
should_fail=1
lib_remote_idfile $primary_host \
"if ls -l $test_file; then rm -f $test_file;fi" \

View File

@ -318,7 +318,8 @@ function resource_write_file_until_mars_dir_full
[ $# -eq 4 ] || lib_exit 1 "wrong number $# of arguments (args = $*)"
local host=$1 mars_dir=$2 mars_dev_size=$3 file_to_fill=$4
local df_out use_percent rc
datadev_full_dd_on_device $host $file_to_fill $(($mars_dev_size + 1)) 4711 1
datadev_full_dd_on_device $host $file_to_fill \
$(( 1024 * ($mars_dev_size + 1) )) 4711 1
lib_remote_idfile $host "ls -l $file_to_fill" || lib_exit 1
lib_vmsg " checking space on $host:$mars_dir"
df_out=($(lib_remote_idfile $host "df -B1 $mars_dir")) || lib_exit 1
@ -356,8 +357,8 @@ function resource_dd_until_mars_dir_full
while true;do
local free df_out
datadev_full_dd_on_device $primary_host $data_dev $write_per_loop \
$control_nr 0
datadev_full_dd_on_device $primary_host $data_dev \
$(( 1024 * $write_per_loop )) $control_nr 0
let written+=$write_per_loop
let control_nr+=1
df_out=($(lib_remote_idfile $primary_host "df -B1 $mars_dir | \