]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/fifo-test
Merge branch 'master' into basejobv3
[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 "${cwd}/tmp/bfifo" >${cwd}/tmp/file-list
12
13 rm -f ${cwd}/tmp/bfifo
14 mkfifo ${cwd}/tmp/bfifo
15 # send a file into the fifo
16 file=encrypt-bug.jpg
17 cat ${file} >${cwd}/tmp/bfifo&
18
19 start_test
20
21 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
22 @$out /dev/null
23 messages
24 @$out ${cwd}/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 >${cwd}/tmp/bconcmds
36 @$out /dev/null
37 messages
38 @# 
39 @# now do a restore
40 @#
41 @$out ${cwd}/tmp/log2.out
42 @#setdebug level=50 client=$CLIENT
43 restore where=/  select all storage=File1 done
44 yes
45 wait
46 messages
47 quit
48 END_OF_DATA
49
50 cat <${cwd}/tmp/bfifo >${cwd}/tmp/${file}&
51
52 run_bconsole
53
54 check_for_zombie_jobs storage=File1
55 stop_bacula
56
57 check_two_logs
58 diff ${file} ${cwd}/tmp/${file}
59 dstat=$?
60 end_test