From: Kern Sibbald Date: Wed, 2 Sep 2009 14:16:33 +0000 (+0200) Subject: Work on certification scripts X-Git-Tag: Release-7.0.0~2635^2~29^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ce5067ef1124c6570ca5cff7f61ebc089e4f94c;p=bacula%2Fbacula Work on certification scripts --- diff --git a/regress/.gitignore b/regress/.gitignore index ae606e1895..875f2092cf 100644 --- a/regress/.gitignore +++ b/regress/.gitignore @@ -1,3 +1,4 @@ +cert.out diff time.out 1 diff --git a/regress/full-tape-tests b/regress/full-tape-tests deleted file mode 100755 index 378b214e6d..0000000000 --- a/regress/full-tape-tests +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# Run full tape tests assumes you have an autochanger -# -. ./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 full tape tests" -echo "Start full tape tests" >>test.out - -# Non-autochanger tests -nice tests/ansi-label-tape -nice tests/backup-bacula-tape -nice tests/bscan-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 - -# Autochanger tests -nice tests/2drive-incremental-changer -nice tests/bad-label-changer -nice tests/incremental-changer -nice tests/two-pool-changer -nice tests/two-volume-changer -nice tests/vol-duration-changer - -# very long -# nice tests/btape-fill-full-tape - -# requires manual intervention -# 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/tests/btape-fill-full-changer b/regress/tests/btape-fill-full-changer index b93505d46b..e4671365cf 100755 --- a/regress/tests/btape-fill-full-changer +++ b/regress/tests/btape-fill-full-changer @@ -23,14 +23,14 @@ sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf if test "$debug" -eq 1 ; then - $bin/btape -c bin/bacula-sd.conf tape <${cwd}/tmp/log1.out 2>&1 + $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/tmp/log1.out 2>&1 fill m diff --git a/regress/tests/btape-fill-full-tape b/regress/tests/btape-fill-full-tape index 87b8032699..bfa0b0d463 100755 --- a/regress/tests/btape-fill-full-tape +++ b/regress/tests/btape-fill-full-tape @@ -22,14 +22,14 @@ sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf if test "$debug" -eq 1 ; then - $bin/btape -c bin/bacula-sd.conf tape <${cwd}/tmp/log1.out 2>&1 + $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/tmp/log1.out 2>&1 fill s diff --git a/regress/tests/btape-test-changer b/regress/tests/btape-test-changer index 1388559ecc..9fa56f4c8c 100755 --- a/regress/tests/btape-test-changer +++ b/regress/tests/btape-test-changer @@ -17,13 +17,14 @@ 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 + $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/bin/bacula-sd.conf if test "$debug" -eq 1 ; then - $bin/btape -c bin/bacula-sd.conf tape <${cwd}/tmp/log2.out 2>&1 + $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/tmp/log2.out 2>&1 test yes quit diff --git a/regress/tests/btape-test-tape b/regress/tests/btape-test-tape index 6afb786ef9..5e91e61f20 100755 --- a/regress/tests/btape-test-tape +++ b/regress/tests/btape-test-tape @@ -15,12 +15,12 @@ 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 + $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/tmp/log1.out 2>&1 test quit END_OF_DATA @@ -42,12 +42,12 @@ cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf if test "$debug" -eq 1 ; then - $bin/btape -c bin/bacula-sd.conf tape <${cwd}/tmp/log2.out 2>&1 + $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/tmp/log2.out 2>&1 test quit END_OF_DATA diff --git a/regress/tests/certify-changer b/regress/tests/certify-changer new file mode 100755 index 0000000000..882ba13d5b --- /dev/null +++ b/regress/tests/certify-changer @@ -0,0 +1,88 @@ +#!/bin/sh +# +# Script to automate hardware certification +# This script assumes that everything is in regress/bin and that +# you have an autochanger +# +# This script was designed for Linux. For other systems, you may +# need to edit it. +# +outf=cert.out +. scripts/functions + + +echo " " >${outf} +echo "=== Start hardware certification tests at `date +%R:%S` ===" >>${outf} +echo " " >>${outf} +uname -a >>${outf} +echo " " >>${outf} +bin/bacula-dir -t -? >>${outf} 2>>${outf} +echo " " >>${outf} +echo "lsscsi:" >>${outf} +lsscsi >>${outf} +echo " " >>${outf} +echo "Changer=${AUTOCHANGER}" >>${outf} +echo "Drive=${TAPE_DRIVE}" >>${outf} +echo " " >>${outf} +echo "tapeinfo: " >>${outf} +tapeinfo -f ${AUTOCHANGER} >>${outf} +echo " " >>${outf} +echo "loaderinfo: " >>${outf} +loaderinfo -f ${AUTOCHANGER} >>${outf} +echo " " >>${outf} +echo "mtx: " >>${outf} +mtx -f ${AUTOCHANGER} status >>${outf} +echo " " >>${outf} +echo "lspci:" >>${outf} +lspci -vv >>${outf} + +# 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 + +# Autochanger tests +REGRESS_DEBUG=1 tests/btape-test-changer >>${outf} +nice tests/2drive-incremental-changer >>${outf} +nice tests/bad-label-changer >>${outf} +nice tests/incremental-changer >>${outf} +nice tests/two-pool-changer >>${outf} +nice tests/two-volume-changer >>${outf} +nice tests/vol-duration-changer >>${outf} + + + +# Non-autochanger tests +REGRESS_DEBUG=1 tests/btape-test-tape >>${outf} +nice tests/ansi-label-tape >>${outf} +nice tests/backup-bacula-tape >>${outf} +nice tests/bscan-tape >>${outf} +nice tests/eighty-simultaneous-jobs-tape >>${outf} +nice tests/eot-fail-tape >>${outf} +nice tests/fixed-block-size-tape >>${outf} +nice tests/four-concurrent-jobs-tape >>${outf} +nice tests/four-jobs-tape >>${outf} +nice tests/incremental-2media-tape >>${outf} +nice tests/incremental-tape >>${outf} +nice tests/memory-bug-tape >>${outf} +nice tests/relabel-tape >>${outf} +nice tests/restore-by-file-tape >>${outf} +nice tests/restore-seek-tape >>${outf} +nice tests/small-file-size-tape >>${outf} +nice tests/truncate-bug-tape >>${outf} +nice tests/verify-vol-tape >>${outf} + +# Autochanger tests +REGRESS_DEBUG=1 tests/btape-test-changer >>${outf} +nice tests/2drive-incremental-changer >>${outf} +nice tests/bad-label-changer >>${outf} +nice tests/incremental-changer >>${outf} +nice tests/two-pool-changer >>${outf} +nice tests/two-volume-changer >>${outf} +nice tests/vol-duration-changer >>${outf} + + +echo "=== End hardware certification tests at `date +%R:%S` ===" >>${outf} diff --git a/regress/tests/full-tape-tests b/regress/tests/full-tape-tests new file mode 100755 index 0000000000..493ce0f780 --- /dev/null +++ b/regress/tests/full-tape-tests @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Run full tape tests assumes you have an autochanger +# +. ./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 full tape tests" +echo "Start full tape tests" >>test.out + +# Non-autochanger tests +nicd tests/btest-test-tape +nice tests/ansi-label-tape +nice tests/backup-bacula-tape +nice tests/bscan-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 + +# Autochanger tests +nice tests/btest-test-changer +nice tests/2drive-incremental-changer +nice tests/bad-label-changer +nice tests/incremental-changer +nice tests/two-pool-changer +nice tests/two-volume-changer +nice tests/vol-duration-changer + +# very long +# nice tests/btape-fill-full-tape +# nice tests/btape-fill-full-changer + +# requires manual intervention +# nice tests/manual-two-vol-tape + +echo "End full non-root tape tests" +echo "End full non-root tape tests" >>test.out