From: Kern Sibbald Date: Tue, 1 Sep 2009 14:44:09 +0000 (+0200) Subject: Update tape tests for hardware certification X-Git-Tag: Release-5.0.0~319^2~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=914fc5a9493f0866ec263ddfc52dfb8b69fdafc8;p=bacula%2Fbacula Update tape tests for hardware certification --- diff --git a/regress/full-tape-tests b/regress/full-tape-tests new file mode 100755 index 0000000000..19a896ccc8 --- /dev/null +++ b/regress/full-tape-tests @@ -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 index 0000000000..08ea47ae74 --- /dev/null +++ b/regress/scripts/bacula-sd-btape.conf.in @@ -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 index 0000000000..c3a9d8ca86 --- /dev/null +++ b/regress/scripts/copy-btape-confs @@ -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 diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 7de1d86921..3362d6df32 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -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 diff --git a/regress/tests/bscan-fast-tape b/regress/tests/bscan-fast-tape index 60affd3f66..81dd387348 100755 --- a/regress/tests/bscan-fast-tape +++ b/regress/tests/bscan-fast-tape @@ -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 index 0000000000..860f013d35 --- /dev/null +++ b/regress/tests/btape-test-tape @@ -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 <${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