X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Ffour-concurrent-jobs-tape;h=cf31406593a65540044a4ba2991b68e67ebb9859;hb=4d691342d4786448f9e8f0ebf95a958f3169c9d1;hp=f3e86c7ac7a5054a2670602f8cf4194c79e4a696;hpb=661b39f1610957a4310f87435cf31482cdcae3e9;p=bacula%2Fbacula diff --git a/regress/tests/four-concurrent-jobs-tape b/regress/tests/four-concurrent-jobs-tape index f3e86c7ac7..cf31406593 100755 --- a/regress/tests/four-concurrent-jobs-tape +++ b/regress/tests/four-concurrent-jobs-tape @@ -1,68 +1,61 @@ #!/bin/sh # -# Run two jobs at the same time +# Run four jobs at the same time # -cwd=`pwd` -scripts/copy-tape-confs +TestName="four-concurrent-jobs-tape" +JobName=FourConcurrentJobs +. scripts/functions + +require_tape_drive + scripts/cleanup-tape +scripts/copy-tape-confs -echo "${cwd}/build" >/tmp/file-list +echo "${cwd}/build" >${cwd}/tmp/file-list -echo " " -echo " " -echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ===" -echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ===" >>working/log -echo " " +change_jobname $JobName +start_test -#bin/bacula start 2>&1 >/dev/null -bin/bacula start -#bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null messages -@tee tmp/log1.out -label storage=DDS-4 volume=TestVolume001 slot=0 -run job=NightlySave level=Full Storage=DDS-4 yes -run job=NightlySave level=Full Storage=DDS-4 yes -run job=NightlySave level=Full Storage=DDS-4 yes -run job=NightlySave level=Full Storage=DDS-4 yes +@$out ${cwd}/tmp/log1.out +label storage=tape volume=TestVolume001 slot=0 pool=Default +run job=$JobName level=Full Storage=tape yes +run job=$JobName level=Full Storage=tape yes +run job=$JobName level=Full Storage=tape yes +run job=$JobName level=Full Storage=tape yes @sleep 2 status dir @sleep 5 +status dir +status storage=tape messages wait messages +@$out ${cwd}/tmp/jobmedia.out +list volumes +sql +select JobId,MediaId,StartFile,StartBlock,EndFile,EndBlock from JobMedia; + @# @# now do a restore @# -@tee tmp/log2.out -restore where=${cwd}/tmp/bacula-restores select storage=DDS-4 +@$out ${cwd}/tmp/log2.out +restore where=${cwd}/tmp/bacula-restores select storage=tape unmark * mark * done yes wait messages -@tee quit END_OF_DATA -scripts/check_for_zombie_jobs storage=DDS-4 -bin/bacula stop 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 -rstat=$? -diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null -if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then - echo " " - echo " " - echo " !!!!! four-concurrent-jobs-tape Bacula source failed!!! !!!!! " - echo " !!!!! four-concurrent-jobs-tape failed!!! !!!!! " >>test.out - echo " " - exit 1 -else - echo " ===== four-concurrent-jobs-tape Bacula source OK ===== " - echo " ===== four-concurrent-jobs-tape OK ===== " >>test.out - scripts/cleanup - exit 0 -fi + +run_bacula +check_for_zombie_jobs storage=tape +stop_bacula + +check_two_logs +check_restore_diff +end_test