From: Eric Bollengier Date: Mon, 21 Feb 2011 12:37:44 +0000 (+0100) Subject: regress: show problem in restart-accurate test X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1233557b8b943dd3ed69d604ddf4925cb1bb3ba7;p=bacula%2Fbacula regress: show problem in restart-accurate test --- diff --git a/regress/tests/restart-accurate-job-test b/regress/tests/restart-accurate-job-test index 5c4cf26e85..37e6d82f8f 100755 --- a/regress/tests/restart-accurate-job-test +++ b/regress/tests/restart-accurate-job-test @@ -35,6 +35,7 @@ scripts/check_for_zombie_jobs storage=File cat <${cwd}/tmp/bconcmds @$out /dev/null +@$out ${cwd}/tmp/log1.out setdebug level=0 trace=0 hangup=50 client @exec "sh -c 'touch $cwd/build/po/*'" @exec "sh -c 'touch $cwd/build/src/dird/*'" @@ -49,6 +50,8 @@ restore where=$tmp/bacula-restores storage=File select all done yes wait messages +@$out ${cwd}/tmp/log3.out +list jobs quit END_OF_DATA @@ -58,4 +61,20 @@ stop_bacula check_two_logs check_restore_diff + +nb_F=`awk -F '|' '/RestartJob.+F/ { gsub(/,/, ""); print $7}' $tmp/log3.out` +nb_I=`awk -F '|' '/RestartJob.+I/ { gsub(/,/, ""); print $7}' $tmp/log3.out` +nb1=`ls $cwd/build/po/* $cwd/build/src/dird/* | wc -l` +nb1=`expr $nb1 + 50` + +if [ "$nb_I" -eq "$nb_F" ]; then + print_debug "ERROR: Incremental saves too much files (nb Incr == nb Full)" + estat=1 +fi + +if [ "$nb_I" -ge "$nb1" ]; then + print_debug "ERROR: Incremental saves too much files (more than $nb1)" + estat=1 +fi + end_test