test_suite: refactoring

This commit is contained in:
Frank Liepold 2013-12-30 12:12:34 +01:00
parent dff7d68cec
commit 1223e54f17
10 changed files with 13 additions and 14 deletions

View File

@ -525,7 +525,7 @@ function resource_write_and_check
$resource_time_constant_initial_sync \
"time_waited"
done
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
lib_rw_start_writing_data_device $primary_host "writer_pid" \

View File

@ -31,7 +31,7 @@ function net_run
net_do_impact_cmd $primary_host "check_off" "remote_host=$secondary_host"
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
lib_rw_start_writing_data_device $primary_host "writer_pid" \

View File

@ -28,7 +28,7 @@ function remote_dev_run
local log_rotate_pid log_rotate_script
local log_delete_pid log_delete_script action
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
cluster_remove_debugfiles $primary_host

View File

@ -79,7 +79,7 @@ function resize_run
local dev=$(lv_config_get_lv_device $res)
local writer_pid writer_script
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
lib_rw_start_writing_data_device $primary_host "writer_pid" \

View File

@ -25,7 +25,7 @@ function logrotate_run
local dev=$(lv_config_get_lv_device $res)
local writer_pid writer_script write_count
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res

View File

@ -32,7 +32,7 @@ function crash_run
local net_throughput
local waited=0 error_ocurred=0
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
lib_rw_start_writing_data_device $primary_host "writer_pid" \
@ -98,7 +98,7 @@ function crash_write_data_device_and_calculate_checksums
{
local primary_host=$1 secondary_host=$2 res=$3 dev=$4
local writer_pid writer_script write_count time_waited net_throughput
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
lib_rw_start_writing_data_device $primary_host "writer_pid" \
"writer_script" 0 0 $res

View File

@ -35,7 +35,7 @@ function file_destroy_run
lib_vmsg " ${FUNCNAME[0]}: sync time: $time_waited"
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res

View File

@ -224,7 +224,7 @@ function perftest_start_parallel_writer
[ $# -eq 5 ] || lib_exit 1 "wrong number $# of arguments (args = $*)"
local host=$1 varname_writer_start=$2 varname_writer_pid=$3
local varname_writer_script=$4 res=$5
mount_mount_data_device
mount_mount_data_device $host $res
eval $varname_writer_start=$(date +'%s')
lib_rw_start_writing_data_device $host $varname_writer_pid \
$varname_writer_script 0 0 $res
@ -718,7 +718,7 @@ function perftest_prepare_write
|| lib_exit 1
perftest_prepare_resource $res $secondary_host
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
if [ $perftest_division_mars_device_data_device -eq 1 ]; then
perftest_switch_bbu_cache $primary_host

View File

@ -36,7 +36,7 @@ function apply_fetch_run
"time_waited"
lib_vmsg " ${FUNCNAME[0]}: sync time: $time_waited"
mount_mount_data_device
mount_mount_data_device $primary_host $res
resource_clear_data_device $primary_host $res
lib_rw_start_writing_data_device $primary_host "writer_pid" \

View File

@ -71,9 +71,8 @@ function mount_is_dir_mountpoint
function mount_mount_data_device
{
local res_no=${1:-0}
local res=${resource_name_list[$res_no]}
local host=${main_host_list[0]}
[ $# -eq 2 ] || lib_exit 1 "wrong number $# of arguments (args = $*)"
local host=$1 res=$2
local dev=$(resource_get_data_device $res)
local mount_point=${resource_mount_point_list[$res]}