3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Try to stress test autolabel by creating lots of new
7 # volumes. This is to try to show up a bug 8106 where
8 # at some point when a volume is changed, the JobMedia
9 # EndFile < StartFile and EndBlock < StartBlock because
10 # it is picking up the information from the next Volume.
11 # Note, this does not reproduce the error ...
14 TestName="auto-label-jobmedia-test"
20 echo "${cwd}/build" >${cwd}/tmp/file-list
23 # Maximum Volume Jobs = 1
24 # Maximum Volume Bytes = 1500000
26 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
27 sed "s%# Simple Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
28 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
29 sed "s%# Maximum Volume% Maximum Volume%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
30 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
31 sed "s%Maximum Volume Jobs = 1%Maximum Volume Jobs = 10%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
32 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
33 sed "s%Maximum Volume Bytes = 1500000%Maximum Volume Bytes =45000000%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
35 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
36 sed "s%Maximum Concurrent Jobs = 10%Maximum Concurrent Jobs = 100%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
37 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
38 sed "s%Maximum Concurrent Jobs = 4%Maximum Concurrent Jobs = 100%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
41 change_jobname CompressedTest $JobName
44 cat <<END_OF_SCRIPT >${cwd}/tmp/bconcmds
47 @$out ${cwd}/tmp/log1.out
49 @#setdebug level=50 storage=File
50 @#setdebug level=50 dir
51 run job=$JobName level=Full storage=File yes
52 run job=$JobName storage=File yes
53 run job=$JobName level=Full storage=File yes
54 run job=$JobName level=full storage=File yes
55 run job=$JobName level=full storage=File yes
56 run job=$JobName level=full storage=File yes
57 run job=$JobName level=full storage=File yes
58 run job=$JobName level=full storage=File yes
59 run job=$JobName level=full storage=File yes
60 run job=$JobName level=full storage=File yes
61 run job=$JobName level=full storage=File yes
65 select * from JobMedia;
72 @$out ${cwd}/tmp/log2.out
73 setdebug level=0 storage=File
75 restore where=${cwd}/tmp/bacula-restores select storage=File
82 @# Now restore JobId=1
83 restore where=${cwd}/tmp/bacula-restores storage=File
91 @# Now restore JobId=3
92 restore where=${cwd}/tmp/bacula-restores storage=File
104 check_for_zombie_jobs storage=File