]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fifo-test
Update new debugging method
[bacula/bacula] / regress / tests / fifo-test
1 #!/bin/sh
2 #
3 # Attempt to backup from a fifo and restore to a fifo
4 #
5 TestName="fifo-test"
6 JobName=FIFOTest
7 . scripts/functions
8
9 scripts/cleanup
10 scripts/copy-test-confs
11 echo "/tmp/bfifo" >/tmp/file-list
12
13 rm -f /tmp/bfifo
14 mkfifo /tmp/bfifo
15 # send a file into the fifo
16 file=encrypt-bug.jpg
17 cat ${file} >/tmp/bfifo&
18
19 start_test
20
21 cat <<END_OF_DATA >tmp/bconcmds
22 @$out /dev/null
23 messages
24 @$out tmp/log1.out
25 label storage=File1 volume=TestVolume001
26 run job=$JobName storage=File1 yes
27 wait
28 messages
29 quit
30 END_OF_DATA
31
32
33 run_bacula
34
35 cat <<END_OF_DATA >tmp/bconcmds
36 @$out /dev/null
37 messages
38 @# 
39 @# now do a restore
40 @#
41 @$out tmp/log2.out
42 @#setdebug level=50 client
43 restore where=/  select all storage=File1 done
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 cat </tmp/bfifo >tmp/${file}&
52
53 run_bconsole
54
55 check_for_zombie_jobs storage=File1
56 stop_bacula
57
58 check_two_logs
59 diff ${file} tmp/${file}
60 dstat=$?
61 end_test