]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add new test for bug printing many multiple Max Volume jobs= info
authorKern Sibbald <kern@sibbald.com>
Wed, 3 Oct 2018 15:14:25 +0000 (17:14 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 3 Oct 2018 15:32:31 +0000 (17:32 +0200)
regress/all-disk-tests
regress/tests/max-vol-jobs-test [new file with mode: 0755]

index 6e45cae7d2c674aed844033d0a380c8a1982da26..a12cbea9aed71066d60ac82fcb15d3b0b1d395d5 100755 (executable)
@@ -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 (executable)
index 0000000..63518b7
--- /dev/null
@@ -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 <<END_OF_DATA >${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