run_bacula()
{
+ debug_wait
if test "$debug" -eq 1 ; then
bin/bacula start
cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
scripts/cleanup
}
+debug_wait()
+{
+ if test "x${REGRESS_WAIT}" = "x1"; then
+ echo "Start Bacula under debugger and enter anything when ready ..."
+ read a
+ fi
+}
# Save current directory
cwd=`pwd`
+if test "x${REGRESS_DEBUG}" = "x1"; then
+ set_debug 1
+else
+ set_debug 0
+fi
--- /dev/null
+#!/bin/sh
+#
+# Run four jobs at the same time, with two Volumes.
+# Set max Vol bytes of first volume
+# to less than total backup to force Bacula to use the second
+# Volume.
+#
+TestName="2drive-concurrent-test"
+JobName=Four-concurrent-jobs
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-2disk-drive-confs
+scripts/prepare-two-disks
+echo "${cwd}/build" >/tmp/file-list
+
+change_jobname NightlySave $JobName
+start_test
+
+cat <<END_OF_DATA >tmp/bconcmds
+@output /dev/null
+messages
+@$out tmp/log1.out
+label pool=Default storage=DDS-4 volume=TestVolume001 slot=1 drive=0
+label pool=Default storage=DDS-4 volume=TestVolume002 slot=2 drive=1
+update Volume=TestVolume001 MaxVolBytes=100000000
+@#50000000
+@#12
+setdebug level=001 Storage=DDS-4
+status storage=DDS-4
+llist volume=TestVolume001
+llist volume=TestVolume002
+run job=$JobName level=Full Storage=DDS-4
+yes
+reload
+llist volume=TestVolume001
+llist volume=TestVolume002
+run job=$JobName level=Full Storage=DDS-4
+yes
+reload
+llist volume=TestVolume001
+llist volume=TestVolume002
+run job=$JobName level=Full Storage=DDS-4
+yes
+reload
+llist volume=TestVolume001
+llist volume=TestVolume002
+status storage=DDS-4
+run job=$JobName level=Full Storage=DDS-4
+yes
+status storage=DDS-4
+reload
+reload
+reload
+reload
+@sleep 2
+status dir
+status storage=DDS-4
+llist volume=TestVolume001
+llist volume=TestVolume002
+reload
+@sleep 5
+messages
+reload
+reload
+wait
+status storage=DDS-4
+reload
+messages
+@#
+@# now do a restore
+@#
+@$out tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=DDS-4
+unmark *
+mark *
+done
+yes
+wait
+reload
+reload
+messages
+@output
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=DDS-4
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test
TestName="four-concurrent-jobs-test"
JobName=Four-concurrent-jobs
. scripts/functions
-set_debug 0
scripts/cleanup
scripts/copy-test-confs
@#50000000
@#12
setdebug level=001 Storage=File1
-list volumes
+status storage=File1
+llist volume=TestVolume001
+llist volume=TestVolume002
run job=$JobName level=Full Storage=File1
yes
reload
-list volumes
+llist volume=TestVolume001
+llist volume=TestVolume002
run job=$JobName level=Full Storage=File1
yes
reload
-list volumes
+llist volume=TestVolume001
+llist volume=TestVolume002
run job=$JobName level=Full Storage=File1
yes
reload
-list volumes
+llist volume=TestVolume001
+llist volume=TestVolume002
+status storage=File1
run job=$JobName level=Full Storage=File1
yes
+status storage=File1
reload
reload
reload
reload
@sleep 2
status dir
+status storage=File1
+llist volume=TestVolume001
+llist volume=TestVolume002
reload
@sleep 5
messages