3 # Test for a tape truncation bug.
5 TestName="truncate-bug-1t1d-tape"
11 scripts/copy-tape-confs
14 echo "${cwd}/build" >${cwd}/tmp/file-list
16 change_jobname NightlySave $JobName
19 cat <<END_OF_DATA >tmp/bconcmds
23 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
24 @# do a bunch of saves so we have 12 files on the tape
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 run level=Full job=$JobName yes
35 run level=Full job=$JobName yes
36 run level=Full job=$JobName yes
37 @#setdebug level=100 storage=DDS-4
44 scripts/check_for_zombie_jobs storage=DDS-4
46 cat <<END_OF_DATA >tmp/bconcmds
53 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
55 @# select JobId=4 (i.e. file five on the tape)
69 scripts/check_for_zombie_jobs storage=DDS-4
71 # Now write to tape one more time
72 cat <<END_OF_DATA >tmp/bconcmds
76 run level=Full job=$JobName yes
83 check_for_zombie_jobs storage=DDS-4
87 grep "^ Termination: *Backup OK" tmp/log3.out 2>&1 >/dev/null