]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/bug-1227
regress: Add test to reproduce #3284 with reload command
[bacula/bacula] / regress / tests / bug-1227
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Test that reproduce bug 1227
9 #
10 TestName="bug-1227"
11 JobName=backuptape
12 . scripts/functions
13
14 require_tape_drive
15
16 scripts/copy-tape-confs
17 scripts/cleanup-tape
18
19 echo "${cwd}/build" >${cwd}/tmp/file-list
20
21 change_jobname NightlySave $JobName
22 start_test
23
24
25 # Write out bconsole commands
26 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
27 @$out /dev/null
28 messages
29 @$out ${cwd}/tmp/log1.out
30 label storage=tape volume=TestVolume001 slot=0 pool=Default
31 messages
32 END_OF_DATA
33
34 run_bacula
35 stop_bacula
36
37 FILE=`awk  '/Archive Device = / { print $4 }' bin/bacula-sd.conf`
38 cp /dev/null $FILE
39
40 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
41 @$out ${cwd}/tmp/log1.out
42 messages
43 run job=$JobName yes
44 @sleep 10
45 messages
46 setdebug level=400 storage=tape trace=1
47 setdebug level=400 director trace=1
48 label storage=tape volume=TestVolume002 slot=0 pool=Default
49 messages
50 @sleep 5
51 mount storage=tape slot=0
52 @sleep 2
53 messages
54 @sleep 2
55 mount storage=tape slot=0
56 @sleep 2
57 messages
58 cancel jobid=1
59 wait
60 messages
61 list volumes
62 END_OF_DATA
63
64 run_bacula
65 check_for_zombie_jobs storage=tape
66 stop_bacula
67
68 touch ${cwd}/tmp/log2.out
69 check_two_logs
70 check_restore_diff
71
72 end_test