]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/auto-label-many-test
Attempt to fix timing problem with console-dotcmd-test on FreeBSD
[bacula/bacula] / regress / tests / auto-label-many-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 #
7 #  Try to stress test autolabel by creating lots of new
8 #    volumes. This is to try to show up a bug 8103 where
9 #    at some point a volume is created in the catalog but
10 #    not labeled, and then produces errors.
11 #
12
13 TestName="auto-label-many-test"
14 JobName=AutoLabel
15 . scripts/functions
16
17 copy_test_confs
18
19 echo "${cwd}/build" >${cwd}/tmp/file-list
20
21 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
22 sed "s%# Simple Label Format%  Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
23 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
24 sed "s%# Maximum Volume%  Maximum Volume%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
25
26 change_jobname CompressedTest $JobName
27 start_test
28
29 #$bperl -e 'add_attribute("$conf/bacula-dir.conf", "SpoolData", "no", "Job")'
30 #$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Upload", "no", "Cloud")'
31
32 cat <<END_OF_SCRIPT >${cwd}/tmp/bconcmds
33 @output /dev/null
34 messages
35 @$out ${cwd}/tmp/log1.out
36 messages
37 setdebug level=200 trace=1 options=hT storage=File
38 @#setdebug level=50 dir
39 run job=$JobName level=Full storage=File yes
40 run job=$JobName storage=File yes
41 run job=$JobName level=Full storage=File yes
42 run job=$JobName storage=File yes
43 @#run job=$JobName storage=File yes
44 @#run job=$JobName storage=File yes
45 @#run job=$JobName storage=File yes
46 status dir
47 wait
48 list volumes
49 messages
50 @# 
51 @# now do a restore
52 @#
53 @$out ${cwd}/tmp/log2.out
54 setdebug level=0 storage=File
55 setdebug level=0 dir
56 restore where=${cwd}/tmp/bacula-restores select storage=File
57 unmark *
58 mark *
59 done
60 yes
61 wait
62 messages
63 @# Now restore JobId=1
64 restore where=${cwd}/tmp/bacula-restores storage=File
65 3
66 1
67 mark *
68 done
69 yes
70 wait
71 messages
72 @# Now restore JobId=3
73 restore where=${cwd}/tmp/bacula-restores storage=File
74 3
75 3
76 mark *
77 done
78 yes
79 wait
80 messages
81 quit
82 END_OF_SCRIPT
83
84 run_bacula
85 check_for_zombie_jobs storage=File
86 stop_bacula
87
88 check_two_logs
89 check_restore_diff
90 end_test