]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/four-concurrent-jobs-test
Update
[bacula/bacula] / regress / tests / four-concurrent-jobs-test
index 8231cc54afd21942c6127135316c609625e35173..95d1368525c4387dc50a226460d50038c5f4044a 100755 (executable)
@@ -6,19 +6,15 @@ cwd=`pwd`
 scripts/copy-test-confs
 scripts/cleanup
 echo "${cwd}/build" >/tmp/file-list
-bin/bacula stop 2>&1 >/dev/null
-bin/drop_sqlite_tables
-bin/make_sqlite_tables
 
 echo " "
 echo " "
-echo " === Starting four-concurrent-jobs-test  ==="
-echo " === Starting four-concurrent-jobs-test  ===" >>working/log
+echo " === Starting four-concurrent-jobs-test at `date +%R:%S` ==="
+echo " === Starting four-concurrent-jobs-test at `date +%R:%S` ===" >>working/log
 echo " "
 
-#bin/bacula start 2>&1 >/dev/null
-bin/bacula start
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+bin/bacula start 2>&1 >/dev/null
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
 @output /dev/null
 messages
 @output tmp/log1.out
@@ -26,43 +22,56 @@ label storage=File1
 TestVolume001
 label storage=File1
 TestVolume002
-update Volume=TestVolume001
-6
-100000000
+update Volume=TestVolume001 MaxVolBytes=100000000
 @#50000000
-10
+@#12
 run job=NightlySave level=Full Storage=File1
 yes
+reload
 run job=NightlySave level=Full Storage=File1
 yes
+reload
 run job=NightlySave level=Full Storage=File1
 yes
+reload
 run job=NightlySave level=Full Storage=File1
 yes
+reload
+reload
+reload
+reload
 @sleep 2
 status dir
+reload
 @sleep 5
 messages
+reload
+reload
 wait
+reload
 messages
 @# 
 @# now do a restore
 @#
 @output tmp/log2.out
-restore where=${cwd}/tmp/bacula-restores
-5
+restore where=${cwd}/tmp/bacula-restores select storage=File1
+unmark *
+mark *
 done
 yes
 wait
+reload
+reload
 messages
 @output
 quit
 END_OF_DATA
+scripts/check_for_zombie_jobs storage=File1
 
 bin/bacula stop 2>&1 >/dev/null
-grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
 bstat=$?
-grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+grep "^  Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
 rstat=$?
 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
@@ -70,11 +79,18 @@ if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo "  !!!!! four-concurrent-jobs-test Bacula source failed!!! !!!!! "
    echo "  !!!!! four-concurrent-jobs-test failed!!! !!!!! " >>test.out
+   if [ $bstat != 0 -o $rstat != 0 ] ; then
+      echo "  !!!!! Bad Job termination status     !!!!! "
+      echo "  !!!!! Bad Job termination status     !!!!! " >>test.out
+   else
+      echo "  !!!!! Restored files differ          !!!!! "
+      echo "  !!!!! Restored files differ          !!!!! " >>test.out
+   fi
    echo " "
    exit 1
 else
    echo "  ===== four-concurrent-jobs-test Bacula source OK ===== "
    echo "  ===== four-concurrent-jobs-test OK ===== " >>test.out
-   scripts/cleanup
+#  scripts/cleanup
    exit 0
 fi