3 # Test for a tape truncation bug.
5 TestName="truncate-bug-tape"
11 echo "${cwd}/build" >/tmp/file-list
13 change_jobname NightlySave $JobName
16 cat <<END_OF_DATA >tmp/bconcmds
20 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
21 @# do a bunch of saves so we have 12 files on the tape
23 run level=Full job=$JobName 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
40 scripts/check_for_zombie_jobs storage=DDS-4
42 cat <<END_OF_DATA >tmp/bconcmds
49 restore where=${cwd}/tmp/bacula-restores storage=DDS-4
51 @# select JobId=4 (i.e. file five on the tape)
65 scripts/check_for_zombie_jobs storage=DDS-4
67 # Now write to tape one more time
68 cat <<END_OF_DATA >tmp/bconcmds
72 run level=Full job=$JobName yes
79 check_for_zombie_jobs storage=DDS-4
83 grep "^ Termination: *Backup OK" tmp/log3.out 2>&1 >/dev/null