From: Kern Sibbald Date: Mon, 29 Sep 2003 15:01:55 +0000 (+0000) Subject: Changes for FreeBSD and spell weird correctly X-Git-Tag: Release-1.32~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=21427d27a0781cde066d16d4959b5905ce6d0770;p=bacula%2Fbacula Changes for FreeBSD and spell weird correctly git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@714 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/.cvsignore b/regress/.cvsignore index 6f0d68f2ee..120006c649 100644 --- a/regress/.cvsignore +++ b/regress/.cvsignore @@ -1,7 +1,7 @@ build bin test.out -wierd-files +weird-files diff tmp working diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index aaf2356abc..2b2c48d34e 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -8,12 +8,12 @@ tests/verify-vol-test tests/sparse-test tests/compressed-test tests/sparse-compressed-test -tests/wierd-files-test +tests/weird-files-test tests/two-jobs-test tests/two-vol-test tests/six-vol-test tests/bscan-test -tests/wierd-files2-test +tests/weird-files2-test tests/concurrent-jobs-test tests/four-concurrent-jobs-test tests/bsr-opt-test diff --git a/regress/all-tape-and-file-tests b/regress/all-tape-and-file-tests index 99a97e520f..857934410a 100755 --- a/regress/all-tape-and-file-tests +++ b/regress/all-tape-and-file-tests @@ -8,12 +8,12 @@ tests/verify-vol-test tests/sparse-test tests/compressed-test tests/sparse-compressed-test -tests/wierd-files-test +tests/weird-files-test tests/two-jobs-test tests/two-vol-test tests/six-vol-test tests/bscan-test -tests/wierd-files2-test +tests/weird-files2-test tests/concurrent-jobs-test tests/four-concurrent-jobs-test tests/bsr-opt-test diff --git a/regress/scripts/bacula-sd.conf.in b/regress/scripts/bacula-sd.conf.in new file mode 100644 index 0000000000..47422aa660 --- /dev/null +++ b/regress/scripts/bacula-sd.conf.in @@ -0,0 +1,74 @@ +# +# Default Bacula Storage Daemon Configuration file +# +# For Bacula release 1.32 (20 Sep 2003) -- redhat 9 +# +# You may need to change the name of your tape drive +# on the "Archive Device" directive in the Device +# resource. If you change the Name and/or the +# "Media Type" in the Device resource, please ensure +# that dird.conf has corresponding changes. +# + +Storage { # definition of myself + Name = rufus-sd + SDPort = 8103 # Director's port + WorkingDirectory = "/home/kern/bacula/regress/working" + Pid Directory = "/home/kern/bacula/regress/working" +} + +# +# List Directors who are permitted to contact Storage daemon +# +Director { + Name = rufus-dir + Password = "BzlEl8haeFmnv/Lv8V6zDzUBgFFQNsUtny6VkmccQpOy" +} + +# +# Devices supported by this Storage daemon +# To connect, the Director's bacula-dir.conf must have the +# same Name and MediaType. +# + +Device { + Name = FileStorage + Media Type = File + Archive Device = @tmpdir@ + LabelMedia = yes; # lets Bacula label unlabeled media + Random Access = Yes; + AutomaticMount = yes; # when device opened, read it + RemovableMedia = no; + AlwaysOpen = no; +} + +#Device { +# Name = DDS-4 # +# Media Type = DDS-4 +# Archive Device = /dev/nst0 +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +#} + +# +# A very old Exabyte with no end of media detection +# +#Device { +# Name = "Exabyte 8mm" +# Media Type = "8mm" +# Archive Device = /dev/nst0 +# Hardware end of medium = No; +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = Yes; +# RemovableMedia = yes; +#} + +# +# Send all messages to the Director, +# mount messages also are sent to the email address +# +Messages { + Name = Standard + director = rufus-dir = all +} diff --git a/regress/tests/dev-test-root b/regress/tests/dev-test-root index 5ede9e7c0b..a5a01c7400 100755 --- a/regress/tests/dev-test-root +++ b/regress/tests/dev-test-root @@ -8,6 +8,7 @@ echo " " echo " === /dev save/restore test ===" echo " " echo " " +UID=`/usr/bin/id -g` if [ $UID != 0 ] ; then echo " " echo "You must be root to run this test." diff --git a/regress/tests/etc-test-root b/regress/tests/etc-test-root index 72f40f9786..e5770209a3 100755 --- a/regress/tests/etc-test-root +++ b/regress/tests/etc-test-root @@ -8,6 +8,7 @@ echo " " echo " === /etc save/restore test ===" echo " " echo " " +UID=`/usr/bin/id -g` if [ $UID != 0 ] ; then echo " " echo "You must be root to run this test." diff --git a/regress/tests/lib-test-root b/regress/tests/lib-test-root index 43aeb12eda..7e9c800445 100755 --- a/regress/tests/lib-test-root +++ b/regress/tests/lib-test-root @@ -8,6 +8,7 @@ echo " " echo " === /lib save/restore test ===" echo " " echo " " +UID=`/usr/bin/id -g` if [ $UID != 0 ] ; then echo " " echo "You must be root to run this test." diff --git a/regress/tests/weird-files-test b/regress/tests/weird-files-test new file mode 100755 index 0000000000..7237d40c3f --- /dev/null +++ b/regress/tests/weird-files-test @@ -0,0 +1,68 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory +# then restore it. +# +if test ! -d weird-files ; then + echo " " + echo "Weird files not configured. Test not run." + exit 0 +fi +cwd=`pwd` +scripts/copy-test-confs +scripts/cleanup +echo "${cwd}/weird-files" >/tmp/file-list +bin/bacula stop 2>&1 >/dev/null +bin/drop_sqlite_tables +bin/make_sqlite_tables + +echo " " +echo " " +echo " === Starting weird filenames test ===" +echo " === Starting weird filenames test ===" >>working/log +echo " " + +bin/bacula start 2>&1 >/dev/null +bin/console -c bin/console.conf <&1 >/dev/null +${cwd}/bin/testls weird-files >${cwd}/tmp/original +cd tmp/bacula-restores${cwd} +${cwd}/bin/testls weird-files >${cwd}/tmp/restored +cd ${cwd} +grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null +rstat=$? +diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! Weird files test failed!!! !!!!! " + echo " !!!!! Weird files test failed!!! !!!!! " >>test.out + echo " " +else + echo " ===== Weird files test OK ===== " + echo " ===== Weird files test OK ===== " >>test.out + cd ${cwd} + scripts/cleanup +fi diff --git a/regress/tests/weird-files2-test b/regress/tests/weird-files2-test new file mode 100755 index 0000000000..a618c4e4c0 --- /dev/null +++ b/regress/tests/weird-files2-test @@ -0,0 +1,84 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory +# then restore it. +# +if test ! -d weird-files ; then + echo " " + echo "weird files not configured. Test not run." + exit 0 +fi +cwd=`pwd` +scripts/copy-test-confs +scripts/cleanup +rm -rf weird-files2 +cp -a weird-files weird-files2 +echo "${cwd}/weird-files2" >/tmp/file-list +bin/bacula stop 2>&1 >/dev/null +bin/drop_sqlite_tables +bin/make_sqlite_tables + +echo " " +echo " " +echo " === Starting weird filenames2 test ===" +echo " === Starting weird filenames2 test ===" >>working/log +echo " " + +bin/testls weird-files2 >${cwd}/tmp/original +bin/bacula start 2>&1 >/dev/null +bin/console -c bin/console.conf <&1 >/dev/null +bin/testls weird-files2 >${cwd}/tmp/restored +grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null +rstat=$? +diff ${cwd}/tmp/original ${cwd}/tmp/restored 2>&1 >/dev/null +if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then + echo " " + echo " " + echo " !!!!! Weird files2 test failed!!! !!!!! " + echo " !!!!! Weird files2 test failed!!! !!!!! " >>test.out + echo " " +else + echo " ===== Weird files2 test OK ===== " + echo " ===== Weird files2 test OK ===== " >>test.out + cd ${cwd} + scripts/cleanup + rm -rf weird-files2 +fi diff --git a/regress/weird-files.tar.gz b/regress/weird-files.tar.gz new file mode 100644 index 0000000000..0ecbe3fc72 Binary files /dev/null and b/regress/weird-files.tar.gz differ