From: Eric Bollengier Date: Wed, 2 Sep 2020 12:56:17 +0000 (+0200) Subject: BEE Backport regress/tests/sd-sd-test X-Git-Tag: Release-11.3.2~1277 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30f27e00a03a5d21bd098ab4874d1b809a3e3ccc;p=thirdparty%2Fbacula.git BEE Backport regress/tests/sd-sd-test This commit is the result of the squash of the following main commits: Author: Eric Bollengier Date: Wed May 6 22:19:26 2020 +0200 regress: Fix sd-sd-test with FORCE_CLOUD Author: Eric Bollengier Date: Tue Mar 3 16:17:42 2020 +0100 regress: Fix tests with FORCE_TLS Author: Alain Spineux Date: Wed Oct 30 13:09:36 2019 +0100 regress: fix dedup tests & sd-sd-test - sd-sd-test was stil using the old "Dedup" resource name Author: Alain Spineux Date: Mon Oct 21 14:11:35 2019 +0200 regress: sd-sd-test, add new dedup resource Author: Eric Bollengier Date: Fri Oct 18 09:23:43 2019 +0200 regress: Find free port to run sd-sd-test --- diff --git a/regress/tests/sd-sd-test b/regress/tests/sd-sd-test index c7ecabd147..c155a455b0 100755 --- a/regress/tests/sd-sd-test +++ b/regress/tests/sd-sd-test @@ -18,29 +18,51 @@ scripts/copy-migration-confs scripts/prepare-disk-changer echo "${cwd}/build" >${cwd}/tmp/file-list +# Find a free port to run the second SD +for i in `seq 10 100` +do + PORT=`expr $BASEPORT + $i` + if ! netstat -an | grep " $PORT " 2> /dev/null > /dev/null + then + break + fi +done sed -e "s:$cwd/working:$cwd/working2: " \ -e "s:$cwd/tmp:$cwd/tmp2:" $conf/bacula-sd.conf > $conf/bacula-sd2.conf $bperl -e "add_attribute('$conf/bacula-sd2.conf', 'Name', 'sd2', 'Storage')" -$bperl -e "add_attribute('$conf/bacula-sd2.conf', 'SDPort', $BASEPORT + 10, 'Storage')" +$bperl -e "add_attribute('$conf/bacula-sd2.conf', 'SDPort', '$PORT', 'Storage')" $bperl -e "add_attribute('$conf/bacula-sd2.conf', 'Media Type', 'DiskChangerMedia2', 'Device', 'Drive-0')" $bperl -e "add_attribute('$conf/bacula-sd2.conf', 'Media Type', 'File2', 'Device', 'FileStorage')" if [ x$FORCE_DEDUP = xyes ]; then DEDUP_FS_OPTION=${DEDUP_FS_OPTION:-bothsides} $bperl -e 'add_attribute("$conf/bacula-sd2.conf", "Plugin Directory", "$plugins", "Storage")' $bperl -e 'add_attribute("$conf/bacula-sd2.conf", "Device Type", "Dedup", "Device")' - $bperl -e 'add_attribute("$conf/bacula-sd2.conf", "DedupDirectory", "${working}2", "Storage")' - $bperl -e 'add_attribute("$conf/bacula-sd2.conf", "MaximumContainerSize", "50MB", "Storage")' + $bperl -e 'add_attribute("$conf/bacula-sd2.conf", "Dedupengine", "Dedupengine-sd2", "Device")' + cat >> $conf/bacula-sd2.conf <