From de949203473b2c63fe4012a5782a8bfee2bdd531 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 23 Jul 2007 11:01:33 +0000 Subject: [PATCH] ebl Tweak to get bug 897 reproductible git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5233 91ce42f0-d328-0410-95d8-f526ca767f89 --- .../scripts/bacula-dir.conf.testrunscript.in | 24 ++++++++-- regress/tests/bug-897 | 46 +++++++++++++++++-- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/regress/scripts/bacula-dir.conf.testrunscript.in b/regress/scripts/bacula-dir.conf.testrunscript.in index 651f4f572d..705581bfad 100644 --- a/regress/scripts/bacula-dir.conf.testrunscript.in +++ b/regress/scripts/bacula-dir.conf.testrunscript.in @@ -150,12 +150,30 @@ Job { Run After Failed Job = "/bin/echo RunAfterFailedJob" } +FileSet { + Name = FS_FIFO + Include { + Options { readfifo = yes } + File=/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 @@ -21,13 +33,16 @@ cat <tmp/bconcmds @$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 @@ -62,5 +77,28 @@ else 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 -- 2.39.5