3 # Test for a tape truncation bug.
5 TestName="truncate-bug-tape"
12 echo "${cwd}/build" >/tmp/file-list
14 change_jobname NightlySave $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
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 # 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