]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Wed, 3 Aug 2005 17:21:07 +0000 (17:21 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 3 Aug 2005 17:21:07 +0000 (17:21 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2288 91ce42f0-d328-0410-95d8-f526ca767f89

regress/do_file [new file with mode: 0755]
regress/misc-tests [new file with mode: 0644]
regress/scripts/.cvsignore
regress/tests/.cvsignore
regress/tests/eot-fail-tape [new file with mode: 0755]
regress/tests/relabel-tape

diff --git a/regress/do_file b/regress/do_file
new file mode 100755 (executable)
index 0000000..5fe0a82
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+#  /home/kern/bacula/bin/startmysql
+make setup
+./starttime
+./all-non-root-tests
+./endtime
diff --git a/regress/misc-tests b/regress/misc-tests
new file mode 100644 (file)
index 0000000..dd2734c
--- /dev/null
@@ -0,0 +1,2 @@
+tests/btape-fill-full-tape
+tests/eot-fail-tape
index bfb2b123812bdabff39b91fdaf81750c10e7c769..306c3a6c700ad48aa131a58c4eb1b221bf2ac8f4 100644 (file)
@@ -17,3 +17,6 @@ cleanup-2tape
 prepare-two-tapes
 cleanup-2drive
 bacula-sd-2drive.conf
+bacula-sd-win32-tape.conf
+bacula-sd-2drive.conf
+bacula-dir-win32-tape.conf
index d00491fd7e5bb6fa28c517a0bb32b8b506539d4d..1191247b6d9a206f6ba3d8ac79e26d041dd86941 100644 (file)
@@ -1 +1,2 @@
 1
+2
diff --git a/regress/tests/eot-fail-tape b/regress/tests/eot-fail-tape
new file mode 100755 (executable)
index 0000000..049b745
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory 
+#  to two tapes where the maximum tape file size is set to 1M
+#
+cwd=`pwd`
+scripts/copy-tape-confs
+scripts/cleanup-tape
+echo "${cwd}/build" >/tmp/file-list
+
+out="tmp/sed_tmp"
+echo "s%# Maximum File Size%  Maximum File Size%g" >${out}
+cp -f ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
+sed -f ${out} ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
+
+echo " "
+echo " "
+echo " === Starting eot-fail-tape test at `date +%R:%S` ==="
+echo " === Starting eot-fail-tape test at `date +%R:%S` ===" >>working/log
+echo " "
+
+bin/bacula start -d100
+bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
+@tee /dev/null
+messages
+@tee tmp/log1.out
+label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
+update Volume=TestVolume001 MaxVolBytes=3000000
+run job=NightlySave yes
+wait
+messages
+@# 
+@# now do a restore
+@#
+@tee tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
+yes
+wait
+messages
+@tee
+quit
+END_OF_DATA
+scripts/check_for_zombie_jobs storage=DDS-4
+
+bin/bacula stop 2>&1 >/dev/null
+grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^  Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
+diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
+   echo " "
+   echo " "
+   echo "  !!!!! eot-fail-tape test Bacula source failed!!! !!!!! "
+   echo "  !!!!! eot-fail-tape test failed!!! !!!!! " >>test.out
+   echo " "
+else
+   echo "  ===== eot-fail-tape test Bacula source OK ===== "
+   echo "  ===== eot-fail-tape test OK ===== " >>test.out
+#  scripts/cleanup
+fi
index c2e31e0c36ba69020dd0e48b8a700788df79734e..295c279065e695bcc519a84af52f078e49a8f157 100755 (executable)
@@ -4,8 +4,14 @@
 #   then backup four times, each with incremental then finally restore.
 #   It should require at least 4 different bsrs.
 #
-cwd=`pwd`
+debug=0
+if test "$debug" -eq 1 ; then
+  out="tee"
+else
+  out="output"
+fi
 
+cwd=`pwd`
 scripts/copy-tape-confs
 scripts/cleanup-tape
 echo "${cwd}/build" >/tmp/file-list
@@ -16,13 +22,10 @@ echo " === Starting relabel-tape at `date +%R:%S` ==="
 echo " === Starting relabel-tape at `date +%R:%S` ===" >>working/log
 echo " "
 
-bin/bacula start 2>&1 >/dev/null
-#bin/bacula start
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
 messages
-@output tmp/log1.out
+@$out tmp/log1.out
 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
 run job=NightlySave level=Full yes
 wait
@@ -41,27 +44,36 @@ run job=NightlySave level=Full yes
 unmount
 unmount
 purge volume=TestVolume001
-relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0
+relabel oldvolume=TestVolume001 volume=TestVolume003 slot=0 pool=Default
 list volumes
 messages
 wait
 messages
-@output
+@$out
 quit
 END_OF_DATA
+
+if test "$debug" -eq 1 ; then
+  bin/bacula start
+  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+else
+  bin/bacula start 2>&1 >/dev/null
+  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
+fi
+
 echo "Backup done"
 # 
 # now do several restores to ensure we cleanup between jobs
 #
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-@output /dev/null
+cat <<END_OF_DATA >tmp/bconcmds
+@$out /dev/null
 restore where=${cwd}/tmp/bacula-restores select all done
 yes
 wait
 restore where=${cwd}/tmp/bacula-restores select all done
 yes
 wait
-@output tmp/log2.out
+@$out tmp/log2.out
 @#
 @# now unmount the tape and start two restores
 @#  at the same time
@@ -77,9 +89,16 @@ yes
 mount storage=DDS-4
 wait
 messages
-@output
+@$out
 quit
 END_OF_DATA
+
+if test "$debug" -eq 1 ; then
+  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+else
+  cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
+fi
+
 scripts/check_for_zombie_jobs storage=DDS-4
 bin/bacula stop 2>&1 >/dev/null
 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null