]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/many-reload-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / many-reload-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Do more than 32 reloads to make sure the Director
9 #  survives too many reloads
10 #
11 TestName="many-reload-test"
12 . scripts/functions
13
14 require_linux
15 scripts/cleanup
16 scripts/copy-confs
17
18 bstat=0
19 rstat=0
20 zstat=0
21
22 cat <<END_OF_DATA >${tmp}/bconcmds
23 @output /dev/null
24 messages
25 @$out ${tmp}/log1.out
26 reload
27 reload
28 reload
29 reload
30 reload
31 reload
32 reload
33 reload
34 reload
35 reload
36 reload
37 reload
38 reload
39 reload
40 reload
41 reload
42 reload
43 reload
44 reload
45 reload
46 reload
47 reload
48 reload
49 reload
50 reload
51 reload
52 reload
53 reload
54 reload
55 reload
56 reload
57 reload
58 reload
59 reload
60 reload
61 reload
62 reload
63 reload
64 reload
65 reload
66 reload
67 wait
68 messages
69 quit
70 END_OF_DATA
71
72 start_test
73
74 # should be ok
75 $bin/bacula-dir -t $conf/bacula-dir.conf
76 if [ $? != 0 ]; then
77     estat=1
78     print_debug "ERROR: Error on bacula-dir.conf"
79 fi
80
81 $bin/bacula-ctl-dir start >/dev/null
82 pid=`cat $working/bacula-dir.$BASEPORT.pid`
83
84 # echo "bacula-dir pid is $pid"
85
86 sleep 2
87
88 ls -l /proc/$pid/fd | grep bacula-dir.conf
89 if [ $? = 0 ]; then
90     estat=1
91     print_debug "ERROR: Should not have bacula-dir.conf open"
92 fi
93
94 # should work well
95 run_bconsole
96
97 $bin/bacula-ctl-dir stop >/dev/null
98
99 end_test