From: Kern Sibbald Date: Fri, 19 Oct 2007 08:46:21 +0000 (+0000) Subject: Apply Michael Short's patch X-Git-Tag: Release-3.0.0~2366 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=33cf76c5135c8ec666cfcabb3a421810a9dcefc4;p=bacula%2Fbacula Apply Michael Short's patch git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5768 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/all-non-root-tests b/regress/all-non-root-tests index d25c3b5d3a..2f88050a64 100755 --- a/regress/all-non-root-tests +++ b/regress/all-non-root-tests @@ -61,7 +61,7 @@ echo "End non-root disk tests" >>test.out echo " " echo " " >>test.out echo "Start non-root virtual disk autochanger tests" -echo "Start non-root virtual disk autochangertests" >>test.out +echo "Start non-root virtual disk autochanger tests" >>test.out #nice tests/three-pool-recycle-test nice tests/two-pool-test nice tests/fast-two-pool-test @@ -74,4 +74,4 @@ nice tests/incremental-2media nice tests/three-pool-test nice tests/2drive-3pool-test echo "End non-root virtual disk autochanger tests" -echo "End non-root virtual disk autochangertests" >>test.out +echo "End non-root virtual disk autochanger tests" >>test.out diff --git a/regress/win32/all-non-root-2tape-tests.cmd b/regress/win32/all-non-root-2tape-tests.cmd index 28ba14eb59..e23bbaa39d 100644 --- a/regress/win32/all-non-root-2tape-tests.cmd +++ b/regress/win32/all-non-root-2tape-tests.cmd @@ -1,11 +1,9 @@ REM REM Run all tape tests REM -CALL tests\test0 +ECHO Start two tape tests +ECHO Start two tape tests >>test.out CALL tests\two-volume-tape CALL tests\incremental-2tape -ECHO. -ECHO. -echo 2 Tape Test results -TYPE test.out -CALL scripts\cleanup +ECHO End two tape tests +ECHO End two tape tests >>test.out diff --git a/regress/win32/all-non-root-tape-tests.cmd b/regress/win32/all-non-root-tape-tests.cmd index 5eec40d7bb..0ec392b462 100644 --- a/regress/win32/all-non-root-tape-tests.cmd +++ b/regress/win32/all-non-root-tape-tests.cmd @@ -3,8 +3,11 @@ REM Run all tape tests REM CALL config_var IF NOT "%AUTOCHANGER%" == "nul" mtx -f %AUTOCHANGER% load 1 >nul 2>&1 -COPY test.out test1.out -CALL tests\test0 +ECHO. +ECHO. >>test.out +ECHO Start all non-root tape tests +ECHO Start all non-root tape tests >>test.out +REM CALL tests\ansi-label-tape CALL tests\backup-bacula-tape CALL tests\btape-fill-tape CALL tests\fixed-block-size-tape @@ -19,8 +22,5 @@ CALL tests\two-pool-tape CALL tests\2drive-incremental-2tape CALL tests\bscan-tape CALL tests\verify-vol-tape -ECHO. -ECHO. -ECHO Test results -TYPE test.out -CALL scripts\cleanup +ECHO End all non-root tape tests +ECHO End all non-root tape tests >>test.out diff --git a/regress/win32/all-non-root-tests.cmd b/regress/win32/all-non-root-tests.cmd index 522c247518..5c5a036ee4 100644 --- a/regress/win32/all-non-root-tests.cmd +++ b/regress/win32/all-non-root-tests.cmd @@ -1,17 +1,29 @@ REM REM Run all tests REM -DEL test1.out -CALL tests\test0 ECHO. +ECHO. >>test.out +ECHO Start non-root disk tests +ECHO Start non-root disk tests >>test.out CALL tests\auto-label-test CALL tests\backup-bacula-test CALL tests\bextract-test +REM CALL tests\big-vol-test CALL tests\bscan-test CALL tests\bsr-opt-test CALL tests\compressed-test +REM CALL tests\compress-encrypt-test CALL tests\concurrent-jobs-test CALL tests\data-encrypt-test +REM CALL tests\encrypt-bug-test +REM CALL tests\fifo-test +REM CALL tests\backup-to-null +REM CALL tests\regexwhere-test +REM The following two can uses *lots* of disk space +REM so they are normally turned off, but if you have +REM at least two GB free, you can run them +REM CALL tests\sparse-encrypt-test +REM CALL tests\gigaslam-sparse-test CALL tests\differential-test CALL tests\four-concurrent-jobs-test CALL tests\four-jobs-test @@ -21,8 +33,11 @@ CALL tests\recycle-test CALL tests\restore2-by-file-test CALL tests\restore-by-file-test CALL tests\restore-disk-seek-test +REM CALL tests\runscript-test CALL tests\six-vol-test CALL tests\span-vol-test +REM CALL tests\maxvol-test +REM CALL tests\maxvol2-test CALL tests\sparse-compressed-test CALL tests\sparse-test CALL tests\two-jobs-test @@ -35,16 +50,25 @@ CALL tests\migration-jobspan-test CALL tests\migration-volume-test CALL tests\migration-time-test REM CALL tests\hardlink-test +REM CALL tests\tls-test +ECHO End non-root disk tests +ECHO End non-root disk tests >>test.out + REM REM The following are Virtual Disk Autochanger tests +ECHO. +ECHO. >>test.out +ECHO Start non-root virtual disk autochanger tests +ECHO Start non-root virtual disk autochanger tests >>test.out +REM CALL tests\three-pool-recycle-test CALL tests\two-pool-test +REM CALL tests\fast-two-pool-test CALL tests\two-volume-test CALL tests\incremental-2disk -CALL tests\2drive-3pool-test.cmd -CALL tests\2drive-concurrent-test.cmd CALL tests\2drive-incremental-2disk CALL tests\scratch-pool-test -ECHO. -ECHO Test results -TYPE test.out -CALL scripts\cleanup +CALL tests\2drive-concurrent-test.cmd +REM CALL tests\incremental-2media +REM CALL tests\three-pool-test +ECHO End non-root virtual disk autochanger tests +ECHO End non-root virtual disk autochanger tests >>test.out diff --git a/regress/win32/all-root-tests.cmd b/regress/win32/all-root-tests.cmd index 20061b1768..829d9f48a7 100644 --- a/regress/win32/all-root-tests.cmd +++ b/regress/win32/all-root-tests.cmd @@ -1,10 +1,13 @@ REM REM Run all root tests REM -DEL test.out +ECHO. +ECHO. >>test.out +ECHO Start root tests +ECHO Start root tests >>test.out CALL tests\dev-test-root CALL tests\etc-test-root CALL tests\lib-test-root CALL tests\usr-tape-root -TYPE test.out -CALL scripts\cleanup +ECHO End root tests +ECHO End root tests >>test.out diff --git a/regress/win32/all-tests.cmd b/regress/win32/all-tests.cmd index 62ffa6e940..9aac351024 100644 --- a/regress/win32/all-tests.cmd +++ b/regress/win32/all-tests.cmd @@ -3,5 +3,3 @@ REM Run all tests REM CALL all-non-root-tests CALL all-root-tests -TYPE test.out -CALL scripts\cleanup diff --git a/regress/win32/do_all.cmd b/regress/win32/do_all.cmd new file mode 100644 index 0000000000..20001d4e14 --- /dev/null +++ b/regress/win32/do_all.cmd @@ -0,0 +1,2 @@ +CALL make setup +CALL do_all_tests diff --git a/regress/win32/do_all_tapes.cmd b/regress/win32/do_all_tapes.cmd new file mode 100644 index 0000000000..1a18230ac8 --- /dev/null +++ b/regress/win32/do_all_tapes.cmd @@ -0,0 +1,2 @@ +CALL make setup +CALL all-non-root-tape-tests diff --git a/regress/win32/do_all_tests.cmd b/regress/win32/do_all_tests.cmd new file mode 100644 index 0000000000..660eaff386 --- /dev/null +++ b/regress/win32/do_all_tests.cmd @@ -0,0 +1,17 @@ +python starttime.py +IF NOT EXIST bin\tape_options touch bin/tape_options +ECHO. >test.out +TYPE build/config.out >>test.out +ECHO. >>test.out +ECHO Test results >>test.out +ECHO. >>test.out +python starttime.py +CALL all-non-root-tests +CALL all-non-root-tape-tests +CALL all-non-root-2tape-tests +ECHO. +ECHO End do_all tests +ECHO End do_all tests >>test.out +CALL scripts/cleanup +TYPE test.out +python endtime.py diff --git a/regress/win32/do_file.cmd b/regress/win32/do_file.cmd new file mode 100644 index 0000000000..ac2907083a --- /dev/null +++ b/regress/win32/do_file.cmd @@ -0,0 +1,15 @@ +REM /home/kern/bacula/bin/startmysql +CALL make setup +ECHO. >test.out +TYPE build/config.out >>test.out +ECHO. >>test.out +ECHO Test results >>test.out +ECHO. >>test.out +python starttime.py +CALL all-non-root-tests +ECHO. +ECHO End do_file tests +ECHO End do_file tests >>test.out +CALL scripts/cleanup +TYPE test.out +python endtime.py diff --git a/regress/win32/encrypt-bug.jpg b/regress/win32/encrypt-bug.jpg new file mode 100644 index 0000000000..18825f97ba Binary files /dev/null and b/regress/win32/encrypt-bug.jpg differ diff --git a/regress/win32/encrypt-bug.txt b/regress/win32/encrypt-bug.txt new file mode 100644 index 0000000000..242da52c70 --- /dev/null +++ b/regress/win32/encrypt-bug.txt @@ -0,0 +1,49 @@ +-----BEGIN PGP MESSAGE----- +Charset: ISO-8859-1 +Version: GnuPG v1.4.2 (FreeBSD) +Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org + +hQIOA/nlxaD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ms3PwYQ9E9vtfQ7ABOk4LnyEprJ/zOokEuG2cGwHr7EGMc +5xx7bWLbtxORLl4TffVvseZJD7Rjejdu+P0nV9I85dCFhhUrno+TvP2BJhLvT/x0 +tiRqTMtFrEsvfDFg6j3zbmi6U/nqtRl2Iamb6ACaBVGXeXcSZqLcizaEdxq7aXqX +GIUWMeXTvWtYE9et/3NJrRm6Eo2IOQO6J0OnUvsuBc+i0pZaIi7WVnDBDMgojXXa +yRNRgm4jtwT+5KWi8QA6owXgDhjWH+dILSWTE8Q7V7grlRp4C42STtvtXmwuIDws +sb72EmQs3IkKylS7Nk6mZwhDK8Wjo6olUjS8PceWDVWLOII+hcHiuGSZXZyy7Bwg +mfswd8sqIaWPDkYwlsBq82yRS4YV224pBBxqiT3o14LqCQ56Er3ZaogGfKiL0mpJ +Lu3fpivt/HslXbumQeggeFfhn6Z/Otbr1EGrvcslPEPLehpEfks/2syF9vfqLaFp ++spDOiRKBUg= +=W5Nc +-----END PGP MESSAGE----- \ No newline at end of file diff --git a/regress/win32/encrypt-bug2.txt b/regress/win32/encrypt-bug2.txt new file mode 100644 index 0000000000..ef110a6c95 --- /dev/null +++ b/regress/win32/encrypt-bug2.txt @@ -0,0 +1,75 @@ +From: "Michel Meyers" +To: "bacula-users" +Subject: [Bacula-users] Script for pushing new clients to Windows boxes +Date: Mon, 2 Feb 2004 16:10:48 +0100 + +Hello, + +Some of you may remember my document on how to remotely push a Win32 bacula +client onto a WinNT/2k/XP box. Well, I've written a script to do it for me +and thought I'd share it with you: +- ---------------------------------------------------------------- +#!/bin/bash +# +# Remote Win32 client upgrade script +# written by Michel Meyers (last update 2006-09-25 11:34) +# +# WARNING: Make sure that no bacula-fd.conf exists in the source directory! +# You will destroy/overwrite all your client's configs if you don't +# be careful with this. +# +# The upgrade function does the following: +# - Shutdown Bacula service on remote machine +# - Wait 30 seconds (to allow proper shutdown) +# - Mount C: drive of remote box +# - Copy new client to remote machine +# - Unmount C; +# - Startup the new Bacula service +# +# To upgrade a machine append the following at the bottom of this file: +# +# SERVERNAME= +# USERNAME= +# PASSWORD= +# upgrade + +upgrade() { +net rpc -S $SERVERNAME -U $USERNAME%"$PASSWORD" service stop bacula +sleep 30 +smbmount //$SERVERNAME/c$ /mnt -o username=$USERNAME,password="$PASSWORD" +cp /home/michel/winbacula/bin/* /mnt/bacula/bin +umount /mnt +net rpc -S $SERVERNAME -U $USERNAME%"$PASSWORD" service start bacula +} + +SERVERNAME=xerxes +USERNAME=administrator +PASSWORD=secret +upgrade + +SERVERNAME=shodan +USERNAME=teh_one +PASSWORD="" +upgrade +- ---------------------------------------------------------------- + +It should be pretty self-explanatory. I'm not good at shell programming and +I don't know whether there's any notion of arrays or 'for' loops that could +make it cleaner so I simply wrote a function which references some variables +and then call that repeatedly (once per machine). You can of course change +the values according to your system and liking (if 30 secs seem to much for +you, just reduce the value after sleep, make sure to check on the paths and +mountpoint /mnt may not be usable on your system, ...) + +Note: The requirements are the same as described in my other document +(Samba-TNG clients among others, otherwise you'll be missing rpcclient). + +Update 2006-09-25: Samba-TNG is no longer required, the 'net' command from +Samba 3 works for starting and stopping services. Paths may need to be +updated with quotation marks as the new Bacula Win32 Installer no longer +installs into C:\bacula but into 'C:\Program Files\bacula' (on English +Windows versions). + + +Enjoy! + diff --git a/regress/win32/endtime.py b/regress/win32/endtime.py new file mode 100644 index 0000000000..c9dcd5c49b --- /dev/null +++ b/regress/win32/endtime.py @@ -0,0 +1,11 @@ +from time import time as now + +t = now() +fn = open('time.out', 'r') +s = fn.readline() +fn.close() +diff = t - float(s) +h = int(diff / 3600) +m = int((diff - h * 3600) / 60) +sec = diff - h * 3600 - m * 60 +print 'Total time = %d:%02d:%02d or %d secs' % (h, m, sec, t - float(s)) diff --git a/regress/win32/file.cmd b/regress/win32/file.cmd new file mode 100644 index 0000000000..93929c2e26 --- /dev/null +++ b/regress/win32/file.cmd @@ -0,0 +1 @@ +CALL all-non-root-tests diff --git a/regress/win32/misc-tests.cmd b/regress/win32/misc-tests.cmd new file mode 100644 index 0000000000..d1f2088364 --- /dev/null +++ b/regress/win32/misc-tests.cmd @@ -0,0 +1,2 @@ +CALL tests\btape-fill-full-tape +CALL tests\eot-fail-tape diff --git a/regress/win32/run.cmd b/regress/win32/run.cmd new file mode 100644 index 0000000000..d1b9fccc85 --- /dev/null +++ b/regress/win32/run.cmd @@ -0,0 +1,2 @@ +bin\bacula start +bin\bacuula -c bin\bconsole.conf diff --git a/regress/win32/starttime.py b/regress/win32/starttime.py new file mode 100644 index 0000000000..5ce19f67dd --- /dev/null +++ b/regress/win32/starttime.py @@ -0,0 +1,5 @@ +from time import time as now + +fn = open('time.out', 'w+') +fn.write('%s' % now()) +fn.close() diff --git a/regress/win32/tape.cmd b/regress/win32/tape.cmd new file mode 100644 index 0000000000..9002f732d0 --- /dev/null +++ b/regress/win32/tape.cmd @@ -0,0 +1 @@ +CALL all-non-root-tape-tests