]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/bscan-fast-tape
Backport from BEE
[bacula/bacula] / regress / tests / bscan-fast-tape
index 2c8121896dffe33320ad3cd25e7752192eb3429d..7c68a78a3a3a2a6ea0bd4e60ecee790386d5bd0b 100755 (executable)
@@ -5,14 +5,15 @@
 #   do a bscan and restore.
 #   It should require at least 4 different bsrs.
 #
-TestName="bscan-tape"
-JobName=bscantape
+TestName="bscan-fast-tape"
+JobName=bscanfasttape
 . scripts/functions
-set_debug 0
+
+require_tape_drive
 
 copy_tape_confs
 
-echo "${cwd}/build" >/tmp/file-list
+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
@@ -21,11 +22,11 @@ change_jobname NightlySave $JobName
 start_test
 
 cat <<END_OF_DATA >tmp/bconcmds
-@output /dev/null
+@$out /dev/null
 messages
 @$out tmp/log1.out
-setdebug level=2 storage=DDS-4
-label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+setdebug level=2 storage=tape
+label storage=tape volume=TestVolume001 slot=0 pool=Default
 run job=$JobName yes
 wait
 messages
@@ -33,7 +34,7 @@ quit
 END_OF_DATA
 
 echo "Starting Bacula tape writing"
-#bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
+#$bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
 #rewind
 #label
 #Test001
@@ -47,7 +48,7 @@ echo "Starting Bacula tape writing"
 #quit
 #END_OF_DATA
 #run_bacula
-#check_for_zombie_jobs storage=DDS-4
+#check_for_zombie_jobs storage=tape
 #stop_bacula
 echo "End writing tape"
 
@@ -62,7 +63,10 @@ cd ..
 
 echo "Begin attempt to read tape that crashes the system"
 echo "volume=TestVolume001" >tmp/bscan.bsr
-strace -o strace.new bin/bscan -d200 -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
+
+bscan_libdbi
+
+strace -o strace.new $bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf tape
 exit
 cat <<END_OF_DATA >tmp/bconcmds
 @$out /dev/null
@@ -71,16 +75,15 @@ messages
 @# 
 @# now do a restore
 @#
-restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+restore where=${cwd}/tmp/bacula-restores select all storage=tape done
 yes
 wait
 messages
-@$out
 quit
 END_OF_DATA
 
 run_bacula
-check_for_zombie_jobs storage=DDS-4
+check_for_zombie_jobs storage=tape
 stop_bacula
 rm -f  ${cwd}/build/src/lib/dummy