test_suite: refactoring

This commit is contained in:
Frank Liepold 2014-03-20 08:58:04 +01:00
parent 54275af543
commit deb007c379
3 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ function lib_wait_until_fetch_stops
for var in maxtime_fetch time_constant_fetch; do
eval $var='$'${module}_${var}
eval v='$'$var
eval v=${!var}
if [ -z "$v" ]; then
lib_exit 1 "variable $var not set"
fi

View File

@ -67,7 +67,7 @@ function net_do_impact_cmd
fi
for var in pattern replace; do
local x
eval x='$'$var
x=${!var}
if [ -z "$x" ]; then
lib_exit 1 "cannot determine $var in replace_expression $replace_expression"
fi

View File

@ -124,12 +124,12 @@ function syslog_set_logging_parameters
for param in class limit recovery_s; do
varname='syslog_flood_'$param
lib_vmsg " setting $varname on $host"
eval value='$'$varname
value=${!varname}
if [ -z "$value" ]; then
lib_exit 1 "no value found for variable $varname"
fi
filename='syslog_flood_'$param'_file'
eval file='$'$filename
file=${!filename}
lib_remote_idfile $host "ls -l $file" || lib_exit 1
lib_remote_idfile $host "echo $value > $file" || lib_exit 1
done