X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fsmall-file-size-tape;h=2e1dc65e1d30b08ba2093e5f071c4fd49faebae6;hb=9069d2fe01f419778c977cd4db47bb9e6b52cd02;hp=497b1b539f3a585d9b2f96f0638eef0eca4d95eb;hpb=183f700668adce506818201f58dfcebbea014fd8;p=bacula%2Fbacula diff --git a/regress/tests/small-file-size-tape b/regress/tests/small-file-size-tape index 497b1b539f..2e1dc65e1d 100755 --- a/regress/tests/small-file-size-tape +++ b/regress/tests/small-file-size-tape @@ -3,59 +3,49 @@ # Run a simple backup of the Bacula build directory # to a tape where the maximum tape file size is set to 1M # -cwd=`pwd` -bin/bacula stop 2>&1 >/dev/null +TestName="small-file-size-tape" +JobName=smallfilesize +. scripts/functions + +require_tape_drive + scripts/copy-tape-confs scripts/cleanup-tape -echo "${cwd}/build" >/tmp/file-list -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. + +echo "${cwd}/build" >${cwd}/tmp/file-list cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf -echo " " -echo " " -echo " === Starting Small File Size test ===" -echo " === Starting Small File Size test ===" >>working/log -echo " " +change_jobname NightlySave $JobName +start_test -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <${cwd}/tmp/bconcmds +@$out /dev/null messages -@output tmp/log1.out -label storage=DDS-4 volume=TestVolume001 slot=0 -run job=NightlySave yes +@$out ${cwd}/tmp/log1.out +label storage=tape volume=TestVolume001 slot=0 pool=Default +setdebug level=2 storage=tape +run job=$JobName yes wait messages @# @# now do a restore @# -@output tmp/log2.out -restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 +@$out ${cwd}/tmp/log2.out +restore where=${cwd}/tmp/bacula-restores select storage=tape +unmark * +mark * +done yes wait messages -@output quit END_OF_DATA -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 " !!!!! Small File Size test Bacula source failed!!! !!!!! " - echo " !!!!! Small File Size test failed!!! !!!!! " >>test.out - echo " " -else - echo " ===== Small File Size test Bacula source OK ===== " - echo " ===== Small File Size test OK ===== " >>test.out -# scripts/cleanup -fi + +run_bacula +check_for_zombie_jobs storage=tape +stop_bacula + +check_two_logs +check_restore_diff +end_test