From: Kern Sibbald Date: Wed, 3 Oct 2018 15:14:25 +0000 (+0200) Subject: Add new test for bug printing many multiple Max Volume jobs= info X-Git-Tag: Release-9.2.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=906ac4b8466137c4b5dfb7eb8f8cc76fa87335e9;p=thirdparty%2Fbacula.git Add new test for bug printing many multiple Max Volume jobs= info --- diff --git a/regress/all-disk-tests b/regress/all-disk-tests index 6e45cae7d..a12cbea9a 100755 --- a/regress/all-disk-tests +++ b/regress/all-disk-tests @@ -61,6 +61,7 @@ rm -f dumps/* ./run tests/lzo-encrypt-test ./run tests/lzo-test ./run tests/many-reload-test +./run tests/max-vol-jobs-test ./run tests/maxbw-test ./run tests/maxbytes-test ./run tests/maxtime-test diff --git a/regress/tests/max-vol-jobs-test b/regress/tests/max-vol-jobs-test new file mode 100755 index 000000000..63518b76b --- /dev/null +++ b/regress/tests/max-vol-jobs-test @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Copyright (C) 2000-2018 Kern Sibbald +# License: BSD 2-Clause; see file LICENSE-FOSS +# + +# Run a simple backup of the Bacula build directory while +# Maximum Volume Jobs = 1 and with Maximum File Size small. +# Ensure that only one Max Volume Jobs=1 INFO message +# is printed. A bug caused it to be printed multiple +# times. +# +TestName="max-vol-jobs-test" +JobName=Incremental +. scripts/functions + +${rscripts}/cleanup +${rscripts}/copy-test-confs +echo "${tmpsrc}" >${tmp}/file-list +mkdir -p ${tmpsrc} +cp -p ${src}/src/dird/*.* ${tmpsrc} +cp -p ${src}/src/stored/*.* ${tmpsrc} +cd ${cwd} + +$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Maximum Volume Jobs", "1", "Pool")' +$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Maximum File Size", "100000", "Device")' + +change_jobname CompressedTest $JobName +start_test + +cat <${tmp}/bconcmds +@output /dev/null +messages +@$out ${tmp}/log1.out +setdebug level=0 dir +@#setdebug level=200 storage=File +setdebug level=0 client +label storage=File volume=TestVolume001 +label storage=File volume=TestVolume002 +label storage=File volume=TestVolume003 +label storage=File volume=TestVolume004 +run job=$JobName level=Full yes +wait +messages +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +num=`grep -c "Max Volume jobs=1" ${tmp}/log1.out` +if [ $num != 1 ] ; then + print_debug "ERROR: Should have only 1 Max Volume jobs=1 ..., but found $num" + estat=1 +fi +end_test