3 # Test for a tape truncation bug.
5 TestName="truncate-bug-tape"
11 echo "${cwd}/build" >${cwd}/tmp/file-list
13 change_jobname NightlySave $JobName
16 cat <<END_OF_DATA >tmp/bconcmds
20 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
21 @# do a bunch of saves so we have 12 files on the tape
23 run level=Full job=$JobName yes
24 run level=Full job=$JobName yes
25 run level=Full job=$JobName yes
26 run level=Full job=$JobName yes
27 run level=Full job=$JobName yes
28 run level=Full job=$JobName yes
29 run level=Full job=$JobName yes
30 run level=Full job=$JobName yes
31 run level=Full job=$JobName yes
32 run level=Full job=$JobName yes
33 run level=Full job=$JobName yes
34 @#setdebug level=100 storage=DDS-4
41 scripts/check_for_zombie_jobs storage=DDS-4
43 cat <<END_OF_DATA >tmp/bconcmds
50 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
52 @# select JobId=4 (i.e. file five on the tape)
66 scripts/check_for_zombie_jobs storage=DDS-4
68 # Now write to tape one more time
69 cat <<END_OF_DATA >tmp/bconcmds
73 run level=Full job=$JobName yes
80 check_for_zombie_jobs storage=DDS-4
84 grep "^ Termination: *Backup OK" tmp/log3.out 2>&1 >/dev/null