3 # Test for a tape truncation bug.
5 TestName="truncate-bug-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=tape volume=TestVolume001 slot=0 pool=Default
24 @# do a bunch of saves so we have 12 files on the tape
25 @#setdebug level=100 dir
26 setdebug level=100 storage=tape
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 run level=Full job=$JobName yes
38 run level=Full job=$JobName yes
45 scripts/check_for_zombie_jobs storage=tape
47 cat <<END_OF_DATA >tmp/bconcmds
54 restore where=${cwd}/tmp/bacula-restores storage=tape
56 @# select JobId=4 (i.e. file five on the tape)
69 scripts/check_for_zombie_jobs storage=tape
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=tape
87 grep "^ Termination: *Backup OK" tmp/log3.out 2>&1 >/dev/null