]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak remove unused regression tests + add some new ones
authorKern Sibbald <kern@sibbald.com>
Wed, 10 May 2017 16:42:28 +0000 (18:42 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 22 May 2017 13:01:42 +0000 (15:01 +0200)
regress/DartTestfile.txt.in
regress/tests/file-span-vol-test [new file with mode: 0755]
regress/tests/jobmedia-bug2-test [new file with mode: 0755]

index 2ec468fe7e299c320fb5d16131176a1834ee3b4d..5081cbdd41c0b5741e347d99954b2409489e27d9 100644 (file)
@@ -6,9 +6,9 @@ ADD_TEST(changer:two-pool-changer "@regressdir@/tests/two-pool-changer")
 ADD_TEST(changer:two-volume-changer "@regressdir@/tests/two-volume-changer")
 ADD_TEST(changer:vol-duration-changer "@regressdir@/tests/vol-duration-changer")
 
-ADD_TEST(aligned:aligned-and-normal-test "@regressdir@/tests/aligned-and-normal-test")
-ADD_TEST(aligned:aligned-multi-test "@regressdir@/tests/aligned-and-normal-test")
-ADD_TEST(aligned:aligned-bug-1919-test "@regressdir@/tests/aligned-bug-1919-test")
+#ADD_TEST(aligned:aligned-and-normal-test "@regressdir@/tests/aligned-and-normal-test")
+#ADD_TEST(aligned:aligned-multi-test "@regressdir@/tests/aligned-and-normal-test")
+#ADD_TEST(aligned:aligned-bug-1919-test "@regressdir@/tests/aligned-bug-1919-test")
 
 ADD_TEST(misc:btape-test "@regressdir@/tests/btape-test")
 
@@ -108,7 +108,7 @@ ADD_TEST(disk:multi-storage-test "@regressdir@/tests/multi-storage-test")
 ADD_TEST(disk:next-pool-test "@regressdir@/tests/next-pool-test")
 ADD_TEST(disk:next-vol-bug-7302 "@regressdir@/tests/next-vol-bug-7302")
 ADD_TEST(disk:next-vol-test "@regressdir@/tests/next-vol-test")
-ADD_TEST(disk:plugin-test "@regressdir@/tests/plugin-test")
+#ADD_TEST(disk:plugin-test "@regressdir@/tests/plugin-test")
 ADD_TEST(disk:prune-base-job-test "@regressdir@/tests/prune-base-job-test")
 ADD_TEST(disk:prune-copy-test "@regressdir@/tests/prune-copy-test")
 ADD_TEST(disk:prune-migration-test "@regressdir@/tests/prune-migration-test")
@@ -117,7 +117,7 @@ ADD_TEST(disk:prune-test "@regressdir@/tests/prune-test")
 ADD_TEST(disk:query-test "@regressdir@/tests/query-test")
 ADD_TEST(disk:recycle-test "@regressdir@/tests/recycle-test")
 ADD_TEST(disk:regexwhere-test "@regressdir@/tests/regexwhere-test")
-ADD_TEST(disk:remote-console-test "@regressdir@/tests/remote-console-test")
+#ADD_TEST(disk:remote-console-test "@regressdir@/tests/remote-console-test")
 ADD_TEST(disk:restart-accurate-job-test "@regressdir@/tests/restart-accurate-job-test")
 ADD_TEST(disk:restart-job-test "@regressdir@/tests/restart-job-test")
 ADD_TEST(disk:restart2-base-job-test "@regressdir@/tests/restart2-base-job-test")
@@ -136,9 +136,9 @@ ADD_TEST(disk:span-vol-test "@regressdir@/tests/span-vol-test")
 ADD_TEST(disk:sparse-compressed-test "@regressdir@/tests/sparse-compressed-test")
 ADD_TEST(disk:sparse-lzo-test "@regressdir@/tests/sparse-lzo-test")
 ADD_TEST(disk:sparse-test "@regressdir@/tests/sparse-test")
-ADD_TEST(disk:sqlite-test "@regressdir@/tests/sqlite-test")
+#ADD_TEST(disk:sqlite-test "@regressdir@/tests/sqlite-test")
 ADD_TEST(disk:stats-test "@regressdir@/tests/stats-test")
-ADD_TEST(disk:status-network-test "@regressdir@/tests/status-network-test")
+#ADD_TEST(disk:status-network-test "@regressdir@/tests/status-network-test")
 ADD_TEST(disk:strip-test "@regressdir@/tests/strip-test")
 ADD_TEST(disk:three-pool-test "@regressdir@/tests/three-pool-test")
 #ADD_TEST(disk:three-pool-recycle-test "@regressdir@/tests/three-pool-recycle-test")
diff --git a/regress/tests/file-span-vol-test b/regress/tests/file-span-vol-test
new file mode 100755 (executable)
index 0000000..d815cd6
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# Run a simple backup of a big file but 
+#   split the archive into four volumes, two of which are
+#   totally full. I.e. make sure that bsr selects all tapes 
+#   including those fully spanned.
+#
+TestName="file-span-vol-test"
+JobName=SpanVol
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-test-confs
+rm -f $cwd/build/big
+
+dd if=/dev/zero of=$tmp/big count=10000 > /dev/null
+
+echo "$tmp/big" >${cwd}/tmp/file-list
+echo "${cwd}/build" >>${cwd}/tmp/file-list
+change_jobname NightlySave $JobName
+start_test
+
+# Remove last / and convert all / to cd commands
+CD=`echo $tmp | sed 's:/$::' | sed 's:/:\ncd :g'`
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+label storage=File1 volume=TestVolume004
+label storage=File1 volume=TestVolume003
+label storage=File1 volume=TestVolume002
+label storage=File1 volume=TestVolume001
+update Volume=TestVolume004 MaxVolBytes=3000000
+update Volume=TestVolume003 MaxVolBytes=3000000
+update Volume=TestVolume002 MaxVolBytes=3000000
+run job=$JobName fileset=SimpleSet storage=File1 yes
+wait
+list volumes
+messages
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+restore where=$tmp/bacula-restores select storage=File1
+unmark *
+$CD
+mark big
+done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File1
+stop_bacula
+
+check_two_logs
+
+diff -q $tmp/big $tmp/bacula-restores/$tmp/big
+if [ $? -ne 0 ]; then
+    print_debug "ERROR: $tmp/big $tmp/bacula-restores/$tmp/big are different"
+    print_debug `ls -l $tmp/big $tmp/bacula-restores/$tmp/big are different`
+    rstat=1
+fi
+
+end_test
diff --git a/regress/tests/jobmedia-bug2-test b/regress/tests/jobmedia-bug2-test
new file mode 100755 (executable)
index 0000000..f1c6e4f
--- /dev/null
@@ -0,0 +1,123 @@
+#!/bin/sh
+#
+# The script is writing simultaneously (20 jobs) on the same device
+# Normally each job will have to generate many JobMedia. Let see if
+# all JobMedia records are fine.
+#
+#
+TestName=`basename $0`
+JobName=Virtual
+
+. scripts/functions
+${rscripts}/cleanup
+cp -f ${rscripts}/bacula-dir-2media-virtual.conf ${conf}/bacula-dir.conf
+cp -f ${rscripts}/bacula-sd-2media-virtual.conf ${conf}/bacula-sd.conf
+cp -f ${rscripts}/test-bacula-fd.conf ${conf}/bacula-fd.conf
+cp -f ${rscripts}/test-console.conf ${conf}/bconsole.conf
+
+echo "$cwd/build/src/dird" >${cwd}/tmp/file-list
+
+# To reproduce this issue, we need only one job per device and per volume
+$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Maximum Concurrent Jobs", "20", "Device")'
+$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Label Media", "Yes", "Device")'
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Label Format", "Vol-", "Pool")'
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Maximum Concurrent Jobs", "20", "Director")'
+$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Maximum File Size", "5M", "Device")'
+$bperl -e 'add_attribute("$conf/bacula-sd.conf", "Maximum Volume Size", "32M", "Device")'
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Autoprune", "no", "Client")'
+$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Autoprune", "no", "Pool")'
+
+start_test
+
+mkdir $tmp/disk
+
+cat <<END_OF_DATA >${tmp}/bconcmds
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+run job=$JobName level=Full storage=vDrive-1 yes
+@sleep 30
+.status dir running
+@sleep 30
+.status dir running
+@sleep 30
+.status dir running
+@sleep 30
+.status dir running
+@sleep 30
+.status dir running
+@sleep 30
+.status dir running
+@sleep 30
+.status dir running
+wait
+messages
+@$out $tmp/log2.out
+.status dir running
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=vDrive-1
+stop_bacula
+
+end_test