]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/truncate-bug-tape
ebl add runscript regression script (not yet works well)
[bacula/bacula] / regress / tests / truncate-bug-tape
index 82b1cf54a80a6431720150bbbd835194eba56277..2273044fe5f971ae78d6a7375da8b695c0cccbc3 100755 (executable)
@@ -5,13 +5,13 @@
 TestName="truncate-bug-tape" 
 JobName=truncatebug
 . scripts/functions
-set_debug 0
 
-scripts/copy-tape-confs
-scripts/cleanup-tape
+set_debug 1
+copy_tape_confs
+
 echo "${cwd}/build" >/tmp/file-list
 
-change_jobname $JobName
+change_jobname NightlySave $JobName
 start_test
 
 cat <<END_OF_DATA >tmp/bconcmds
@@ -20,7 +20,7 @@ messages
 @$out   tmp/log1.out
 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
 @# do a bunch of saves so we have 12 files on the tape
-run job=NightlySave yes
+run job=$JobName yes
 run level=Full job=$JobName yes
 run level=Full job=$JobName yes
 run level=Full job=$JobName yes
@@ -32,6 +32,7 @@ run level=Full job=$JobName yes
 run level=Full job=$JobName yes
 run level=Full job=$JobName yes
 run level=Full job=$JobName yes
+@#setdebug level=100 storage=DDS-4
 wait
 messages
 quit
@@ -43,7 +44,7 @@ scripts/check_for_zombie_jobs storage=DDS-4
 cat <<END_OF_DATA >tmp/bconcmds
 @output /dev/null
 messages
-@$out tmp/log1.out
+@$out tmp/log2.out
 @# 
 @# now do a restore
 @#
@@ -65,23 +66,22 @@ END_OF_DATA
 run_bconsole
 scripts/check_for_zombie_jobs storage=DDS-4
 
+# Now write to tape one more time
 cat <<END_OF_DATA >tmp/bconcmds
 @output /dev/null
 messages
-@$out tmp/log2.out
+@$out tmp/log3.out
 run level=Full job=$JobName yes
 wait
 messages
 quit
 END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
 
 run_bconsole
 check_for_zombie_jobs storage=DDS-4
 stop_bacula
 
 check_two_logs
-# no diff made
-dstat=0
+grep "^  Termination: *Backup OK" tmp/log3.out 2>&1 >/dev/null
+dstat=$?
 end_test
-