3 # Test for a tape truncation bug.
7 scripts/copy-tape-confs
9 echo "${cwd}/build" >/tmp/file-list
13 echo " === Starting truncate-bug-tape test at `date +%R:%S` ==="
14 echo " === Starting truncate-bug-tape test at `date +%R:%S` ===" >>working/log
17 #bin/bacula start 2>&1 >/dev/null
19 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
23 label storage=DDS-4 volume=TestVolume001 slot=0
24 @# do a bunch of saves so we have 12 files on the tape
25 run job=NightlySave yes
26 run level=Full job=NightlySave yes
27 run level=Full job=NightlySave yes
28 run level=Full job=NightlySave yes
29 run level=Full job=NightlySave yes
30 run level=Full job=NightlySave yes
31 run level=Full job=NightlySave yes
32 run level=Full job=NightlySave yes
33 run level=Full job=NightlySave yes
34 run level=Full job=NightlySave yes
35 run level=Full job=NightlySave yes
36 run level=Full job=NightlySave yes
41 scripts/check_for_zombie_jobs storage=DDS-4
42 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
49 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
51 @# select JobId=4 (i.e. file five on the tape)
63 scripts/check_for_zombie_jobs storage=DDS-4
64 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
68 run level=Full job=NightlySave yes
73 bin/bacula stop 2>&1 >/dev/null
74 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
76 grep "^ Termination: *Backup OK" tmp/log2.out 2>&1 >/dev/null
78 if [ $bstat != 0 -o $rstat != 0 ] ; then
81 echo " !!!!! truncate-bug-tape test Bacula source failed!!! !!!!! "
82 echo " !!!!! truncate-bug-tape test failed!!! !!!!! " >>test.out
85 echo " ===== truncate-bug-tape test Bacula source OK ===== "
86 echo " ===== truncate-bug-tape test OK ===== " >>test.out