mirror of https://github.com/schoebel/mars
test_suite: replace global with local parameter
This commit is contained in:
parent
5333bc5e36
commit
a95b2c366c
|
@ -309,11 +309,15 @@ function perftest_generate_data_file
|
||||||
|
|
||||||
function perftest_sysctrl_sync_modus
|
function perftest_sysctrl_sync_modus
|
||||||
{
|
{
|
||||||
|
local sync_mode="$1"
|
||||||
|
shift
|
||||||
local hosts="$@" host
|
local hosts="$@" host
|
||||||
local mars_fast_sync_mode=0
|
local mars_fast_sync_mode
|
||||||
if [ "$perftest_sync_mode" = "fast_sync" ]; then
|
case "$sync_mode" in # (((
|
||||||
mars_fast_sync_mode=1
|
fast_sync) mars_fast_sync_mode=1;;
|
||||||
fi
|
rsync|no_fast_sync) mars_fast_sync_mode=0;;
|
||||||
|
*) lib_exit 1 "invalid sync_mode $sync_mode";;
|
||||||
|
esac
|
||||||
for host in $hosts; do
|
for host in $hosts; do
|
||||||
lib_vmsg " setting fast sync mode to $mars_fast_sync_mode on $host"
|
lib_vmsg " setting fast sync mode to $mars_fast_sync_mode on $host"
|
||||||
lib_remote_idfile $host \
|
lib_remote_idfile $host \
|
||||||
|
@ -353,7 +357,8 @@ function perftest_prepare_sync
|
||||||
|
|
||||||
|
|
||||||
if [ "$perftest_sync_mode" != "rsync" ]; then
|
if [ "$perftest_sync_mode" != "rsync" ]; then
|
||||||
perftest_sysctrl_sync_modus $primary_host $secondary_host
|
perftest_sysctrl_sync_modus $perftest_sync_mode $primary_host \
|
||||||
|
$secondary_host
|
||||||
else
|
else
|
||||||
perftest_generate_data_file $primary_host $secondary_host $dev \
|
perftest_generate_data_file $primary_host $secondary_host $dev \
|
||||||
$dev_size $perftest_data_file
|
$dev_size $perftest_data_file
|
||||||
|
|
Loading…
Reference in New Issue