3 # Show the broken media bug. Test by Graham Keeling.
5 # For the moment this test will always fail, so do not add
6 # it to the standard test set.
8 # - You begin writing a giant job onto a Volume
9 # - There are no other volumes available for writing (big mistake).
10 # - You start a second job that needs a Volume to write on.
11 # - The second job see that there are no JobMedia records associated with the
12 # Volume (not yet written), so it purges the Volume.
13 # - A sort of chaos then follows.
16 TestName="broken-media-bug-test"
21 /bin/cp -f scripts/broken-media-bug-bacula-dir.conf bin/bacula-dir.conf
22 /bin/cp -f scripts/test-bacula-sd.conf bin/bacula-sd.conf
23 /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf
24 /bin/cp -f scripts/test-console.conf bin/bconsole.conf
25 hugefile=${cwd}/build/hugefile
27 echo "${cwd}/build" >${cwd}/tmp/file-list
31 echo "Creating huge ${hugefilesize}M file..."
32 dd if=/dev/urandom of="$hugefile" bs=1M count="$hugefilesize"
35 cat >tmp/bconcmds <<END_OF_DATA
39 setdebug level=150 storage=File
40 setdebug level=150 Director
41 label storage=File volume=TestVolume0001
42 label storage=File volume=TestVolume0002
50 # Give the first job a bit of time to get going.
53 cat >tmp/bconcmds <<END_OF_DATA
54 setdebug level=150 storage=File
55 setdebug level=150 Director
57 llist volume=TestVolume0001
58 llist volume=TestVolume0002
64 restore fileset=Set1 where=${cwd}/tmp/bacula-restores select all storage=File done
72 check_for_zombie_jobs storage=File