From: Kern Sibbald Date: Tue, 5 Jul 2005 19:13:02 +0000 (+0000) Subject: New tape test X-Git-Tag: Release-7.0.0~8655 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=661b39f1610957a4310f87435cf31482cdcae3e9;p=bacula%2Fbacula New tape test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2176 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/all-non-root-tape-tests b/regress/all-non-root-tape-tests index a3b69bff52..83a6acc2a8 100755 --- a/regress/all-non-root-tape-tests +++ b/regress/all-non-root-tape-tests @@ -14,6 +14,7 @@ tests/fixed-block-size-tape tests/bscan-tape tests/btape-fill-tape tests/truncate-bug-tape +tests/relabel-tape echo " " echo " " echo "Test results" diff --git a/regress/scripts/copy-2tape-confs b/regress/scripts/copy-2tape-confs index dbf9466330..d91c681b5a 100755 --- a/regress/scripts/copy-2tape-confs +++ b/regress/scripts/copy-2tape-confs @@ -3,3 +3,4 @@ /bin/cp -f scripts/bacula-sd-2tape.conf bin/bacula-sd.conf /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf /bin/cp -f scripts/test-console.conf bin/bconsole.conf +touch bin/tape_options diff --git a/regress/scripts/copy-tape-confs b/regress/scripts/copy-tape-confs index 588dddc35b..b9565193ca 100755 --- a/regress/scripts/copy-tape-confs +++ b/regress/scripts/copy-tape-confs @@ -3,3 +3,4 @@ /bin/cp -f scripts/bacula-sd-tape.conf bin/bacula-sd.conf /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf /bin/cp -f scripts/test-console.conf bin/bconsole.conf +touch bin/tape_options diff --git a/regress/scripts/regress-config b/regress/scripts/regress-config index 7ef93d84b0..95c8883892 100755 --- a/regress/scripts/regress-config +++ b/regress/scripts/regress-config @@ -7,6 +7,7 @@ CFLAGS="-g -O2 -Wall" \ ./configure \ --sbindir=$1/bin \ --sysconfdir=$1/bin \ + --mandir=$1/bin \ --with-pid-dir=$1/working \ --with-subsys-dir=$1/working \ --enable-smartalloc \ diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index fd00bf7d31..ad279addc1 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -13,8 +13,8 @@ echo " === Starting Backup Bacula Test at `date +%R:%S` ===" echo " === Starting Backup Bacula Test at `date +%R:%S` ===" >>working/log echo " " -#bin/bacula start 2>&1 >/dev/null -bin/bacula start +bin/bacula start 2>&1 >/dev/null +#bin/bacula start bin/bconsole -c bin/bconsole.conf <&1 >/dev/null #bin/bconsole -c bin/bconsole.conf <>working/log echo " " -bin/bacula start 2>&1 >/dev/null -bin/bconsole -c bin/bconsole.conf <&1 >/dev/null -@output /dev/null +#bin/bacula start 2>&1 >/dev/null +bin/bacula start +#bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +bin/bconsole -c bin/bconsole.conf </tmp/file-list + +echo " " +echo " " +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 <&1 >/dev/null +#bin/bconsole -c bin/bconsole.conf <&1 >/dev/null +@output /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 +@# +@# now unmount the tape and start two restores +@# at the same time +@# +unmount storage=DDS-4 +restore where=${cwd}/tmp/bacula-restores select all done +yes +restore where=${cwd}/tmp/bacula-restores select +unmark * +mark * +done +yes +mount storage=DDS-4 +wait +messages +@output +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 +dstat=$? +if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! relabel-tape Bacula source failed!!! !!!!! " + echo " !!!!! relabel-tape failed!!! !!!!! " >>test.out + echo "diff=$dstat backup=$bstat restore=$rstat" + echo " " +else + echo " ===== relabel-tape Bacula source OK ===== " + echo " ===== relabel-tape OK ===== " >>test.out + scripts/cleanup +fi