From: Kern Sibbald Date: Wed, 2 Sep 2020 13:03:26 +0000 (+0200) Subject: BEE Backport regress/tests/aligned-and-normal-test X-Git-Tag: Release-11.3.2~1251 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d409557896d257c28fa5cd0161d02edde429c85;p=thirdparty%2Fbacula.git BEE Backport regress/tests/aligned-and-normal-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: Thu Nov 10 18:19:13 2016 +0100 regress: tweak tests output Author: Kern Sibbald Date: Tue Aug 23 11:30:55 2016 +0200 regress: Tweak aligned tests not compatible with cloud Author: Kern Sibbald Date: Thu Jun 16 20:44:27 2016 +0200 Fix aligned tests not to try to make plugin Author: Kern Sibbald Date: Sat Jul 2 11:08:38 2016 +0200 regress: add new/modified aligned volumes tests Author: Alain Spineux Date: Mon Apr 7 15:08:12 2014 +0200 Part 2 beginning dedup code --- diff --git a/regress/tests/aligned-and-normal-test b/regress/tests/aligned-and-normal-test new file mode 100755 index 0000000000..8d65390cfe --- /dev/null +++ b/regress/tests/aligned-and-normal-test @@ -0,0 +1,99 @@ +#!/bin/sh +# +# Copyright (C) 2000-2020 Kern Sibbald +# License: BSD 2-Clause; see file LICENSE-FOSS +# +# Test aligned data volumes +# A non-aligned backup is run on the same Volume at the same time. +# +# This currently produces corrupted data volumes +# +TestName="aligned-and-normal-test" +JobName=NightlySave +. scripts/functions + +if test x$FORCE_CLOUD = xyes ; then + echo "\n=== Test $TestName skipped not compatible with Cloud ===" + exit 0 +fi + +scripts/cleanup +scripts/copy-test-confs +cp scripts/aligned-bacula-sd.conf bin/bacula-sd.conf +# uncomment for a big fileset +#cp scripts/aligned-bacula-dir.conf bin/bacula-dir.conf + +# install the aligned volume plugin +#make -C build/src/plugins/sd install-aligned-plugin >/dev/null + +echo "${cwd}/build" >${cwd}/tmp/file-list + +start_test + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log1.out +label storage=File volume=Vol1 +label storage=File2 volume=Vol2 +@#label storage=File volume=Vol3 +@#setdebug level=100 storage=File +@# Note, Create an aligned volume +@# Run Job 1 aligned job +@# Run Job 2 non-aligned job +@# Run Job 3 aligned jobs +@# Run Job 4 non-aligned job +run job=$JobName level=Full yes +run job=$JobName Storage=File2 level=Full yes +run job=$JobName level=Full yes +run job=$JobName Storage=File2 level=Full yes +wait +list volumes +sql +select * from JobMedia; + +messages +END_OF_DATA + +run_bacula + +cat <${cwd}/tmp/bconcmds +@# +@# now restore last Job run +@# +@$out ${cwd}/tmp/log2.out +@# setdebug level=0 fd +restore where=${cwd}/tmp/bacula-restores +5 +mark * +done +yes +wait +messages +@# Now restore JobId=1 +restore where=${cwd}/tmp/bacula-restores +3 +1 +mark * +done +yes +wait +@# Now restore JobId=2 +restore where=${cwd}/tmp/bacula-restores +3 +2 +mark * +done +yes +wait +END_OF_DATA + +run_bconsole + +sleep 2 +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +check_restore_diff +end_test