3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
17 rm -f bin/bacula-dir.conf
18 rm -f ${cwd}/tmp/RUN*log
20 rm -f ${cwd}/tmp/RUN_BUG_897
21 rm -f ${cwd}/tmp/RUN_FD_FAILED
23 /bin/cp -f scripts/bacula-dir.conf.testrunscript bin/bacula-dir.conf
25 echo "${cwd}/build/po" >${cwd}/tmp/file-list
26 echo "${cwd}/tmp/fifo" >> ${cwd}/tmp/file-list
27 mkfifo "${cwd}/tmp/fifo"
29 # use this to be able to cancel a running job
31 cat > ${cwd}/tmp/fifo < /dev/zero
32 cat > ${cwd}/tmp/fifo < /dev/zero
37 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
40 label volume=TestVolume001
41 @$out ${cwd}/tmp/RUN_FD_FAILED.log
42 run job=RUN_FD_FAILED yes
46 @$out ${cwd}/tmp/RUN_BUG_897.log
47 setdebug level=200 client=$CLIENT
59 check_for_zombie_jobs storage=File
69 grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
71 grep 'fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
73 grep 'dir: AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
75 grep 'touching' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
77 grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1
79 if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ]
81 [ "$debug" = 1 ] && echo RUN_FD_FAILED ok
83 echo "RUN_FD_FAILED in error"
86 if test -f ${cwd}/tmp/RUN_FD_FAILED
88 echo "The ${cwd}/tmp/RUN_FD_FAILED have been created, but nothing could be found"
93 grep 'touching' ${cwd}/tmp/RUN_BUG_897.log >/dev/null 2>&1
97 [ "$debug" = 1 ] && echo RUN_FD_FAILED ok
99 echo "RUN_BUG_897 in error"
102 if test -f ${cwd}/tmp/RUN_BUG_897
104 echo "The ${cwd}/tmp/RUN_BUG_897 have been created, but nothing could be found"