3 # Test for a tape truncation bug.
5 TestName="truncate-bug-tape"
10 scripts/copy-tape-confs
12 echo "${cwd}/build" >/tmp/file-list
14 change_jobname $JobName
17 cat <<END_OF_DATA >tmp/bconcmds
21 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
22 @# do a bunch of saves so we have 12 files on the tape
23 run job=NightlySave 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 run level=Full job=$JobName yes
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 cat <<END_OF_DATA >tmp/bconcmds
72 run level=Full job=$JobName yes
77 bin/bacula stop 2>&1 >/dev/null
80 check_for_zombie_jobs storage=DDS-4