From: Kern Sibbald Date: Wed, 28 Feb 2007 17:47:43 +0000 (+0000) Subject: Create fifo backup/restore test X-Git-Tag: Release-7.0.0~6810 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=28957d96b26232d16928084a379a088af5e0ae82;p=bacula%2Fbacula Create fifo backup/restore test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4283 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index e93a5a5d43..60e233ca33 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -15,6 +15,7 @@ tests/compress-encrypt-test tests/concurrent-jobs-test tests/data-encrypt-test tests/encrypt-bug-test +tests/fifo-test tests/backup-bacula-fifo # The following two can uses *lots* of disk space # so they are normally turned off, but if you have diff --git a/regress/scripts/cleanup b/regress/scripts/cleanup index 46079e4f1f..d1eaea5040 100755 --- a/regress/scripts/cleanup +++ b/regress/scripts/cleanup @@ -8,7 +8,7 @@ rm -rf tmp/original tmp/bacula-restores tmp/Small* tmp/TestVolume* rm -rf tmp/restored tmp/largefile tmp/bscan.bsr tmp/log*.out rm -rf /tmp/sed_tmp /tmp/file-list rm -rf tmp/build tmp/restore-list tmp/restore2-list -rm -rf tmp/fd.out tmp/dir.out tmp/sd.out +rm -rf tmp/fd.out tmp/dir.out tmp/sd.out tmp/*.jpg rm -rf working/log tmp/TEST-* rm -rf working/*.bsr rm -rf tmp/disk-changer /tmp/disk-changer diff --git a/regress/scripts/new-test-bacula-dir.conf.in b/regress/scripts/new-test-bacula-dir.conf.in index f190724fc3..5114c2dc40 100644 --- a/regress/scripts/new-test-bacula-dir.conf.in +++ b/regress/scripts/new-test-bacula-dir.conf.in @@ -99,6 +99,18 @@ Job { Write Bootstrap = "@working_dir@/NightlySave.bsr" } +Job { + Name = "FIFOTest" + Type = Backup + Client=@hostname@-fd + FileSet="FIFOSet" + Storage = File + Messages = Standard + Pool = Default + Write Bootstrap = "@working_dir@/NightlySave.bsr" +} + + # Backup the catalog database (after the nightly save) Job { @@ -187,6 +199,18 @@ FileSet { } } +FileSet { + Name = "FIFOSet" + Include { + Options { + readfifo = yes + signature=MD5 + } + File = /tmp/file-list + +rm -f /tmp/bfifo +# send a file into the fifo +file=encrypt-bug.jpg +cat ${file} >/tmp/bfifo& + +start_test + +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log1.out +label storage=File1 volume=TestVolume001 +run job=$JobName storage=File1 yes +wait +messages +quit +END_OF_DATA + + +run_bacula + +cat <tmp/bconcmds +@$out /dev/null +messages +@# +@# now do a restore +@# +@$out tmp/log2.out +restore where=${cwd}/tmp/bacula-restores select all storage=File1 done +yes +wait +messages +@$out +quit +END_OF_DATA + +cat tmp/${file} & + +run_bconsole + +check_for_zombie_jobs storage=File1 +stop_bacula + +check_two_logs +diff ${file} tmp/${file} +dstat=$? +end_test