From 379caf2a6e5af34f8494fa6dacf1e59b86a4788d Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 21 Feb 2011 13:37:44 +0100 Subject: [PATCH] regress: show problem in restart-accurate test --- regress/tests/restart-accurate-job-test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 -- 2.39.5