From: Kern Sibbald Date: Wed, 2 Sep 2020 13:28:19 +0000 (+0200) Subject: BEE Backport regress/tests/many-volumes-test X-Git-Tag: Release-11.3.2~1198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fb4cfd7ace38d8e72056bc787122655f50bd9da;p=thirdparty%2Fbacula.git BEE Backport regress/tests/many-volumes-test This commit is the result of the squash of the following main commits: Author: Eric Bollengier Date: Tue Jul 21 10:28:13 2020 +0200 regress: Add copyright to regress scripts Author: Kern Sibbald Date: Wed Aug 13 16:13:15 2014 +0200 Tweak reduce debug level Author: Kern Sibbald Date: Sat Sep 14 11:00:03 2013 +0200 Tweak many-volumes-test Author: Kern Sibbald Date: Thu Sep 12 18:31:21 2013 +0200 Add new truncate-test Author: Kern Sibbald Date: Tue Sep 10 08:05:37 2013 +0200 Turn on multiple backup of many-volumes-test Author: Kern Sibbald Date: Thu Sep 5 14:41:27 2013 +0200 Add new many-volumes-test -- crashes with Aligned Volumes on --- diff --git a/regress/tests/many-volumes-test b/regress/tests/many-volumes-test new file mode 100755 index 0000000000..c5d82289b5 --- /dev/null +++ b/regress/tests/many-volumes-test @@ -0,0 +1,79 @@ +#!/bin/sh +# +# Copyright (C) 2000-2020 Kern Sibbald +# License: BSD 2-Clause; see file LICENSE-FOSS +# +# Run a simple backup of the Bacula build directory multiple times +# in // over multiple volumes, and run a restore for each Job. +# +TestName="many-volumes-test" +JobName=SpanVol +. scripts/functions + +scripts/cleanup +scripts/copy-test-confs +echo "${cwd}/build" >${cwd}/tmp/file-list + +$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Maximum Concurrent Jobs", "1", "Device")' +$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Maximum Concurrent Jobs", "50", "Storage")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Maximum Concurrent Jobs", "50", "Storage")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Maximum Concurrent Jobs", "50", "Director")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Maximum Concurrent Jobs", "50", "Client")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "SpoolData", "no", "Job")' +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Maximum Volumes", "350", "Pool")' + +sed -i -e 's/# Simple/ /' $conf/bacula-dir.conf +sed -i -e 's/# Maximum Volume Bytes = 1500000/ Maximum Volume Bytes = 1500000/' $conf/bacula-dir.conf + +# install the aligned volume plugin +make -C build/src/plugins/sd install-aligned-plugin >/dev/null + +change_jobname CompressedTest $JobName +start_test + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log1.out +setdebug level=0 storage +run level=full job=$JobName yes +@#run level=full job=$JobName yes +@#run level=full job=$JobName yes +@#run level=full job=$JobName yes +@#run level=full job=$JobName yes +@#run level=full job=$JobName yes +wait +messages +@# +@# now do a restore +@# +@$out ${cwd}/tmp/log2.out +setdebug level=0 storage=File +setdebug level=0 dir +@# Restore JobId=1 +restore where=${cwd}/tmp/bacula-restores storage=File +3 +1 +mark * +done +yes +wait +@# Restore JobId=2 +restore where=${cwd}/tmp/bacula-restores storage=File +3 +2 +mark * +done +yes +wait +messages +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +check_restore_diff +end_test