]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: show problem in restart-accurate test
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 21 Feb 2011 12:37:44 +0000 (13:37 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:43:26 +0000 (14:43 +0200)
regress/tests/restart-accurate-job-test

index 5c4cf26e85ad8c263d1edcedc778884d62285c90..37e6d82f8fa06238f1b23b66adfdcfc67835eed3 100755 (executable)
@@ -35,6 +35,7 @@ scripts/check_for_zombie_jobs storage=File
 
 cat <<END_OF_DATA >${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