From 21427d27a0781cde066d16d4959b5905ce6d0770 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 29 Sep 2003 15:01:55 +0000 Subject: [PATCH] Changes for FreeBSD and spell weird correctly git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@714 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/.cvsignore | 2 +- regress/all-non-root-tests | 4 +- regress/all-tape-and-file-tests | 4 +- regress/scripts/bacula-sd.conf.in | 74 ++++++++++++++++++++++++++ regress/tests/dev-test-root | 1 + regress/tests/etc-test-root | 1 + regress/tests/lib-test-root | 1 + regress/tests/weird-files-test | 68 ++++++++++++++++++++++++ regress/tests/weird-files2-test | 84 ++++++++++++++++++++++++++++++ regress/weird-files.tar.gz | Bin 0 -> 1510 bytes 10 files changed, 234 insertions(+), 5 deletions(-) create mode 100644 regress/scripts/bacula-sd.conf.in create mode 100755 regress/tests/weird-files-test create mode 100755 regress/tests/weird-files2-test create mode 100644 regress/weird-files.tar.gz 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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