]> git.sur5r.net Git - bacula/bacula/commitdiff
Add a MaxVolBytes test that create over 100 Vols
authorKern Sibbald <kern@sibbald.com>
Sat, 3 Oct 2009 13:38:17 +0000 (15:38 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 3 Oct 2009 13:38:17 +0000 (15:38 +0200)
regress/scripts/cleanup
regress/scripts/new-test-bacula-dir.conf.in
regress/tests/maxbytes-test [new file with mode: 0755]

index b74b91a084036573b665687c944335389531131f..bccd1ea9cd2c470982a0a58ef18cb5bc4e4cc822 100755 (executable)
@@ -9,6 +9,7 @@ rm -rf ${tmp}/TestVolume001 ${tmp}bacula-restores ${tmp}/Small*
 rm -rf ${tmp}/sed_tmp ${tmp}/file-list
 rm -rf ${tmp}/*
 rm -rf ${working}/log ${tmp}/TEST-*
+rm -rf ${working}/log ${tmp}/Backup-*
 rm -rf ${working}/*.bsr ${working}/log*.sd
 rm -rf ${working}/*.trace
 rm -rf ${tmp}disk-changer
index 4a8e9a8d6cd52fe2d211a62ad8cabe52f107c398..3fe97c7d6886c55d58941ae84c9c8d17d9eb9c1d 100644 (file)
@@ -486,5 +486,7 @@ Pool {
   AutoPrune = yes                     # Prune expired volumes
   Volume Retention = 365d             # one year
 # Label Format = "TEST-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}:${NumVols}"
+# Simple Label Format = "Backup-"
 # Maximum Volume Jobs = 1
+# Maximum Volume Bytes = 512000
 }
diff --git a/regress/tests/maxbytes-test b/regress/tests/maxbytes-test
new file mode 100755 (executable)
index 0000000..8b9ea83
--- /dev/null
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+#  Run a job with small Maximum Volume Bytes.  It should
+#    create a lot of volumes. The test stresses auto-creation of
+#    Volumes and restores from a lot of Volumes. Note, it creates
+#    writes and then reads something like 110 Volumes (will vary
+#    depending on the size of the Bacula source).
+#
+TestName="maxbytes-test"
+JobName=maxbytes
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-test-confs
+echo "${cwd}/build" >${cwd}/tmp/file-list
+
+cp -f ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
+sed "s%# Maximum Volume Bytes%  Maximum Volume Bytes%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
+cp -f ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
+sed "s%# Simple Label Format%  Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
+
+change_jobname NightlySave $JobName
+start_test
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out /dev/null
+messages
+@$out   ${cwd}/tmp/log1.out
+@#setdebug level=100 Storage=File1
+run job=$JobName level=Full Storage=File1 yes
+wait
+list volumes
+messages
+@# 
+@# now do a restore
+@#
+@$out   ${cwd}/tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=File1
+unmark *
+mark *
+done
+yes
+wait
+@#reload
+@#reload
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File1
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test