From: Kern Sibbald Date: Thu, 27 Mar 2008 10:44:18 +0000 (+0000) Subject: Update to latest trunk code X-Git-Tag: Release-2.2.9-b7~36 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a43c47d5197641e90b174c19aec78d4f6d7c2fc8;p=bacula%2Fbacula Update to latest trunk code git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6696 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/DartConfiguration.tcl.in b/regress/DartConfiguration.tcl.in index 7f58820b14..796188a615 100644 --- a/regress/DartConfiguration.tcl.in +++ b/regress/DartConfiguration.tcl.in @@ -9,4 +9,4 @@ NightlyStartTime: 21:00:00 EST MakeCommand: @regressdir@/scripts/update-ctest ConfigureCommand: true UpdateCommand: svn -TimeOut: 3600 +TimeOut: 1800 diff --git a/regress/DartTestfile.txt.in b/regress/DartTestfile.txt.in index 5ab082752c..00cadf48a5 100644 --- a/regress/DartTestfile.txt.in +++ b/regress/DartTestfile.txt.in @@ -1,69 +1,69 @@ -ADD_TEST(all-non-root:auto-label-test "@regressdir@/tests/auto-label-test") -ADD_TEST(all-non-root:backup-bacula-test "@regressdir@/tests/backup-bacula-test") -ADD_TEST(all-non-root:bextract-test "@regressdir@/tests/bextract-test") -ADD_TEST(all-non-root:big-vol-test "@regressdir@/tests/big-vol-test") -ADD_TEST(all-non-root:bscan-test "@regressdir@/tests/bscan-test") -ADD_TEST(all-non-root:bsr-opt-test "@regressdir@/tests/bsr-opt-test") -ADD_TEST(all-non-root:compressed-test "@regressdir@/tests/compressed-test") -ADD_TEST(all-non-root:compress-encrypt-test "@regressdir@/tests/compress-encrypt-test") -ADD_TEST(all-non-root:concurrent-jobs-test "@regressdir@/tests/concurrent-jobs-test") -ADD_TEST(all-non-root:data-encrypt-test "@regressdir@/tests/data-encrypt-test") -ADD_TEST(all-non-root:encrypt-bug-test "@regressdir@/tests/encrypt-bug-test") -ADD_TEST(all-non-root:fifo-test "@regressdir@/tests/fifo-test") -ADD_TEST(all-non-root:backup-to-null "@regressdir@/tests/backup-to-null") -ADD_TEST(all-non-root:fast-two-pool-test "@regressdir@/tests/fast-two-pool-test") -ADD_TEST(all-non-root:four-concurrent-jobs-test "@regressdir@/tests/four-concurrent-jobs-test") -ADD_TEST(all-non-root:four-jobs-test "@regressdir@/tests/four-jobs-test") -ADD_TEST(all-non-root:hardlink-test "@regressdir@/tests/hardlink-test") -ADD_TEST(all-non-root:incremental-2disk "@regressdir@/tests/incremental-2disk") -ADD_TEST(all-non-root:incremental-2media "@regressdir@/tests/incremental-2media") -ADD_TEST(all-non-root:incremental-test "@regressdir@/tests/incremental-test") -ADD_TEST(all-non-root:maxvol2-test "@regressdir@/tests/maxvol2-test") -ADD_TEST(all-non-root:maxvol-test "@regressdir@/tests/maxvol-test") -ADD_TEST(all-non-root:migration-jobspan-test "@regressdir@/tests/migration-jobspan-test") -ADD_TEST(all-non-root:migration-job-test "@regressdir@/tests/migration-job-test") -ADD_TEST(all-non-root:migration-time-test "@regressdir@/tests/migration-time-test") -ADD_TEST(all-non-root:migration-volume-test "@regressdir@/tests/migration-volume-test") -ADD_TEST(all-non-root:query-test "@regressdir@/tests/query-test") -ADD_TEST(all-non-root:recycle-test "@regressdir@/tests/recycle-test") -ADD_TEST(all-non-root:regexwhere-test "@regressdir@/tests/regexwhere-test") -ADD_TEST(all-non-root:restore2-by-file-test "@regressdir@/tests/restore2-by-file-test") -ADD_TEST(all-non-root:restore-by-file-test "@regressdir@/tests/restore-by-file-test") -ADD_TEST(all-non-root:restore-disk-seek-test "@regressdir@/tests/restore-disk-seek-test") -ADD_TEST(all-non-root:scratch-pool-test "@regressdir@/tests/scratch-pool-test") -ADD_TEST(all-non-root:six-vol-test "@regressdir@/tests/six-vol-test") -ADD_TEST(all-non-root:span-vol-test "@regressdir@/tests/span-vol-test") -ADD_TEST(all-non-root:sparse-compressed-test "@regressdir@/tests/sparse-compressed-test") -ADD_TEST(all-non-root:sparse-test "@regressdir@/tests/sparse-test") -ADD_TEST(all-non-root:three-pool-test "@regressdir@/tests/three-pool-test") -ADD_TEST(all-non-root:tls-test "@regressdir@/tests/tls-test") -ADD_TEST(all-non-root:two-jobs-test "@regressdir@/tests/two-jobs-test") -ADD_TEST(all-non-root:two-pool-test "@regressdir@/tests/two-pool-test") -ADD_TEST(all-non-root:two-vol-test "@regressdir@/tests/two-vol-test") -ADD_TEST(all-non-root:two-volume-test "@regressdir@/tests/two-volume-test") -ADD_TEST(all-non-root:verify-cat-test "@regressdir@/tests/verify-cat-test") -ADD_TEST(all-non-root:verify-vol-test "@regressdir@/tests/verify-vol-test") -ADD_TEST(all-non-root:weird-files2-test "@regressdir@/tests/weird-files2-test") -ADD_TEST(all-non-root:weird-files-test "@regressdir@/tests/weird-files-test") -ADD_TEST(all-non-root:2drive-3pool-test "@regressdir@/tests/2drive-3pool-test") -ADD_TEST(all-non-root:2drive-concurrent-test "@regressdir@/tests/2drive-concurrent-test") -ADD_TEST(all-non-root:2drive-incremental-2disk "@regressdir@/tests/2drive-incremental-2disk") -ADD_TEST(all-non-root-2tape:incremental-2tape "@regressdir@/tests/incremental-2tape") -ADD_TEST(all-non-root-2tape:two-volume-tape "@regressdir@/tests/two-volume-tape") -ADD_TEST(all-non-root-tape:ansi-label-tape "@regressdir@/tests/ansi-label-tape") -ADD_TEST(all-non-root-tape:backup-bacula-tape "@regressdir@/tests/backup-bacula-tape") -ADD_TEST(all-non-root-tape:bscan-tape "@regressdir@/tests/bscan-tape") -ADD_TEST(all-non-root-tape:fixed-block-size-tape "@regressdir@/tests/fixed-block-size-tape") -ADD_TEST(all-non-root-tape:four-concurrent-jobs-tape "@regressdir@/tests/four-concurrent-jobs-tape") -ADD_TEST(all-non-root-tape:four-jobs-tape "@regressdir@/tests/four-jobs-tape") -ADD_TEST(all-non-root-tape:incremental-tape "@regressdir@/tests/incremental-tape") -ADD_TEST(all-non-root-tape:relabel-tape "@regressdir@/tests/relabel-tape") -ADD_TEST(all-non-root-tape:restore-by-file-tape "@regressdir@/tests/restore-by-file-tape") -ADD_TEST(all-non-root-tape:small-file-size-tape "@regressdir@/tests/small-file-size-tape") -ADD_TEST(all-non-root-tape:truncate-bug-tape "@regressdir@/tests/truncate-bug-tape") -ADD_TEST(all-non-root-tape:two-pool-tape "@regressdir@/tests/two-pool-tape") -ADD_TEST(all-non-root-tape:verify-vol-tape "@regressdir@/tests/verify-vol-tape") -ADD_TEST(all-root:dev-test-root "@regressdir@/tests/dev-test-root") -ADD_TEST(all-root:etc-test-root "@regressdir@/tests/etc-test-root") -ADD_TEST(all-root:lib-test-root "@regressdir@/tests/lib-test-root") -ADD_TEST(all-root:usr-tape-root "@regressdir@/tests/usr-tape-root") +ADD_TEST(disk:auto-label-test "@regressdir@/tests/auto-label-test") +ADD_TEST(disk:backup-bacula-test "@regressdir@/tests/backup-bacula-test") +ADD_TEST(disk:bextract-test "@regressdir@/tests/bextract-test") +ADD_TEST(disk:big-vol-test "@regressdir@/tests/big-vol-test") +ADD_TEST(disk:bscan-test "@regressdir@/tests/bscan-test") +ADD_TEST(disk:bsr-opt-test "@regressdir@/tests/bsr-opt-test") +ADD_TEST(disk:compressed-test "@regressdir@/tests/compressed-test") +ADD_TEST(disk:compress-encrypt-test "@regressdir@/tests/compress-encrypt-test") +ADD_TEST(disk:concurrent-jobs-test "@regressdir@/tests/concurrent-jobs-test") +ADD_TEST(disk:data-encrypt-test "@regressdir@/tests/data-encrypt-test") +ADD_TEST(disk:encrypt-bug-test "@regressdir@/tests/encrypt-bug-test") +ADD_TEST(disk:fifo-test "@regressdir@/tests/fifo-test") +ADD_TEST(disk:backup-to-null "@regressdir@/tests/backup-to-null") +ADD_TEST(disk:fast-two-pool-test "@regressdir@/tests/fast-two-pool-test") +ADD_TEST(disk:four-concurrent-jobs-test "@regressdir@/tests/four-concurrent-jobs-test") +ADD_TEST(disk:four-jobs-test "@regressdir@/tests/four-jobs-test") +ADD_TEST(disk:hardlink-test "@regressdir@/tests/hardlink-test") +ADD_TEST(disk:incremental-2disk "@regressdir@/tests/incremental-2disk") +ADD_TEST(disk:incremental-2media "@regressdir@/tests/incremental-2media") +ADD_TEST(disk:incremental-test "@regressdir@/tests/incremental-test") +ADD_TEST(disk:maxvol2-test "@regressdir@/tests/maxvol2-test") +ADD_TEST(disk:maxvol-test "@regressdir@/tests/maxvol-test") +ADD_TEST(disk:migration-jobspan-test "@regressdir@/tests/migration-jobspan-test") +ADD_TEST(disk:migration-job-test "@regressdir@/tests/migration-job-test") +ADD_TEST(disk:migration-time-test "@regressdir@/tests/migration-time-test") +ADD_TEST(disk:migration-volume-test "@regressdir@/tests/migration-volume-test") +ADD_TEST(disk:query-test "@regressdir@/tests/query-test") +ADD_TEST(disk:recycle-test "@regressdir@/tests/recycle-test") +ADD_TEST(disk:regexwhere-test "@regressdir@/tests/regexwhere-test") +ADD_TEST(disk:restore2-by-file-test "@regressdir@/tests/restore2-by-file-test") +ADD_TEST(disk:restore-by-file-test "@regressdir@/tests/restore-by-file-test") +ADD_TEST(disk:restore-disk-seek-test "@regressdir@/tests/restore-disk-seek-test") +ADD_TEST(disk:scratch-pool-test "@regressdir@/tests/scratch-pool-test") +ADD_TEST(disk:six-vol-test "@regressdir@/tests/six-vol-test") +ADD_TEST(disk:span-vol-test "@regressdir@/tests/span-vol-test") +ADD_TEST(disk:sparse-compressed-test "@regressdir@/tests/sparse-compressed-test") +ADD_TEST(disk:sparse-test "@regressdir@/tests/sparse-test") +ADD_TEST(disk:three-pool-test "@regressdir@/tests/three-pool-test") +ADD_TEST(disk:tls-test "@regressdir@/tests/tls-test") +ADD_TEST(disk:two-jobs-test "@regressdir@/tests/two-jobs-test") +ADD_TEST(disk:two-pool-test "@regressdir@/tests/two-pool-test") +ADD_TEST(disk:two-vol-test "@regressdir@/tests/two-vol-test") +ADD_TEST(disk:two-volume-test "@regressdir@/tests/two-volume-test") +ADD_TEST(disk:verify-cat-test "@regressdir@/tests/verify-cat-test") +ADD_TEST(disk:verify-vol-test "@regressdir@/tests/verify-vol-test") +ADD_TEST(disk:weird-files2-test "@regressdir@/tests/weird-files2-test") +ADD_TEST(disk:weird-files-test "@regressdir@/tests/weird-files-test") +ADD_TEST(disk:2drive-3pool-test "@regressdir@/tests/2drive-3pool-test") +ADD_TEST(disk:2drive-concurrent-test "@regressdir@/tests/2drive-concurrent-test") +ADD_TEST(disk:2drive-incremental-2disk "@regressdir@/tests/2drive-incremental-2disk") +ADD_TEST(changer:incremental-2tape "@regressdir@/tests/incremental-2tape") +ADD_TEST(changer:two-volume-tape "@regressdir@/tests/two-volume-tape") +ADD_TEST(tape:ansi-label-tape "@regressdir@/tests/ansi-label-tape") +ADD_TEST(tape:backup-bacula-tape "@regressdir@/tests/backup-bacula-tape") +ADD_TEST(tape:bscan-tape "@regressdir@/tests/bscan-tape") +ADD_TEST(tape:fixed-block-size-tape "@regressdir@/tests/fixed-block-size-tape") +ADD_TEST(tape:four-concurrent-jobs-tape "@regressdir@/tests/four-concurrent-jobs-tape") +ADD_TEST(tape:four-jobs-tape "@regressdir@/tests/four-jobs-tape") +ADD_TEST(tape:incremental-tape "@regressdir@/tests/incremental-tape") +ADD_TEST(tape:relabel-tape "@regressdir@/tests/relabel-tape") +ADD_TEST(tape:restore-by-file-tape "@regressdir@/tests/restore-by-file-tape") +ADD_TEST(tape:small-file-size-tape "@regressdir@/tests/small-file-size-tape") +ADD_TEST(tape:truncate-bug-tape "@regressdir@/tests/truncate-bug-tape") +ADD_TEST(tape:two-pool-tape "@regressdir@/tests/two-pool-tape") +ADD_TEST(tape:verify-vol-tape "@regressdir@/tests/verify-vol-tape") +ADD_TEST(root:dev-test-root "@regressdir@/tests/dev-test-root") +ADD_TEST(root:etc-test-root "@regressdir@/tests/etc-test-root") +ADD_TEST(root:lib-test-root "@regressdir@/tests/lib-test-root") +ADD_TEST(root:usr-tape-root "@regressdir@/tests/usr-tape-root") diff --git a/regress/all-changer-tests b/regress/all-changer-tests new file mode 100755 index 0000000000..88c0a7b9af --- /dev/null +++ b/regress/all-changer-tests @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Run all tape tests +# +echo "Start autochanger tests" +echo "Start autochanger tests" >>test.out + +nice tests/incremental-changer +nice tests/two-pool-changer +nice tests/two-volume-changer +nice tests/vol-duration-changer + +echo "End autochanger tests" +echo "End autochanger tests" >>test.out diff --git a/regress/all-tape-and-disk-tests b/regress/all-tape-and-disk-tests new file mode 100755 index 0000000000..9bc3e7676c --- /dev/null +++ b/regress/all-tape-and-disk-tests @@ -0,0 +1,6 @@ +#!/bin/sh +# +# Run all tests +# +./all-non-root-tests +./all-non-root-tape-tests diff --git a/regress/experimental-all b/regress/experimental-all index 2b326a666e..079d8901e8 100755 --- a/regress/experimental-all +++ b/regress/experimental-all @@ -8,9 +8,9 @@ REGRESS_DEBUG=1 export REGRESS_DEBUG svn update scripts/config_dart -nice ctest -D Experimental -R "all-non-root.*" +nice ctest -D Experimental -R "^(disk|tape|changer):" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" - ctest -D NightlySubmit + ctest -D ExperimentalSubmit fi REGRESS_DEBUG=${save_debug} diff --git a/regress/experimental-disk b/regress/experimental-disk index 4d8ccb3ad7..21852a6ba7 100755 --- a/regress/experimental-disk +++ b/regress/experimental-disk @@ -8,9 +8,9 @@ REGRESS_DEBUG=1 export REGRESS_DEBUG svn update scripts/config_dart -nice ctest -D Experimental -R "all-non-root:" +nice ctest -D Experimental -R "^disk:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" - ctest -D NightlySubmit + ctest -D ExperimentalSubmit fi REGRESS_DEBUG=${save_debug} diff --git a/regress/experimental-disk-and-tape b/regress/experimental-disk-and-tape new file mode 100755 index 0000000000..cbe537639b --- /dev/null +++ b/regress/experimental-disk-and-tape @@ -0,0 +1,16 @@ +#!/bin/sh +# +# test only the disk based regression scripts +# +# Include full output +save_debug=${REGRESS_DEBUG} +REGRESS_DEBUG=1 +export REGRESS_DEBUG +svn update +scripts/config_dart +nice ctest -D Experimental -R "^(disk|tape):" +if [ $? != 0 ] ; then + echo "ctest failed re-running Submit" + ctest -D ExperimentalSubmit +fi +REGRESS_DEBUG=${save_debug} diff --git a/regress/experimental-tape b/regress/experimental-tape index 96742e6367..b847d76f44 100755 --- a/regress/experimental-tape +++ b/regress/experimental-tape @@ -8,9 +8,9 @@ REGRESS_DEBUG=1 export REGRESS_DEBUG svn update scripts/config_dart -nice ctest -D Experimental -R "all-non-root-tape:" +nice ctest -D Experimental -R "^tape:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" - ctest -D NightlySubmit + ctest -D ExperimentalSubmit fi REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-all b/regress/nightly-all index fa76647bd4..ac3896529c 100755 --- a/regress/nightly-all +++ b/regress/nightly-all @@ -8,7 +8,7 @@ REGRESS_DEBUG=1 export REGRESS_DEBUG svn update scripts/config_dart -nice ctest -D Nightly -R "all-non-root.*" +nice ctest -D Nightly -R "^(disk|tape|changer):" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D NightlySubmit diff --git a/regress/nightly-disk b/regress/nightly-disk index 5e7161fbaa..a353630cb5 100755 --- a/regress/nightly-disk +++ b/regress/nightly-disk @@ -8,7 +8,7 @@ REGRESS_DEBUG=1 export REGRESS_DEBUG svn update scripts/config_dart -nice ctest -D Nightly -R "all-non-root:" +nice ctest -D Nightly -R "^disk:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D NightlySubmit diff --git a/regress/nightly-disk-and-tape b/regress/nightly-disk-and-tape new file mode 100755 index 0000000000..cbe537639b --- /dev/null +++ b/regress/nightly-disk-and-tape @@ -0,0 +1,16 @@ +#!/bin/sh +# +# test only the disk based regression scripts +# +# Include full output +save_debug=${REGRESS_DEBUG} +REGRESS_DEBUG=1 +export REGRESS_DEBUG +svn update +scripts/config_dart +nice ctest -D Experimental -R "^(disk|tape):" +if [ $? != 0 ] ; then + echo "ctest failed re-running Submit" + ctest -D ExperimentalSubmit +fi +REGRESS_DEBUG=${save_debug} diff --git a/regress/nightly-tape b/regress/nightly-tape index 4ca2f5f16a..a4ccf26f2e 100755 --- a/regress/nightly-tape +++ b/regress/nightly-tape @@ -8,7 +8,7 @@ REGRESS_DEBUG=1 export REGRESS_DEBUG svn update scripts/config_dart -nice ctest -D Nightly -R "all-non-root-tape:" +nice ctest -D Nightly -R "^tape:" if [ $? != 0 ] ; then echo "ctest failed re-running Submit" ctest -D NightlySubmit diff --git a/regress/prototype.conf b/regress/prototype.conf index c5381a28d1..1fb134b7cd 100644 --- a/regress/prototype.conf +++ b/regress/prototype.conf @@ -9,9 +9,26 @@ SMTP_HOST="localhost" SQLITE3_DIR=${HOME}/bacula/depkgs/sqlite3 SQLITE_DIR=${HOME}/bacula/depkgs/sqlite +# set to /dev/null if you do not have a tape drive +# Note this is used for both the tape tests and the +# autochanger TAPE_DRIVE="/dev/nst0" + # if you don't have an autochanger set AUTOCHANGER to /dev/null AUTOCHANGER="/dev/sg0" + +# drive index of first autochanger drive +DRIVE1=0 + +# drive index of second autochanger drive or "none" (in lowercase) +DRIVE2="none" + +# what slot to use for first tape +SLOT1=1 + +# what slot to use for the second tape +SLOT2=2 + # For two drive tests -- set to /dev/null if you do not have it TAPE_DRIVE1="/dev/null" @@ -56,4 +73,3 @@ BASEPORT=8101 # test machines, add some indication of the machine. # SITE_NAME=-bacula-${HOST} - diff --git a/regress/scripts/bacula-dir-2d.conf.in b/regress/scripts/bacula-dir-2d.conf.in index 41f3b61443..67c0b0f97e 100644 --- a/regress/scripts/bacula-dir-2d.conf.in +++ b/regress/scripts/bacula-dir-2d.conf.in @@ -121,9 +121,9 @@ Catalog { Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: %t %e of %c %l\" %r" - operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r" +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -138,7 +138,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/bacula-dir-fifo.conf.in b/regress/scripts/bacula-dir-fifo.conf.in index fdfd628a27..4e51470eb8 100644 --- a/regress/scripts/bacula-dir-fifo.conf.in +++ b/regress/scripts/bacula-dir-fifo.conf.in @@ -170,8 +170,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula Regression Job %j\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula Regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -186,7 +186,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/bacula-dir-migration.conf.in b/regress/scripts/bacula-dir-migration.conf.in index 9202de981f..ab428219a7 100644 --- a/regress/scripts/bacula-dir-migration.conf.in +++ b/regress/scripts/bacula-dir-migration.conf.in @@ -183,8 +183,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -199,7 +199,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/bacula-dir-tape.conf.in b/regress/scripts/bacula-dir-tape.conf.in index de1c3f2c1f..35846294a5 100644 --- a/regress/scripts/bacula-dir-tape.conf.in +++ b/regress/scripts/bacula-dir-tape.conf.in @@ -183,8 +183,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -199,7 +199,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/bacula-dir-win32-tape.conf.in b/regress/scripts/bacula-dir-win32-tape.conf.in index c91eff7f69..551ededd9e 100644 --- a/regress/scripts/bacula-dir-win32-tape.conf.in +++ b/regress/scripts/bacula-dir-win32-tape.conf.in @@ -112,8 +112,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression Job %j\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -128,7 +128,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/bacula-dir.conf.testrunscript.in b/regress/scripts/bacula-dir.conf.testrunscript.in index abd107053c..d569dd4b62 100644 --- a/regress/scripts/bacula-dir.conf.testrunscript.in +++ b/regress/scripts/bacula-dir.conf.testrunscript.in @@ -87,11 +87,12 @@ Job { JobDefs = DefaultJob RunScript { Command = "/bin/false RUN_FD_FAILED1" + Command = "/bin/false RUN_FD_FAILED2" failjobonerror = no RunsWhen = Before } RunScript { - Command = "/bin/false RUN_FD_FAILED2" + Command = "/bin/false RUN_FD_FAILED3" failjobonerror = yes RunsWhen = Before } diff --git a/regress/scripts/cleanup-tape.in b/regress/scripts/cleanup-tape.in index 98ed537766..e5ebe56344 100755 --- a/regress/scripts/cleanup-tape.in +++ b/regress/scripts/cleanup-tape.in @@ -2,7 +2,15 @@ # # Cleanup left over files -- both before and after test run # +. ./config + scripts/cleanup +if test "x@autochanger@" != "x/dev/null" ; then + a=`bin/mtx-changer @autochanger@ loaded $SLOT1 @tape_drive@ 0` + if test $a = 0 ; then + bin/mtx-changer @autochanger@ load $SLOT1 @tape_drive@ 0 + fi +fi mt -f @tape_drive@ rewind mt -f @tape_drive@ weof diff --git a/regress/scripts/crypto-bacula-fd.conf.in b/regress/scripts/crypto-bacula-fd.conf.in index 540bc107bf..607c65d8f0 100644 --- a/regress/scripts/crypto-bacula-fd.conf.in +++ b/regress/scripts/crypto-bacula-fd.conf.in @@ -33,5 +33,5 @@ FileDaemon { # this is me # Send all messages except skipped files back to Director Messages { Name = Standard - director = @hostname@-dir = all, !terminate + director = @hostname@-dir = all, !terminate, !restored } diff --git a/regress/scripts/functions b/regress/scripts/functions index 798bc0a786..6518f0f034 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -25,6 +25,38 @@ if [ $MUID != 0 ] ; then fi } +require_tape_drive() +{ +if test x${TAPE_DRIVE} = x/dev/null ; then + echo "$TestName test needs a tape drive, but has none." + exit 1 +fi +} + +require_second_drive() +{ +if test x${TAPE_DRIVE1} = x/dev/null ; then + echo "$JobName needs second drive, but has none." + exit 1 +fi +} + +require_autochanger() +{ +if test x${AUTOCHANGER} = x/dev/null ; then + echo "$TestName needs an autochanger, but has none." + exit 1 +fi +} + + +skip_if_no_autochanger() +{ +if test x${AUTOCHANGER} = x/dev/null ; then + echo "$TestName test skipped. No autochanger." + exit +fi +} set_debug() { @@ -36,6 +68,13 @@ set_debug() fi } +print_debug() +{ + if test "$debug" -eq 1 ; then + echo $* + fi +} + run_bacula() { debug_wait diff --git a/regress/scripts/multi-client-bacula-dir.conf.in b/regress/scripts/multi-client-bacula-dir.conf.in index a8a2efec2e..9a2e8bc6f9 100644 --- a/regress/scripts/multi-client-bacula-dir.conf.in +++ b/regress/scripts/multi-client-bacula-dir.conf.in @@ -333,8 +333,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all - operator = @job_email@ = mount +# MailOnError = @job_email@ = all +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from diff --git a/regress/scripts/new-test-bacula-dir.conf.in b/regress/scripts/new-test-bacula-dir.conf.in index f10344215f..ab0fcfd646 100644 --- a/regress/scripts/new-test-bacula-dir.conf.in +++ b/regress/scripts/new-test-bacula-dir.conf.in @@ -332,8 +332,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all - operator = @job_email@ = mount +# MailOnError = @job_email@ = all +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from diff --git a/regress/scripts/test-bacula-dir.conf.in b/regress/scripts/test-bacula-dir.conf.in index 6a6defeca2..4e6edd0850 100644 --- a/regress/scripts/test-bacula-dir.conf.in +++ b/regress/scripts/test-bacula-dir.conf.in @@ -269,8 +269,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all - operator = @job_email@ = mount +# MailOnError = @job_email@ = all +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -297,7 +297,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/test-bacula-fd.conf.in b/regress/scripts/test-bacula-fd.conf.in index 47c44998da..6c3c439eef 100644 --- a/regress/scripts/test-bacula-fd.conf.in +++ b/regress/scripts/test-bacula-fd.conf.in @@ -29,5 +29,5 @@ FileDaemon { # this is me # Send all messages except skipped files back to Director Messages { Name = Standard - director = @hostname@-dir = all, !terminate + director = @hostname@-dir = all, !terminate, !restored } diff --git a/regress/scripts/testa-bacula-dir.conf.in b/regress/scripts/testa-bacula-dir.conf.in index ea19edc90d..3a752e7d09 100644 --- a/regress/scripts/testa-bacula-dir.conf.in +++ b/regress/scripts/testa-bacula-dir.conf.in @@ -111,8 +111,8 @@ Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate append = "@working_dir@/log" = all, !skipped diff --git a/regress/scripts/testb-bacula-dir.conf.in b/regress/scripts/testb-bacula-dir.conf.in index fd046d6922..7ad6c75c40 100644 --- a/regress/scripts/testb-bacula-dir.conf.in +++ b/regress/scripts/testb-bacula-dir.conf.in @@ -114,9 +114,9 @@ Catalog { Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" - operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate append = "@working_dir@/log" = all, !skipped diff --git a/regress/scripts/tls-auth-bacula-dir.conf.in b/regress/scripts/tls-auth-bacula-dir.conf.in index ac78e2b444..98ea4c1e7e 100644 --- a/regress/scripts/tls-auth-bacula-dir.conf.in +++ b/regress/scripts/tls-auth-bacula-dir.conf.in @@ -345,10 +345,10 @@ Catalog { # and to the console Messages { Name = Standard - mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" - operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all - operator = @job_email@ = mount +# mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" +# operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" +# MailOnError = @job_email@ = all +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -360,7 +360,7 @@ Messages { Messages { Name = NoEmail - mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" +# mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" console = all, !skipped, !terminate # # WARNING! the following will create a file that you must cycle from diff --git a/regress/scripts/tls-auth-bacula-fd.conf.in b/regress/scripts/tls-auth-bacula-fd.conf.in index 225064156c..582044e5a1 100644 --- a/regress/scripts/tls-auth-bacula-fd.conf.in +++ b/regress/scripts/tls-auth-bacula-fd.conf.in @@ -39,5 +39,5 @@ FileDaemon { # this is me # Send all messages except skipped files back to Director Messages { Name = Standard - director = @hostname@-dir = all, !terminate + director = @hostname@-dir = all, !terminate, !restored } diff --git a/regress/scripts/tls-bacula-dir.conf.in b/regress/scripts/tls-bacula-dir.conf.in index 451f8166e2..57140c90d2 100644 --- a/regress/scripts/tls-bacula-dir.conf.in +++ b/regress/scripts/tls-bacula-dir.conf.in @@ -343,9 +343,9 @@ Catalog { Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" - operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all - operator = @job_email@ = mount +# operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" +# MailOnError = @job_email@ = all +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from diff --git a/regress/scripts/tls-bacula-fd.conf.in b/regress/scripts/tls-bacula-fd.conf.in index c489a0e536..2f3e53f50e 100644 --- a/regress/scripts/tls-bacula-fd.conf.in +++ b/regress/scripts/tls-bacula-fd.conf.in @@ -37,5 +37,5 @@ FileDaemon { # this is me # Send all messages except skipped files back to Director Messages { Name = Standard - director = @hostname@-dir = all, !terminate + director = @hostname@-dir = all, !terminate, !restored } diff --git a/regress/scripts/win32-bacula-dir-tape.conf.in b/regress/scripts/win32-bacula-dir-tape.conf.in index f14bb8e18e..cce636551a 100644 --- a/regress/scripts/win32-bacula-dir-tape.conf.in +++ b/regress/scripts/win32-bacula-dir-tape.conf.in @@ -126,9 +126,9 @@ Catalog { Messages { Name = Standard mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" - operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" - MailOnError = @job_email@ = all, !terminate - operator = @job_email@ = mount +# operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" +# MailOnError = @job_email@ = all, !terminate +# operator = @job_email@ = mount console = all, !skipped, !terminate, !restored # # WARNING! the following will create a file that you must cycle from @@ -143,7 +143,7 @@ Messages { Messages { Name = Daemon mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula regression\) %r\" -s \"Regression daemon message\" %r" - mail = @job_email@ = all, !skipped +# mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped } diff --git a/regress/scripts/win32-bacula-fd.conf.in b/regress/scripts/win32-bacula-fd.conf.in index 115b83d0e7..2d834e0f91 100644 --- a/regress/scripts/win32-bacula-fd.conf.in +++ b/regress/scripts/win32-bacula-fd.conf.in @@ -29,5 +29,5 @@ FileDaemon { # this is me # Send all messages except skipped files back to Director Messages { Name = Standard - director = rufus-dir = all, !terminate + director = rufus-dir = all, !terminate, !restored } diff --git a/regress/tests/2drive-incremental-2disk b/regress/tests/2drive-incremental-2disk index 353ff267fb..97aab7adf1 100755 --- a/regress/tests/2drive-incremental-2disk +++ b/regress/tests/2drive-incremental-2disk @@ -51,8 +51,11 @@ run job=NightlySave yes run job=NightlySave yes run job=NightlySave yes run job=NightlySave yes -@sleep 3 +@sleep 5 status storage=DDS-4 +list volumes +list jobs +messages wait list volumes list jobs @@ -72,6 +75,7 @@ messages @# Force Incremental on the second Volume update volume=TestVolume001 VolStatus=Used status storage=DDS-4 +list volumes @#setdebug level=120 storage=DDS-4 run level=Incremental job=NightlySave yes wait diff --git a/regress/tests/ansi-label-tape b/regress/tests/ansi-label-tape index 17d83d8ccd..4bd763bf87 100755 --- a/regress/tests/ansi-label-tape +++ b/regress/tests/ansi-label-tape @@ -12,6 +12,8 @@ TestName="ansi-label-tape" JobName=backuptape . scripts/functions +require_tape_drive + scripts/copy-tape-confs /bin/cp -f scripts/ansi-sd-tape.conf bin/bacula-sd.conf scripts/cleanup-tape diff --git a/regress/tests/auto-label-test b/regress/tests/auto-label-test index 0b85a90fa0..b77ee6423c 100755 --- a/regress/tests/auto-label-test +++ b/regress/tests/auto-label-test @@ -30,11 +30,18 @@ run job=$JobName storage=File yes list pools list volumes wait +sql +SELECT StartTime, JobFiles, JobId, Level, count(*) AS nb_jobmedia +FROM JobMedia join Job using (JobId) join Client using (ClientId) +where Client.Name = 'localhost-fd' group by JobId, Level, StartTime, +JobFiles order by JobId desc ; + messages @# @# now do a restore @# @$out ${cwd}/tmp/log2.out +@#setdebug level=400 storage=File restore where=${cwd}/tmp/bacula-restores select storage=File unmark * mark * diff --git a/regress/tests/backup-bacula-tape b/regress/tests/backup-bacula-tape index 4c984d57f8..2e0fb1cbc7 100755 --- a/regress/tests/backup-bacula-tape +++ b/regress/tests/backup-bacula-tape @@ -10,6 +10,8 @@ TestName="backup-bacula-tape" JobName=backuptape . scripts/functions +require_tape_drive + scripts/copy-tape-confs scripts/cleanup-tape diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index 0815c38316..cc0fa32c2a 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -17,8 +17,8 @@ cat <${cwd}/tmp/bconcmds @output /dev/null messages @$out ${cwd}/tmp/log1.out +setdebug level=100 storage=File label volume=TestVolume001 storage=File pool=Default -@#setdebug level=100 storage=File run job=$JobName yes status storage=File status storage=File diff --git a/regress/tests/backup-win32-tape b/regress/tests/backup-win32-tape index 2c67ddce85..36c556caa8 100755 --- a/regress/tests/backup-win32-tape +++ b/regress/tests/backup-win32-tape @@ -8,6 +8,8 @@ TestName="backup-win32-tape" JobName=backupwintape . scripts/functions +require_tape_drive_drive + scripts/cleanup-tape scripts/copy-win32-confs diff --git a/regress/tests/bextract-test b/regress/tests/bextract-test index 80085b3265..0446bf7a7f 100755 --- a/regress/tests/bextract-test +++ b/regress/tests/bextract-test @@ -23,7 +23,7 @@ label storage=File1 volume=TestVolume001 label storage=File1 volume=TestVolume002 update Volume=TestVolume001 MaxVolBytes=3000000 @#setdebug level=400 dir -@#setdebug level=400 storage=File1 +setdebug level=400 storage=File1 run job=$JobName storage=File1 yes wait messages diff --git a/regress/tests/bscan-fast-tape b/regress/tests/bscan-fast-tape index 7e2b38e329..110c007f7d 100755 --- a/regress/tests/bscan-fast-tape +++ b/regress/tests/bscan-fast-tape @@ -9,6 +9,8 @@ TestName="bscan-tape" JobName=bscantape . scripts/functions +require_tape_drive + copy_tape_confs echo "${cwd}/build" >${cwd}/tmp/file-list diff --git a/regress/tests/bscan-tape b/regress/tests/bscan-tape index cfca352c91..71341697e4 100755 --- a/regress/tests/bscan-tape +++ b/regress/tests/bscan-tape @@ -9,6 +9,8 @@ TestName="bscan-tape" JobName=bscantape . scripts/functions +require_tape_drive + copy_tape_confs echo "${cwd}/build" >tmp/file-list @@ -23,14 +25,11 @@ cat <tmp/bconcmds @output /dev/null estimate job=$JobName listing estimate job=$JobName listing -estimate job=$JobName listing messages @$out tmp/log1.out setdebug level=2 storage=DDS-4 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default -run job=$JobName yes -wait -run job=$JobName level=Full yes +run job=$JobName level=Full yes wait run job=$JobName level=Full yes wait @@ -59,7 +58,7 @@ messages quit END_OF_DATA -run_bacula +run_bconsole scripts/check_for_zombie_jobs storage=DDS-4 echo "Backup 2 done" @@ -68,17 +67,8 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a third job # -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA -run_bacula +run_bconsole scripts/check_for_zombie_jobs storage=DDS-4 echo "Backup 3 done" @@ -88,19 +78,10 @@ touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o # # run a fourth job # -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA - -run_bacula +run_bconsole scripts/check_for_zombie_jobs storage=DDS-4 + stop_bacula echo "Backup 4 done" diff --git a/regress/tests/btape-fill-full-tape b/regress/tests/btape-fill-full-tape index 7c32d04cda..dc3fcec98c 100755 --- a/regress/tests/btape-fill-full-tape +++ b/regress/tests/btape-fill-full-tape @@ -6,6 +6,8 @@ TestName="btape-fill-full-tape" JobName=AutoLabel . scripts/functions +require_tape_drive + scripts/copy-tape-confs scripts/cleanup-tape diff --git a/regress/tests/differential-test b/regress/tests/differential-test index 7ef57dc220..4d95637a58 100755 --- a/regress/tests/differential-test +++ b/regress/tests/differential-test @@ -24,6 +24,7 @@ cat <${cwd}/tmp/bconcmds @$out /dev/null messages @$out ${cwd}/tmp/log1.out +setdebug level=100 storage=File label storage=File volume=TestVolume002 label storage=File volume=TestVolume001 run job=$JobName yes diff --git a/regress/tests/eighty-simultaneous-jobs-tape b/regress/tests/eighty-simultaneous-jobs-tape index 3fe631fceb..4b79c09143 100755 --- a/regress/tests/eighty-simultaneous-jobs-tape +++ b/regress/tests/eighty-simultaneous-jobs-tape @@ -6,6 +6,8 @@ TestName="eighty-simultaneous-jobs-tape" JobName=EightySimultaneousJobs . scripts/functions +require_tape_drive + scripts/cleanup-tape scripts/copy-tape-confs diff --git a/regress/tests/eot-fail-tape b/regress/tests/eot-fail-tape index 33bf4035b1..4113ccf3f2 100755 --- a/regress/tests/eot-fail-tape +++ b/regress/tests/eot-fail-tape @@ -1,12 +1,12 @@ #!/bin/sh # -# Run a simple backup of the Bacula build directory -# to two tapes where the maximum tape file size is set to 1M # TestName="eot-fail-tape" JobName=eotfailtape . scripts/functions +require_tape_drive + scripts/cleanup-tape scripts/copy-tape-confs @@ -23,16 +23,16 @@ start_test cat <${cwd}/tmp/bconcmds @output /dev/null messages -@$out ${cwd}/tmp/log1.out +@$out tmp/log1.out label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default -update Volume=TestVolume001 MaxVolBytes=3000000 +#update Volume=TestVolume001 MaxVolBytes=3000000 run job=$JobName yes wait messages @# @# now do a restore @# -@$out ${cwd}/tmp/log2.out +@$out tmp/log2.out restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done yes wait diff --git a/regress/tests/fixed-block-size-tape b/regress/tests/fixed-block-size-tape index 6799b543b2..7ba4d453b8 100755 --- a/regress/tests/fixed-block-size-tape +++ b/regress/tests/fixed-block-size-tape @@ -8,6 +8,8 @@ TestName="fixed-block-size-tape" JobName=fixedblocksize . scripts/functions +require_tape_drive + copy_tape_confs echo "${cwd}/build" >${cwd}/tmp/file-list diff --git a/regress/tests/four-concurrent-jobs-tape b/regress/tests/four-concurrent-jobs-tape index 9461a217b9..d37acd6897 100755 --- a/regress/tests/four-concurrent-jobs-tape +++ b/regress/tests/four-concurrent-jobs-tape @@ -6,6 +6,8 @@ TestName="four-concurrent-jobs-tape" JobName=FourConcurrentJobs . scripts/functions +require_tape_drive + scripts/cleanup-tape scripts/copy-tape-confs diff --git a/regress/tests/four-concurrent-jobs-test b/regress/tests/four-concurrent-jobs-test index 5190dfce6d..80a3fcc691 100755 --- a/regress/tests/four-concurrent-jobs-test +++ b/regress/tests/four-concurrent-jobs-test @@ -77,6 +77,7 @@ unmark * mark * done yes +run job=$JobName level=Full Storage=File1 yes wait reload reload diff --git a/regress/tests/four-jobs-tape b/regress/tests/four-jobs-tape index 6d07d53171..ff579c09a0 100755 --- a/regress/tests/four-jobs-tape +++ b/regress/tests/four-jobs-tape @@ -8,6 +8,8 @@ TestName="four-jobs-tape" JobName=fourjobstape . scripts/functions +require_tape_drive + scripts/cleanup-tape scripts/copy-tape-confs echo "${cwd}/build" >${cwd}/tmp/file-list @@ -18,8 +20,8 @@ start_test cat <${cwd}/tmp/bconcmds @$out /dev/null estimate job=$JobName listing -estimate job=$JobName listing -estimate job=$JobName listing +estimate job=$JobName +estimate job=$JobName messages @$out ${cwd}/tmp/log1.out label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default diff --git a/regress/tests/four-jobs-test b/regress/tests/four-jobs-test index 9af909d8b8..b13a3ddd93 100755 --- a/regress/tests/four-jobs-test +++ b/regress/tests/four-jobs-test @@ -18,8 +18,8 @@ start_test cat <${cwd}/tmp/bconcmds @output /dev/null estimate job=$JobName listing -estimate job=$JobName listing -estimate job=$JobName listing +estimate job=$JobName +estimate job=$JobName messages @$out ${cwd}/tmp/log1.out label storage=File volume=TestVolume001 diff --git a/regress/tests/incremental-2media-tape b/regress/tests/incremental-2media-tape index 65014880f8..054ac7f771 100755 --- a/regress/tests/incremental-2media-tape +++ b/regress/tests/incremental-2media-tape @@ -10,6 +10,8 @@ TestName="incremental-2media-tape" JobName=Inc2mediaTape . scripts/functions +require_tape_drive +require_second_drive scripts/cleanup # Get conf files @@ -39,7 +41,7 @@ cat <${cwd}/tmp/bconcmds @$out /dev/null messages @$out ${cwd}/tmp/log1.out -label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0 +label storage=DDS-4 volume=TestVolume001 slot=$SLOT1 Pool=Default drive=$DRIVE1 label storage=DLT80 volume=TestVolume002 Pool=Default run job=$JobName yes wait diff --git a/regress/tests/incremental-tape b/regress/tests/incremental-tape index ad86d6834d..38e8347b68 100755 --- a/regress/tests/incremental-tape +++ b/regress/tests/incremental-tape @@ -7,6 +7,8 @@ TestName="incremental-tape" JobName=IncTape . scripts/functions +require_tape_drive + scripts/copy-tape-confs scripts/cleanup-tape diff --git a/regress/tests/maxvol2-test b/regress/tests/maxvol2-test index f99b1603bd..607d110168 100755 --- a/regress/tests/maxvol2-test +++ b/regress/tests/maxvol2-test @@ -30,7 +30,7 @@ update Volume=TestVolume002 maxvoljobs=1 update Volume=TestVolume003 volretention=10s update Volume=TestVolume003 maxvoljobs=1 list volumes -setdebug level=50 storage=File1 +setdebug level=150 storage=File1 run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes diff --git a/regress/tests/memory-bug-tape b/regress/tests/memory-bug-tape index 6ae57fed6e..15f5c89158 100755 --- a/regress/tests/memory-bug-tape +++ b/regress/tests/memory-bug-tape @@ -9,6 +9,8 @@ TestName="four-concurrent-jobs-tape" JobName=FourConcurrentJobs . scripts/functions +require_tape_drive + scripts/cleanup-tape scripts/copy-tape-confs diff --git a/regress/tests/migration-job-test b/regress/tests/migration-job-test index 69cbe43dc3..ac0ea2b979 100755 --- a/regress/tests/migration-job-test +++ b/regress/tests/migration-job-test @@ -29,7 +29,7 @@ cat <${cwd}/tmp/bconcmds @output messages @$out ${cwd}/tmp/log1.out -@#setdebug level=100 storage=File +setdebug level=100 storage=File label storage=File volume=FileVolume001 Pool=Default label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0 @@ -69,6 +69,7 @@ unmark * mark * done yes +list volumes wait messages @output diff --git a/regress/tests/recycle-test b/regress/tests/recycle-test index 8bf68d612e..712b1d32f9 100755 --- a/regress/tests/recycle-test +++ b/regress/tests/recycle-test @@ -37,27 +37,28 @@ run job=$JobName storage=File1 level=full yes wait messages list volumes +@sleep 11 run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes wait messages list volumes -@sleep 10 +@sleep 11 run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes wait messages list volumes -@sleep 10 +@sleep 11 run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes wait messages list volumes -@sleep 10 +@sleep 11 run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes run job=$JobName storage=File1 level=full yes diff --git a/regress/tests/regexwhere-test b/regress/tests/regexwhere-test index 692bd60b36..eaaa3fe6fa 100755 --- a/regress/tests/regexwhere-test +++ b/regress/tests/regexwhere-test @@ -13,6 +13,16 @@ scripts/copy-test-confs /bin/cp -f scripts/bacula-dir.conf.regexwhere bin/bacula-dir.conf +# +# Remove the !restored from the messages resource because +# this test needs the restored listing to verify the +# restore results +# +outf="${cwd}/tmp/sed_tmp" +echo "s%, \!restored%%g" >${outf} +cp ${cwd}/bin/bacula-fd.conf ${cwd}/tmp/1 +sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-fd.conf + echo "${cwd}/build/po" >tmp/file-list start_test diff --git a/regress/tests/relabel-tape b/regress/tests/relabel-tape index 15b22c66a1..d929db3358 100755 --- a/regress/tests/relabel-tape +++ b/regress/tests/relabel-tape @@ -4,12 +4,15 @@ # then backup four times, each with incremental then finally restore. # It should require at least 4 different bsrs. # -TestName="relabel-tape" +TestName="relabel-1t1d-tape" JobName=Relabeltape . scripts/functions +require_tape_drive + scripts/cleanup-tape scripts/copy-tape-confs + echo "${cwd}/build" >${cwd}/tmp/file-list change_jobname $JobName diff --git a/regress/tests/restore-by-file-tape b/regress/tests/restore-by-file-tape index 2eb84d8150..fefc274ac8 100755 --- a/regress/tests/restore-by-file-tape +++ b/regress/tests/restore-by-file-tape @@ -9,7 +9,11 @@ TestName="restore-by-file-tape" JobName=restorebyfile . scripts/functions -copy_tape_confs + +require_tape_drive + +scripts/copy-tape-confs +scripts/cleanup-tape echo "${cwd}/build" >${cwd}/tmp/file-list sed s%\^%${cwd}% ${cwd}/scripts/flist | sort | uniq >${cwd}/tmp/restore2-list diff --git a/regress/tests/restore-seek-tape b/regress/tests/restore-seek-tape index aa394beb60..041c278deb 100755 --- a/regress/tests/restore-seek-tape +++ b/regress/tests/restore-seek-tape @@ -10,7 +10,11 @@ TestName="restore-seek-tape" JobName=restore-tape-seek . scripts/functions -copy_tape_confs +require_tape_drive + +scripts/copy-tape-confs +scripts/cleanup-tape + echo "${cwd}/tmp/build" >${cwd}/tmp/file-list rm -rf ${cwd}/tmp/build mkdir ${cwd}/tmp/build diff --git a/regress/tests/runscript-test b/regress/tests/runscript-test index 571adf2810..3f15cb6444 100755 --- a/regress/tests/runscript-test +++ b/regress/tests/runscript-test @@ -63,13 +63,13 @@ export dstat export bstat export rstat -grep 'BeforeJob: run command "/bin/echo RunBeforeJob"' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 +grep 'shell command: run BeforeJob "/bin/echo RunBeforeJob"' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 a=$? grep 'ClientRunBeforeJob: ClientRunBeforeJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 b=$? -grep 'ClientAfterJob: run command "/bin/echo ClientRunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 +grep 'shell command: run ClientAfterJob "/bin/echo ClientRunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 c=$? -grep 'AfterJob: run command "/bin/echo RunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 +grep 'shell command: run AfterJob "/bin/echo RunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null 2>&1 d=$? if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 ] then @@ -79,7 +79,7 @@ else rstat=1 fi -grep 'BeforeJob: run command "/bin/false RUN_DIR_FAILED"' ${cwd}/tmp/RUN_DIR_FAILED.log >/dev/null 2>&1 +grep 'shell command: run BeforeJob "/bin/false RUN_DIR_FAILED"' ${cwd}/tmp/RUN_DIR_FAILED.log >/dev/null 2>&1 a=$? grep 'AfterJob: RunAfterFailedJob' ${cwd}/tmp/RUN_DIR_FAILED.log >/dev/null 2>&1 b=$? @@ -91,32 +91,33 @@ else rstat=1 fi -grep 'ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 a=$? -grep 'ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 b=$? -grep 'AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_FAILED3"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 c=$? -#grep 'touching' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 -test -f ${cwd}/tmp/RUN_FD_FAILED +grep 'shell command: run AfterJob "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 d=$? -grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 +grep 'touching' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 e=$? -if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ] +grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED.log >/dev/null 2>&1 +f=$? +if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 -a $f = 0 ] then [ "$debug" = 1 ] && echo RUN_FD_FAILED ok else - echo "RUN_FD_FAILED in error" + echo "RUN_FD_FAILED in error a=$a b=$b c=$c d=$d e=$e f=$f" rstat=1 fi -grep 'ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_FAILED1"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 a=$? -grep 'ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_FAILED2"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 b=$? -grep 'ClientBeforeJob: run command "/bin/false RUN_FD_FAILED3"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_FAILED3"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 c=$? -grep 'AfterJob: run command "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 +grep 'shell command: run AfterJob "/bin/echo RunAfterFailedJob"' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 d=$? grep '*** Backup Error ***' ${cwd}/tmp/RUN_FD_FAILED2.log >/dev/null 2>&1 e=$? @@ -124,11 +125,11 @@ if [ $a = 0 -a $b != 0 -a $c = 0 -a $d = 0 -a $e = 0 ] then [ "$debug" = 1 ] && echo RUN_FD_FAILED ok else - echo "RUN_FD_FAILED2 in error" + echo "RUN_FD_FAILED2 in error a=$a b=$b c=$d d=$d e=$e" rstat=1 fi -grep 'ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"' ${cwd}/tmp/RUN_FD_WARNING.log >/dev/null 2>&1 +grep 'shell command: run ClientBeforeJob "/bin/false RUN_FD_WARNING"' ${cwd}/tmp/RUN_FD_WARNING.log >/dev/null 2>&1 a=$? grep 'RunAfterFailedJob' ${cwd}/tmp/RUN_FD_WARNING.log >/dev/null 2>&1 b=$? diff --git a/regress/tests/small-file-size-tape b/regress/tests/small-file-size-tape index d6e8163a9a..7000b0de9f 100755 --- a/regress/tests/small-file-size-tape +++ b/regress/tests/small-file-size-tape @@ -7,7 +7,10 @@ TestName="small-file-size-tape" JobName=smallfilesize . scripts/functions -copy_tape_confs +require_tape_drive + +scripts/copy-tape-confs +scripts/cleanup-tape echo "${cwd}/build" >${cwd}/tmp/file-list cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 diff --git a/regress/tests/truncate-bug-tape b/regress/tests/truncate-bug-tape index 98c0b8387e..b1c9fc6c85 100755 --- a/regress/tests/truncate-bug-tape +++ b/regress/tests/truncate-bug-tape @@ -6,7 +6,10 @@ TestName="truncate-bug-tape" JobName=truncatebug . scripts/functions -copy_tape_confs +require_tape_drive + +scripts/copy-tape-confs +scripts/cleanup-tape echo "${cwd}/build" >${cwd}/tmp/file-list diff --git a/regress/tests/two-jobs-test b/regress/tests/two-jobs-test index 4f1fdabdcd..be9501bf7c 100755 --- a/regress/tests/two-jobs-test +++ b/regress/tests/two-jobs-test @@ -21,8 +21,8 @@ setdebug level=15 storage=File messages @output/dev/null estimate job=$JobName listing -estimate job=$JobName listing -estimate job=$JobName listing +estimate job=$JobName +estimate job=$JobName messages @$out tmp/log1.out label storage=File volume=TestVolume001 diff --git a/regress/tests/verify-vol-tape b/regress/tests/verify-vol-tape index 9927adee7b..b1e79b98c7 100755 --- a/regress/tests/verify-vol-tape +++ b/regress/tests/verify-vol-tape @@ -7,7 +7,10 @@ TestName="verify-vol-tape" JobName=VerifyVol . scripts/functions -copy_tape_confs +require_tape_drive + +scripts/copy-tape-confs +scripts/cleanup-tape echo "${cwd}/build" >${cwd}/tmp/file-list diff --git a/regress/tests/win32-backup-tape b/regress/tests/win32-backup-tape index 299fdd4873..4afd093536 100755 --- a/regress/tests/win32-backup-tape +++ b/regress/tests/win32-backup-tape @@ -8,6 +8,8 @@ TestName="win32-backup-tape" JobName=win32tape . scripts/functions +require_tape_drive + scripts/copy-win32-confs scripts/cleanup-tape diff --git a/regress/tests/win32-to-linux-tape b/regress/tests/win32-to-linux-tape index 05abd85716..366a88e1d6 100755 --- a/regress/tests/win32-to-linux-tape +++ b/regress/tests/win32-to-linux-tape @@ -8,6 +8,8 @@ TestName="win32-to-linux-tape" JobName=AutoLabel . scripts/functions +require_tape_drive + scripts/copy-win32-confs scripts/cleanup-tape