]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/messages-test
Show an other deadlock in messages.c
[bacula/bacula] / regress / tests / messages-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then restore it.
5 # We have bad configuration for Messages resources, everything
6 # should work
7 #
8 TestName="messages-test"
9 JobName=backup
10 . scripts/functions
11
12 scripts/cleanup
13 scripts/copy-confs
14 change_jobname BackupClient1 $JobName
15 start_test
16 #
17 # Zap out any schedule in default conf file so that
18 #  it doesn't start during our test
19 #
20 outf="$tmp/sed_tmp"
21 echo "s%  Schedule =%# Schedule =%g" >$outf
22
23 # tweak all Messages {} with non valid path
24 echo 's%append = "%append = "/nowhere%g' >> $outf
25 echo "s%bsmtp -h $SMTP_HOST%bsmtp -h nonvalidhost%g" >> $outf
26 echo 's%# mail%  mail%' >> $outf
27 #echo 's%mailcommand = "%mailcommand = "/nowhere%g' >> $outf
28
29 cp $scripts/bacula-dir.conf $tmp/1
30 sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
31
32
33 cat <<END_OF_DATA >$tmp/bconcmds
34 @$out /dev/null
35 messages
36 @$out $tmp/log1.out
37 @#setdebug level=100 storage=File
38 label volume=TestVolume001 storage=File pool=File
39 run job=$JobName yes
40 @sleep 1
41 status storage=File
42 wait
43 messages
44 @# 
45 @# now do a restore
46 @#
47 @$out $tmp/log2.out  
48 restore where=$tmp/bacula-restores select all done
49 yes
50 wait
51 messages
52 quit
53 END_OF_DATA
54
55 run_bacula
56 check_for_zombie_jobs storage=File
57 stop_bacula
58
59 check_two_logs
60 check_restore_diff
61 end_test