Run After Failed Job = "/bin/echo RunAfterFailedJob"
}
+FileSet {
+ Name = FS_FIFO
+ Include {
+ Options { readfifo = yes }
+ File=</tmp/file-list
+ }
+}
+
Job {
- Name = BUG_FATAL
+ Name = BUG_897
JobDefs = DefaultJob
- FileSet = FS_TESTJOB
-}
+ FileSet = FS_FIFO
+ RunScript {
+ Command = "/bin/echo touching /tmp/RUN_BUG_897"
+ RunsWhen = after
+ RunsOnFailure = yes
+ }
+ RunScript {
+ Command = "/bin/touch /tmp/RUN_BUG_897"
+ RunsWhen = after
+ RunsOnFailure = yes
+ }
+}
# Client (File Services) to backup
Client {
rm -f bin/bacula-dir.conf
rm -f tmp/RUN*log
+rm -f ${cwd}/tmp/fifo
+rm -f /tmp/RUN_BUG_897
+rm -f /tmp/RUN_FD_FAILED
+
/bin/cp -f scripts/bacula-dir.conf.testrunscript bin/bacula-dir.conf
echo "${cwd}/build/po" >/tmp/file-list
+echo "${cwd}/tmp/fifo" >> /tmp/file-list
+mkfifo "${cwd}/tmp/fifo"
+
+# use this to be able to cancel a running job
+(
+ cat > ${cwd}/tmp/fifo < /dev/zero
+ cat > ${cwd}/tmp/fifo < /dev/zero
+) &
start_test
@$out /dev/null
messages
label volume=TestVolume001
-@$out tmp/RUN_FD_WARNING.log
-run job=RUN_FD_WARNING yes
+@$out tmp/RUN_FD_FAILED.log
+run job=RUN_FD_FAILED yes
wait
messages
@sleep 1
-@$out tmp/RUN_FD_FAILED.log
-run job=RUN_FD_FAILED yes
+@$out tmp/RUN_BUG_897.log
+run job=BUG_897 yes
+@sleep 2
+cancel
+yes
wait
messages
st dir
echo "RUN_FD_FAILED in error"
rstat=1
fi
+if test -f /tmp/RUN_FD_FAILED
+then
+ echo "The /tmp/RUN_FD_FAILED have been created, but nothing could be found"
+ echo "in the log"
+fi
+
+
+grep 'touching' tmp/RUN_BUG_897.log >/dev/null 2>&1
+d=$?
+if [ $d = 0 ]
+then
+ [ "$debug" = 1 ] && echo RUN_FD_FAILED ok
+else
+ echo "RUN_BUG_897 in error"
+ rstat=1
+fi
+if test -f /tmp/RUN_BUG_897
+then
+ echo "The /tmp/RUN_BUG_897 have been created, but nothing could be found"
+ echo "in the log"
+fi
+
+
end_test