]> git.sur5r.net Git - bacula/bacula/commitdiff
Update tape tests for hardware certification
authorKern Sibbald <kern@maous.(none)>
Tue, 1 Sep 2009 14:44:09 +0000 (16:44 +0200)
committerKern Sibbald <kern@maous.(none)>
Tue, 1 Sep 2009 14:44:09 +0000 (16:44 +0200)
regress/full-tape-tests [new file with mode: 0755]
regress/scripts/bacula-sd-btape.conf.in [new file with mode: 0644]
regress/scripts/copy-btape-confs [new file with mode: 0755]
regress/scripts/do_sed
regress/tests/bscan-fast-tape
regress/tests/btape-test-tape [new file with mode: 0755]

diff --git a/regress/full-tape-tests b/regress/full-tape-tests
new file mode 100755 (executable)
index 0000000..19a896c
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Run full tape tests
+#
+. ./config
+
+# 
+# If we have an autoloader, load the tape in slot1
+if test ! x$AUTOCHANGER = x/dev/null ; then
+   a=`bin/mtx-changer $AUTOCHANGER loaded $SLOT1 $TAPE_DRIVE $DRIVE1`
+   if test $a = 0 ; then
+      bin/mtx-changer $AUTOCHANGER load $SLOT1 $TAPE_DRIVE $DRIVE1
+   fi
+fi
+echo " "
+echo " " >>test.out
+echo "Start all non-root tape tests"
+echo "Start all non-root tape tests" >>test.out
+nice tests/ansi-label-tape
+nice tests/backup-bacula-tape
+nice tests/bscan-tape
+nice tests/btape-fill-full-tape
+nice tests/eighty-simultaneous-jobs-tape
+nice tests/eot-fail-tape
+nice tests/fixed-block-size-tape
+nice tests/four-concurrent-jobs-tape
+nice tests/four-jobs-tape
+nice tests/incremental-2media-tape
+nice tests/incremental-tape
+nice tests/memory-bug-tape
+nice tests/relabel-tape
+nice tests/restore-by-file-tape
+nice tests/restore-seek-tape
+nice tests/small-file-size-tape
+nice tests/truncate-bug-tape
+nice tests/verify-vol-tape
+
+# nice tests/manual-two-vol-tape
+
+echo "End full non-root tape tests"
+echo "End full non-root tape tests" >>test.out
diff --git a/regress/scripts/bacula-sd-btape.conf.in b/regress/scripts/bacula-sd-btape.conf.in
new file mode 100644 (file)
index 0000000..08ea47a
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Default Bacula Storage Daemon Configuration file
+#
+#  For Bacula release 3.0.3
+#
+# You may need to change the name of your tape drive
+#   on the "Archive Device" directive in the Device
+#   resource.  If you change the Name and/or the 
+#   "Media Type" in the Device resource, please ensure
+#   that dird.conf has corresponding changes.
+#
+
+Storage {                             # definition of myself
+  Name = @hostname@-sd
+  SDPort = @sdport@                  # Director's port      
+  WorkingDirectory = "@working_dir@"
+  Pid Directory = "@piddir@"
+  Subsys Directory = "@subsysdir@"
+  Maximum Concurrent Jobs = 100
+}
+
+#
+# List Directors who are permitted to contact Storage daemon
+#
+Director {
+  Name = @hostname@-dir
+  Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+}
+
+#
+# Devices supported by this Storage daemon
+# To connect, the Director's bacula-dir.conf must have the
+#  same Name and MediaType. 
+#
+
+Device {
+  Name = tape                      # 
+  Media Type = Tape
+  Archive Device = @tape_drive@
+  AutomaticMount = yes;               # when device opened, read it
+  AlwaysOpen = yes;
+  RemovableMedia = yes;
+  @@sbindir@/tape_options
+  Maximum Block Size = 64512
+  Minimum Block Size = 64512
+  Maximum File Size = 5G 
+# MaximumVolumeSize = 400M
+}
+
+# 
+# Send all messages to the Director, 
+# mount messages also are sent to the email address
+#
+Messages {
+  Name = Standard
+  director = @hostname@-dir = all, !terminate
+}
diff --git a/regress/scripts/copy-btape-confs b/regress/scripts/copy-btape-confs
new file mode 100755 (executable)
index 0000000..c3a9d8c
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+/bin/cp -f ${rscripts}/bacula-dir-tape.conf ${scripts}/bacula-dir.conf
+/bin/cp -f ${rscripts}/bacula-sd-btape.conf ${scripts}/bacula-sd.conf
+/bin/cp -f ${rscripts}/test-bacula-fd.conf ${scripts}/bacula-fd.conf
+/bin/cp -f ${rscripts}/test-console.conf ${scripts}/bconsole.conf
+
+${rscripts}/set_tape_options
index 7de1d869217f17a2397b65d4ba063c7e9986e314..3362d6df32067456f1528f3ed738d00c7bc13f3e 100755 (executable)
@@ -32,6 +32,7 @@ sed -f ${out} ${rscripts}/bacula-dir-virtual.conf.in >${rscripts}/bacula-dir-vir
 sed -f ${out} ${rscripts}/win32-bacula-dir-tape.conf.in >${rscripts}/win32-bacula-dir-tape.conf
 sed -f ${out} ${rscripts}/win32-bacula-dir.conf.in >${rscripts}/win32-bacula-dir.conf
 sed -f ${out} ${rscripts}/bacula-sd-tape.conf.in >${rscripts}/bacula-sd-tape.conf
+sed -f ${out} ${rscripts}/bacula-sd-btape.conf.in >${rscripts}/bacula-sd-btape.conf
 sed -f ${out} ${rscripts}/ansi-sd-tape.conf.in >${rscripts}/ansi-sd-tape.conf
 sed -f ${out} ${rscripts}/bacula-sd-fifo.conf.in >${rscripts}/bacula-sd-fifo.conf
 sed -f ${out} ${rscripts}/bacula-sd-2tape.conf.in >${rscripts}/bacula-sd-2tape.conf
index 60affd3f6641fd2853c3e5e5ad6b4cc97955deff..81dd387348b82fb965b0fadb34c5457e9b6c5a0d 100755 (executable)
@@ -5,8 +5,8 @@
 #   do a bscan and restore.
 #   It should require at least 4 different bsrs.
 #
-TestName="bscan-tape"
-JobName=bscantape
+TestName="bscan-fast-tape"
+JobName=bscanfasttape
 . scripts/functions
 
 require_tape_drive
diff --git a/regress/tests/btape-test-tape b/regress/tests/btape-test-tape
new file mode 100755 (executable)
index 0000000..860f013
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Test the test command in btape
+#
+TestName="btape-test-tape"
+JobName=btapetest
+. scripts/functions
+
+require_tape_drive
+
+scripts/copy-btape-confs
+scripts/cleanup-tape
+
+change_jobname $JobName
+start_test
+
+if test "$debug" -eq 1 ; then
+  $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA
+test
+quit
+END_OF_DATA
+else
+  $bin/btape -c bin/bacula-sd.conf tape <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
+test
+quit
+END_OF_DATA
+fi
+
+if [ $? != 0 ] ; then
+   echo " "
+   echo " "
+   echo "  !!!!! btape fill test failed!!! !!!!! "
+   echo "  !!!!! btape fill test failed!!! !!!!! " >>test.out
+   echo " "
+else
+   echo "  ===== btape fill test OK ===== "
+   echo "  ===== btape fill test OK ===== " >>test.out
+#  scripts/cleanup
+fi