12 rm -f bin/bacula-dir.conf
13 rm -f ${cwd}/tmp/RUN*log
15 rm -f ${cwd}/tmp/RUN_BUG_897
16 rm -f ${cwd}/tmp/RUN_FD_FAILED
18 /bin/cp -f scripts/bacula-dir.conf.testrunscript bin/bacula-dir.conf
20 echo "${cwd}/build/po" >${cwd}/tmp/file-list
21 echo "${cwd}/tmp/fifo" >> ${cwd}/tmp/file-list
22 mkfifo "${cwd}/tmp/fifo"
24 # use this to be able to cancel a running job
26 cat > ${cwd}/tmp/fifo < /dev/zero
27 cat > ${cwd}/tmp/fifo < /dev/zero
32 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
35 label volume=TestVolume001
36 @$out ${cwd}/tmp/RUN_FD_FAILED.log
37 run job=RUN_FD_FAILED yes
41 @$out ${cwd}/tmp/RUN_BUG_897.log
42 setdebug level=200 client
54 check_for_zombie_jobs storage=File
64 grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
66 grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
68 grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
70 grep 'touching' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
72 grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
74 if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ]
76 [ "$debug" = 1 ] && echo RUN_FD_FAILED ok
78 echo "RUN_FD_FAILED in error"
81 if test -f ${cwd}/tmp/RUN_FD_FAILED
83 echo "The ${cwd}/tmp/RUN_FD_FAILED have been created, but nothing could be found"
88 grep 'touching' ${cwd}/tmp/RUN_BUG_897.log >/dev/null 2>&1
92 [ "$debug" = 1 ] && echo RUN_FD_FAILED ok
94 echo "RUN_BUG_897 in error"
97 if test -f ${cwd}/tmp/RUN_BUG_897
99 echo "The ${cwd}/tmp/RUN_BUG_897 have been created, but nothing could be found"