From c5d36350435c6082c0655ea563709c8e7c5f5cf5 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Tue, 5 Feb 2013 09:43:32 +0100 Subject: [PATCH] Sync with upstream patches. Synced all interesting and usable upstream patches and fixed any merge conflicts and changes needed to fit in the new world. Synced up to Branch-5.2 - git commit 6decfe0792db538aa18cb07b2d06aba075e08bf5 Fixes #47: Sync with upstream [6decfe0792db538aa18cb07b2d06aba075e08bf5] --- DartTestfile.txt.in | 4 +- all-changer-tests | 8 +- all-dev-tests | 98 +++++++------- all-disk-tests | 200 ++++++++++++++--------------- all-root-tests | 8 +- all-tape-tests | 26 ++-- do_all_tests | 9 +- run | 27 +++- run_bconsole | 3 + scripts/bareos-dir-2client.conf.in | 2 +- scripts/bareos-dir-fifo.conf.in | 2 +- scripts/bareos-dir-strip.conf.in | 2 +- scripts/bareos-dir-tape.conf.in | 2 +- scripts/functions | 3 + scripts/setup | 7 + 15 files changed, 219 insertions(+), 182 deletions(-) create mode 100644 run_bconsole diff --git a/DartTestfile.txt.in b/DartTestfile.txt.in index 0a15948..4a51d4a 100644 --- a/DartTestfile.txt.in +++ b/DartTestfile.txt.in @@ -1,5 +1,3 @@ - - ADD_TEST(disk:acl-xattr-test "@regressdir@/tests/acl-xattr-test") ADD_TEST(disk:action-on-purge-test "@regressdir@/tests/action-on-purge-test") ADD_TEST(disk:accurate-test "@regressdir@/tests/accurate-test") @@ -51,7 +49,7 @@ ADD_TEST(disk:migration-job-purge-test "@regressdir@/tests/migration-job-purge-t 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:multi-storage-test "@regressdir@/tests/multi-storage-test") -ADD_TEST(disk:prune-test "@regressdir@/tests/prune-test") +#ADD_TEST(disk:prune-test "@regressdir@/tests/prune-test") ADD_TEST(disk:prune-config-test "@regressdir@/tests/prune-config-test") ADD_TEST(disk:prune-migration-test "@regressdir@/tests/prune-migration-test") ADD_TEST(disk:prune-copy-test "@regressdir@/tests/prune-copy-test") diff --git a/all-changer-tests b/all-changer-tests index 65dc26e..e3504ac 100755 --- a/all-changer-tests +++ b/all-changer-tests @@ -6,10 +6,10 @@ echo "Start autochanger tests" echo "Start autochanger tests" >>test.out rm -f dumps/* -nice tests/incremental-changer -nice tests/two-pool-changer -nice tests/two-volume-changer -nice tests/vol-duration-changer +./run tests/incremental-changer +./run tests/two-pool-changer +./run tests/two-volume-changer +./run tests/vol-duration-changer echo "End autochanger tests" echo "End autochanger tests" >>test.out diff --git a/all-dev-tests b/all-dev-tests index 2897478..d367530 100755 --- a/all-dev-tests +++ b/all-dev-tests @@ -8,48 +8,48 @@ echo " " >>test.out echo "Start sample non-root disk tests" echo "Start sample non-root disk tests" >>test.out rm -f dumps/* -nice tests/acl-xattr-test -nice tests/action-on-purge-test -nice tests/allowcompress-test -nice tests/auto-label-test -nice tests/backup-bareos-test -nice tests/base-job-test -nice tests/bextract-test -nice tests/bconsole-test -nice tests/comment-test -nice tests/compressed-test -nice tests/compress-encrypt-test -nice tests/concurrent-jobs-test -nice tests/copy-job-test -nice tests/encrypt-bug-test -nice tests/estimate-test -nice tests/lockmgr-test -nice tests/exclude-dir-test -nice tests/fifo-test -nice tests/fileregexp-test -nice tests/backup-to-null -nice tests/regexwhere-test -nice tests/differential-test -nice tests/four-jobs-test -nice tests/incremental-test -nice tests/query-test -nice tests/recycle-test -nice tests/restore2-by-file-test -nice tests/restore-by-file-test -nice tests/restore-disk-seek-test -nice tests/next-vol-test -nice tests/strip-test -nice tests/two-vol-test -nice tests/verify-vol-test -nice tests/weird-files2-test -nice tests/weird-files-test -nice tests/migration-job-test -nice tests/messages-test -nice tests/multi-storage-test -nice tests/prune-test -nice tests/hardlink-test -nice tests/tls-test -nice tests/virtual-backup-test +./run tests/acl-xattr-test +./run tests/action-on-purge-test +./run tests/allowcompress-test +./run tests/auto-label-test +./run tests/backup-bareos-test +./run tests/base-job-test +./run tests/bextract-test +./run tests/bconsole-test +./run tests/comment-test +./run tests/compressed-test +./run tests/compress-encrypt-test +./run tests/concurrent-jobs-test +./run tests/copy-job-test +./run tests/encrypt-bug-test +./run tests/estimate-test +./run tests/lockmgr-test +./run tests/exclude-dir-test +./run tests/fifo-test +./run tests/fileregexp-test +./run tests/backup-to-null +./run tests/regexwhere-test +./run tests/differential-test +./run tests/four-jobs-test +./run tests/incremental-test +./run tests/query-test +./run tests/recycle-test +./run tests/restore2-by-file-test +./run tests/restore-by-file-test +./run tests/restore-disk-seek-test +./run tests/next-vol-test +./run tests/strip-test +./run tests/two-vol-test +./run tests/verify-vol-test +./run tests/weird-files2-test +./run tests/weird-files-test +./run tests/migration-job-test +./run tests/messages-test +./run tests/multi-storage-test +#./run tests/prune-test +./run tests/hardlink-test +./run tests/tls-test +./run tests/virtual-backup-test echo "End sample non-root disk tests" echo "End sample non-root disk tests" >>test.out @@ -59,12 +59,12 @@ echo " " echo " " >>test.out echo "Start sample non-root disk autochanger tests" echo "Start sample non-root disk autochanger tests" >>test.out -#nice tests/three-pool-recycle-test -nice tests/fast-two-pool-test -nice tests/two-volume-test -nice tests/2drive-concurrent-test -nice tests/incremental-2media -nice tests/2drive-3pool-test -nice tests/2drive-swap-test +#./run tests/three-pool-recycle-test +./run tests/fast-two-pool-test +./run tests/two-volume-test +./run tests/2drive-concurrent-test +./run tests/incremental-2media +./run tests/2drive-3pool-test +./run tests/2drive-swap-test echo "End sample non-root disk autochanger tests" echo "End sample non-root disk autochanger tests" >>test.out diff --git a/all-disk-tests b/all-disk-tests index c283b1d..05f7ec9 100755 --- a/all-disk-tests +++ b/all-disk-tests @@ -7,91 +7,91 @@ echo " " >>test.out echo "Start non-root disk tests" echo "Start non-root disk tests" >>test.out rm -f dumps/* -nice tests/acl-xattr-test -nice tests/action-on-purge-test -nice tests/allowcompress-test -nice tests/accurate-test -nice tests/auto-label-test -nice tests/backup-bareos-test -nice tests/bextract-test -nice tests/bconsole-test -nice tests/base-job-test -nice tests/big-vol-test -nice tests/bscan-test -nice tests/bsr-opt-test -nice tests/comment-test -nice tests/compressed-test -nice tests/lzo-test -nice tests/compress-encrypt-test -nice tests/lzo-encrypt-test -nice tests/concurrent-jobs-test -nice tests/copy-job-test -nice tests/copy-jobspan-test -nice tests/copy-uncopied-test -nice tests/copy-upgrade-test -nice tests/copy-volume-test -nice tests/data-encrypt-test -nice tests/delete-test -nice tests/encrypt-bug-test -nice tests/estimate-test -nice tests/exclude-dir-test -nice tests/fifo-test -nice tests/fileregexp-test -nice tests/backup-to-null -nice tests/regexwhere-test +./run tests/acl-xattr-test +./run tests/action-on-purge-test +./run tests/allowcompress-test +./run tests/accurate-test +./run tests/auto-label-test +./run tests/backup-bareos-test +./run tests/bextract-test +./run tests/bconsole-test +./run tests/base-job-test +./run tests/big-vol-test +./run tests/bscan-test +./run tests/bsr-opt-test +./run tests/comment-test +./run tests/compressed-test +./run tests/lzo-test +./run tests/compress-encrypt-test +./run tests/lzo-encrypt-test +./run tests/concurrent-jobs-test +./run tests/copy-job-test +./run tests/copy-jobspan-test +./run tests/copy-uncopied-test +./run tests/copy-upgrade-test +./run tests/copy-volume-test +./run tests/data-encrypt-test +./run tests/delete-test +./run tests/encrypt-bug-test +./run tests/estimate-test +./run tests/exclude-dir-test +./run tests/fifo-test +./run tests/fileregexp-test +./run tests/backup-to-null +./run tests/regexwhere-test # The following two can uses *lots* of disk space # so they are normally turned off, but if you have # at least two GB free, you can run them -#nice tests/sparse-encrypt-test -#nice tests/gigaslam-sparse-test -nice tests/differential-test -nice tests/four-concurrent-jobs-test -nice tests/four-jobs-test -nice tests/incremental-test -nice tests/query-test -nice tests/recycle-test -nice tests/restore2-by-file-test -nice tests/restore-by-file-test -nice tests/restore-disk-seek-test -nice tests/runscript-test -nice tests/source-addr-test -nice tests/stats-test -nice tests/six-vol-test -nice tests/span-vol-test -nice tests/maxbytes-test -nice tests/maxtime-test -nice tests/maxuseduration-test -nice tests/maxvol-test -nice tests/maxvol2-test -nice tests/messages-test -nice tests/next-vol-test -nice tests/sparse-compressed-test -nice tests/sparse-lzo-test -nice tests/sparse-test -nice tests/strip-test -nice tests/two-jobs-test -nice tests/two-vol-test -nice tests/verify-cat-test -nice tests/verify-vol-test -nice tests/verify-voltocat-test -nice tests/weird-files2-test -nice tests/weird-files-test -nice tests/migration-job-test -nice tests/migration-job-purge-test -nice tests/migration-jobspan-test -nice tests/migration-volume-test -nice tests/migration-time-test -nice tests/multi-storage-test -nice tests/prune-test -nice tests/prune-config-test -nice tests/prune-migration-test -nice tests/prune-copy-test -nice tests/prune-base-job-test -nice tests/hardlink-test -nice tests/tls-duplicate-job-test -nice tests/tls-test -nice tests/virtual-changer-test -nice tests/virtual-backup-test +#./run tests/sparse-encrypt-test +#./run tests/gigaslam-sparse-test +./run tests/differential-test +./run tests/four-concurrent-jobs-test +./run tests/four-jobs-test +./run tests/incremental-test +./run tests/query-test +./run tests/recycle-test +./run tests/restore2-by-file-test +./run tests/restore-by-file-test +./run tests/restore-disk-seek-test +./run tests/runscript-test +./run tests/source-addr-test +./run tests/stats-test +./run tests/six-vol-test +./run tests/span-vol-test +./run tests/maxbytes-test +./run tests/maxtime-test +./run tests/maxuseduration-test +./run tests/maxvol-test +./run tests/maxvol2-test +./run tests/messages-test +./run tests/next-vol-test +./run tests/sparse-compressed-test +./run tests/sparse-lzo-test +./run tests/sparse-test +./run tests/strip-test +./run tests/two-jobs-test +./run tests/two-vol-test +./run tests/verify-cat-test +./run tests/verify-vol-test +./run tests/verify-voltocat-test +./run tests/weird-files2-test +./run tests/weird-files-test +./run tests/migration-job-test +./run tests/migration-job-purge-test +./run tests/migration-jobspan-test +./run tests/migration-volume-test +./run tests/migration-time-test +./run tests/multi-storage-test +#./run tests/prune-test +./run tests/prune-config-test +./run tests/prune-migration-test +./run tests/prune-copy-test +./run tests/prune-base-job-test +./run tests/hardlink-test +./run tests/tls-duplicate-job-test +./run tests/tls-test +./run tests/virtual-changer-test +./run tests/virtual-backup-test echo "End non-root disk tests" echo "End non-root disk tests" >>test.out @@ -101,24 +101,24 @@ echo " " echo " " >>test.out echo "Start non-root virtual disk autochanger tests" echo "Start non-root virtual disk autochanger tests" >>test.out -#nice tests/three-pool-recycle-test -nice tests/two-pool-test -nice tests/fast-two-pool-test -nice tests/two-volume-test -nice tests/incremental-2disk -nice tests/2drive-incremental-2disk -nice tests/scratch-pool-test -nice tests/scratchpool-pool-test -nice tests/2drive-concurrent-test -nice tests/incremental-2media -nice tests/three-pool-test -nice tests/2drive-3pool-test -nice tests/2drive-swap-test -nice tests/quota-softquota-test -nice tests/quota-hardquota-test -nice tests/quota-includefailed-test -nice tests/bandwidth-limit-per-client-test +#./run tests/three-pool-recycle-test +./run tests/two-pool-test +./run tests/fast-two-pool-test +./run tests/two-volume-test +./run tests/incremental-2disk +./run tests/2drive-incremental-2disk +./run tests/scratch-pool-test +./run tests/scratchpool-pool-test +./run tests/2drive-concurrent-test +./run tests/incremental-2media +./run tests/three-pool-test +./run tests/2drive-3pool-test +./run tests/2drive-swap-test +./run tests/quota-softquota-test +./run tests/quota-hardquota-test +./run tests/quota-includefailed-test +./run tests/bandwidth-limit-per-client-test # Turn back on after next_vol.c bug is fixed -# nice tests/next-vol-test +# ./run tests/next-vol-test echo "End non-root virtual disk autochanger tests" echo "End non-root virtual disk autochanger tests" >>test.out diff --git a/all-root-tests b/all-root-tests index 284f4e4..eaf6c48 100755 --- a/all-root-tests +++ b/all-root-tests @@ -7,9 +7,9 @@ echo " " >>test.out echo "Start root tests" echo "Start root tests" >>test.out rm -f dumps/* -tests/dev-test-root -tests/etc-test-root -tests/lib-test-root -tests/usr-tape-root +./run tests/dev-test-root +./run tests/etc-test-root +./run tests/lib-test-root +./run tests/usr-tape-root echo "End root tests" echo "End root tests" >>test.out diff --git a/all-tape-tests b/all-tape-tests index 71ca679..3e35780 100755 --- a/all-tape-tests +++ b/all-tape-tests @@ -17,18 +17,18 @@ echo " " >>test.out echo "Start all non-root tape tests" echo "Start all non-root tape tests" >>test.out rm -f dumps/* -nice tests/ansi-label-tape -nice tests/backup-bareos-tape -nice tests/bscan-tape -nice tests/fixed-block-size-tape -nice tests/four-concurrent-jobs-tape -nice tests/four-jobs-tape -nice tests/incremental-tape -nice tests/relabel-tape -nice tests/restore-by-file-tape -nice tests/small-file-size-tape -nice tests/truncate-bug-tape -nice tests/verify-vol-tape -# nice tests/manual-two-vol-tape +./run tests/ansi-label-tape +./run tests/backup-bareos-tape +./run tests/bscan-tape +./run tests/fixed-block-size-tape +./run tests/four-concurrent-jobs-tape +./run tests/four-jobs-tape +./run tests/incremental-tape +./run tests/relabel-tape +./run tests/restore-by-file-tape +./run tests/small-file-size-tape +./run tests/truncate-bug-tape +./run tests/verify-vol-tape +# ./run tests/manual-two-vol-tape echo "End all non-root tape tests" echo "End all non-root tape tests" >>test.out diff --git a/do_all_tests b/do_all_tests index 3603bdb..0371a51 100755 --- a/do_all_tests +++ b/do_all_tests @@ -4,17 +4,20 @@ if [ ! -f bin/tape_options ] ; then touch bin/tape_options fi echo " " >test.out +hostname >>test.out +echo " " >>test.out cat build/config.out >>test.out echo " " >>test.out echo "Test results" >>test.out echo " " >>test.out ./starttime -nice ./all-disk-tests -nice ./all-tape-tests -nice ./all-changer-tests +./all-disk-tests +./all-tape-tests +./all-changer-tests echo " " echo "End do_all tests" echo "End do_all tests" >>test.out scripts/cleanup +hostname >>test.out cat test.out ./endtime diff --git a/run b/run index 7d89e3d..d4194dc 100755 --- a/run +++ b/run @@ -1,3 +1,26 @@ #!/bin/sh -bin/bareos start -bin/bconsole -c bin/bconsole.conf +# +# Script to run a regression test with a time limit (in seconds) +# this allows the script to be killed if say the SD crashes +# due to an ASSERT. Otherwise the script will hang for +# a very long time, perhaps forever. +# +# Of course, this implies that all tests must terminate normally +# within the timeout period (900 seconds). +# +if [ -f bin/timelimit ]; then + WARNTIME=900 KILLTIME=50 bin/timelimit $* + if [ $? != 0 ] ; then + echo " " + echo "=== Test $* timed out ===" + echo " " + echo " " >> test.out + echo "=== Test $* timed out ===" >> test.out + echo " " >> test.out + fi +else + nice $* +fi +#echo " " +#echo " " +#grep -e" \!\!\!\!" -e"===\ Test" test.out diff --git a/run_bconsole b/run_bconsole new file mode 100644 index 0000000..7d89e3d --- /dev/null +++ b/run_bconsole @@ -0,0 +1,3 @@ +#!/bin/sh +bin/bareos start +bin/bconsole -c bin/bconsole.conf diff --git a/scripts/bareos-dir-2client.conf.in b/scripts/bareos-dir-2client.conf.in index 864d83f..2488ea6 100644 --- a/scripts/bareos-dir-2client.conf.in +++ b/scripts/bareos-dir-2client.conf.in @@ -72,7 +72,7 @@ Job { Maximum Concurrent Jobs = 4 SpoolData = yes # Prefer Mounted Volumes = no - Client Run Before Job = "sleep 10" + Client Run Before Job = "sleep 5" } Job { diff --git a/scripts/bareos-dir-fifo.conf.in b/scripts/bareos-dir-fifo.conf.in index a1a6289..9525e4d 100644 --- a/scripts/bareos-dir-fifo.conf.in +++ b/scripts/bareos-dir-fifo.conf.in @@ -52,7 +52,7 @@ Job { Maximum Concurrent Jobs = 4 SpoolData = yes # Prefer Mounted Volumes = no - Client Run Before Job = "sleep 120" + Client Run Before Job = "sleep 30" } Job { diff --git a/scripts/bareos-dir-strip.conf.in b/scripts/bareos-dir-strip.conf.in index a2f4f83..e261126 100644 --- a/scripts/bareos-dir-strip.conf.in +++ b/scripts/bareos-dir-strip.conf.in @@ -52,7 +52,7 @@ Job { Maximum Concurrent Jobs = 4 SpoolData = yes # Prefer Mounted Volumes = no - Client Run Before Job = "sleep 10" + Client Run Before Job = "sleep 5" } Job { diff --git a/scripts/bareos-dir-tape.conf.in b/scripts/bareos-dir-tape.conf.in index 6a28660..dcc9579 100644 --- a/scripts/bareos-dir-tape.conf.in +++ b/scripts/bareos-dir-tape.conf.in @@ -55,7 +55,7 @@ Job { Maximum Concurrent Jobs = 100 SpoolData = yes # Prefer Mounted Volumes = no - Client Run Before Job = "sleep 10" + Client Run Before Job = "sleep 5" Max Run Time = 30min } diff --git a/scripts/functions b/scripts/functions index c597afd..b391c3e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -500,6 +500,7 @@ case $1 in esac } + # Save current directory cwd=`pwd` if test "x${REGRESS_DEBUG}" = "x1"; then @@ -578,3 +579,5 @@ fi AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer} LD_LIBRARY_PATH=$bin:$LD_LIBRARY_PATH export LD_LIBRARY_PATH + +trap "{ estat=999; end_test; }" TERM diff --git a/scripts/setup b/scripts/setup index 050c000..c8ced57 100755 --- a/scripts/setup +++ b/scripts/setup @@ -82,6 +82,13 @@ sed -f tmp/t$$ build/src/dird/bareos-dir.conf.in >tmp/o$$ cp tmp/o$$ build/src/dird/bareos-dir.conf.in rm -f tmp/t$$ tmp/o$$ +# +# Now turn on DEVELOPER for regression testing +# +echo "s%^.*define DEVELOPER 1.*$%#define DEVELOPER 1%g" >tmp/t$$ +sed -f tmp/t$$ build/src/include/version.h >tmp/o$$ +cp tmp/o$$ build/src/include/version.h + # # Remove unneeded directories #