From: Kern Sibbald Date: Tue, 29 May 2007 18:18:15 +0000 (+0000) Subject: Updates plus put debug output and debugger on environment variables X-Git-Tag: Release-7.0.0~6213 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fbc6658b94ac35391e0790d93d05bf405a0a76f0;p=bacula%2Fbacula Updates plus put debug output and debugger on environment variables git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4932 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index c7536612d8..e574f715af 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -56,6 +56,7 @@ nice tests/two-volume-test nice tests/incremental-2disk nice tests/2drive-incremental-2disk nice tests/scratch-pool-test +nice tests/2drive-concurrent-test echo " " echo "Test results" cat test.out diff --git a/regress/scripts/functions b/regress/scripts/functions index 7da6d38058..f00029c7e3 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -23,6 +23,7 @@ set_debug() run_bacula() { + debug_wait if test "$debug" -eq 1 ; then bin/bacula start cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf @@ -142,6 +143,18 @@ copy_test_confs() 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 diff --git a/regress/tests/2drive-concurrent-test b/regress/tests/2drive-concurrent-test new file mode 100755 index 0000000000..a24854d31f --- /dev/null +++ b/regress/tests/2drive-concurrent-test @@ -0,0 +1,93 @@ +#!/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 <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 diff --git a/regress/tests/four-concurrent-jobs-test b/regress/tests/four-concurrent-jobs-test index 05a04e435a..b55a441f26 100755 --- a/regress/tests/four-concurrent-jobs-test +++ b/regress/tests/four-concurrent-jobs-test @@ -8,7 +8,6 @@ TestName="four-concurrent-jobs-test" JobName=Four-concurrent-jobs . scripts/functions -set_debug 0 scripts/cleanup scripts/copy-test-confs @@ -29,27 +28,37 @@ update Volume=TestVolume001 MaxVolBytes=100000000 @#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