From 796fa2108ece6872eaf3c8df0cd741a7ceece8f7 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 16 Jul 2009 16:41:09 +0000 Subject: [PATCH] Add test for bug 1288 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9029 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/tests/vtape-bug-1288 | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 regress/tests/vtape-bug-1288 diff --git a/regress/tests/vtape-bug-1288 b/regress/tests/vtape-bug-1288 new file mode 100644 index 0000000000..70124705ac --- /dev/null +++ b/regress/tests/vtape-bug-1288 @@ -0,0 +1,78 @@ +#!/bin/sh +# +# Run backups with dummy tape driver +# This test setups an Autochanger with 80 slots +# and 5 drives (3 LTO3 and 2 LTO1) +# +# TAPE_DRIVE="$cwd/working/ach/drive0" +# TAPE_DRIVE1="$cwd/working/ach/drive0" +# AUTOCHANGER="$cwd/working/ach/conf" +# USE_VTAPE=yes +# AUTOCHANGER_SCRIPT=disk-changer +# + +TestName="vtape-bug-1288" +JobName=backup +. scripts/functions + +require_vtape + +scripts/cleanup +scripts/copy-tape-confs +cp scripts/bacula-dir-vtape.conf bin/bacula-dir.conf +cp scripts/bacula-sd-vtape.conf bin/bacula-sd.conf +sed -i 's/Device {/Device { LabelMedia = yes/' bin/bacula-sd.conf +sed -i 's/Pool {/Pool { LabelFormat = "vol"/' bin/bacula-dir.conf +sed -i 's/SpoolData = yes/SpoolData = no/' bin/bacula-dir.conf +sed -i 's/Maximum Volume Size = 30M//' bin/bacula-sd.conf +sed -i 's/Maximum File Size = 7M//' bin/bacula-sd.conf +sed -i 's!Client Run Before Job = "/bin/sleep 2"!!' bin/bacula-dir.conf +scripts/prepare-fake-autochanger + +echo "${cwd}/build" >${cwd}/tmp/file-list + +start_test + +when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+5))"` + +clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf` + +# Catalog record for cleaning tape "CLN01" successfully created. +# CLN01 | Cleaning + +cat <${cwd}/tmp/bconcmds +@$out ${cwd}/tmp/log1.out +messages +@#label barcodes slots=1-10 pool=Scratch storage=LTO3 drive=0 +add pool=Inc storage=LTO3 drive=0 +1 +vol +1 +1 +yes +add pool=Inc storage=LTO3 drive=0 +1 +vol +2 +2 +yes +list volumes +@$out ${cwd}/tmp/log1.out +run storage=LTO3 when="$when1" job=NightlySave pool=Inc yes +run storage=LTO3 when="$when1" job=NightlySave2 pool=Inc yes +run storage=LTO3 when="$when1" job=NightlySave1 pool=Inc yes +@sleep 6 +messages +wait +messages +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=LTO3 $clientname + + +stop_bacula + +end_test + -- 2.39.5