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
35 @#setdebug level=100 storage=DDS-4
42 scripts/check_for_zombie_jobs storage=DDS-4
44 cat <<END_OF_DATA >tmp/bconcmds
51 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
53 @# select JobId=4 (i.e. file five on the tape)
67 scripts/check_for_zombie_jobs storage=DDS-4
69 # Now write to tape one more time
70 cat <<END_OF_DATA >tmp/bconcmds
74 run level=Full job=$JobName yes
81 check_for_zombie_jobs storage=DDS-4
85 grep "^ Termination: *Backup OK" tmp/log3.out 2>&1 >/dev/null