From 6cd5e3bb1012e47849e98fe910073ea4f283f54a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 28 Oct 2008 22:54:37 +0000 Subject: [PATCH] Updates git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7929 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/do_sed | 2 +- regress/scripts/new-test-bacula-dir.conf.in | 3 +- regress/tests/accurate-test | 6 ++ regress/tests/incremental-test | 2 + regress/tests/verify-voltocat-test | 62 +++++++++++++++++++++ 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100755 regress/tests/verify-voltocat-test diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 1533b90d1f..bdc5d4a6db 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -63,7 +63,6 @@ sed -f ${out} ${cwd}/scripts/bconsole-2d.conf.in >${cwd}/scripts/bconsole-2d.con sed -f ${out} ${cwd}/scripts/regress-config.in >${cwd}/scripts/regress-config chmod 755 ${cwd}/scripts/regress-config -scripts/config_dart # These files have no fancy sed stuff, so we just copy them over cp scripts/win32-bacula-sd-tape.conf.in scripts/win32-bacula-sd-tape.conf @@ -78,6 +77,7 @@ sed "s%^MTX.*$%MTX=${AUTOCHANGER_PATH}%g" ${cwd}/tmp/bac$$ >${cwd}/bin/mtx-chang chmod 755 ${cwd}/bin/mtx-changer ${cwd}/scripts/prepare-fake-autochanger scripts/set_tape_options +scripts/config_dart rm -f ${out} rm -f ${cwd}/tmp/bac$$ diff --git a/regress/scripts/new-test-bacula-dir.conf.in b/regress/scripts/new-test-bacula-dir.conf.in index 4d82e67f01..774eaf3c33 100644 --- a/regress/scripts/new-test-bacula-dir.conf.in +++ b/regress/scripts/new-test-bacula-dir.conf.in @@ -188,7 +188,8 @@ Job { FileSet { Name = "Full Set" Include { - Options { signature=MD5; sparse=yes } + Options { signature=MD5; sparse=yes; + verify=pins5 } File = <@tmpdir@/file-list } } diff --git a/regress/tests/accurate-test b/regress/tests/accurate-test index 1de8294ad1..b2211d3fdc 100755 --- a/regress/tests/accurate-test +++ b/regress/tests/accurate-test @@ -60,6 +60,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done yes wait @@ -190,6 +191,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done yes wait @@ -222,6 +224,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done yes wait @@ -289,6 +292,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore fileset=FS_TESTJOB where=${cwd}/tmp/bacula-restores select all done yes wait @@ -321,6 +325,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore fileset=FS_TESTJOB_ADVANCE where=${cwd}/tmp/bacula-restores select all done yes wait @@ -353,6 +358,7 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore fileset=FS_TESTJOB_ADVANCE where=${cwd}/tmp/bacula-restores select all done yes wait diff --git a/regress/tests/incremental-test b/regress/tests/incremental-test index 230508abce..f41a84fe3e 100755 --- a/regress/tests/incremental-test +++ b/regress/tests/incremental-test @@ -150,9 +150,11 @@ messages @# now do a restore @# @$out ${cwd}/tmp/log2.out +setdebug level=10 storage=File restore where=${cwd}/tmp/bacula-restores storage=File file=<${cwd}/tmp/restore-list yes wait +status storage=File messages @output quit diff --git a/regress/tests/verify-voltocat-test b/regress/tests/verify-voltocat-test new file mode 100755 index 0000000000..1cf26d7baa --- /dev/null +++ b/regress/tests/verify-voltocat-test @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory +# then verify the Volume to the catalog. +# This test should not be in the normal tests run since it +# requires creating a mount point. +# +# To run this test +# cd regress +# mkdir xx +# mkdir xx/boot +# mount -t ext3 /dev/sda1 xx/boot +# (where /dev/sda1 is your boot partion, or some other small partition) +# cp regress/* xx +# +TestName="verify-voltocat-test" +JobName=VerifyVol +. scripts/functions + +cwd=`pwd` +scripts/cleanup +scripts/copy-test-confs +echo "${cwd}/xx" >${cwd}/tmp/file-list +echo "${cwd}/xx/boot" >>${cwd}/tmp/file-list + +change_jobname NightlySave $JobName +start_test + +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log1.out +setdebug level=1 storage=File sd +label storage=File volume=TestVolume001 +run job=$JobName yes +wait +messages +@# +@# now do a verify to catalog +@# +@$out ${cwd}/tmp/log2.out +setdebug level=12 dir +run job=VerifyVolume level=VolumeToCatalog +yes +wait +messages +@$out +quit +END_OF_DATA + +run_bacula + +sleep 2 +check_for_zombie_jobs storage=File +stop_bacula + +grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null +bstat=$? +grep "^ Termination: *Verify OK" tmp/log2.out 2>&1 >/dev/null +rstat=$? +dstat=0 +end_test -- 2.39.5