3 # Run two jobs at the same time
6 scripts/copy-test-confs
8 echo "${cwd}/tmp/largefile" >/tmp/file-list
9 if test -c /dev/urandom ; then
10 # Create 56MB file with random data
11 echo "Creating a 56MB file with random data ..."
12 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
14 echo "Creating a 56MB file with bacula-dir data ..."
15 dd if=bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000
16 cat ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 >${cwd}/tmp/2
18 cat ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 >>${cwd}/tmp/3
20 cat ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 >${cwd}/tmp/largefile
24 echo "largefile created"
28 echo " === Starting concurrent-jobs-test at `date +%R:%S` ==="
29 echo " === Starting concurrent-jobs-test at `date +%R:%S` ===" >>working/log
32 bin/bacula start 2>&1 >/dev/null
33 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
37 label storage=File volume=TestVolume001
38 run job=CompressedTest level=Full yes
39 run job=CompressedTest level=Full yes
40 run job=CompressedTest level=Full yes
41 run job=CompressedTest level=Full yes
48 restore where=${cwd}/tmp/bacula-restores select storage=File
58 scripts/check_for_zombie_jobs storage=File
60 bin/bacula stop 2>&1 >/dev/null
61 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
63 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
65 diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
66 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
69 echo " !!!!! concurrent-jobs-test Bacula source failed!!! !!!!! "
70 echo " !!!!! concurrent-jobs-test failed!!! !!!!! " >>test.out
71 if [ $bstat != 0 -o $rstat != 0 ] ; then
72 echo " !!!!! Bad Job termination status !!!!! "
73 echo " !!!!! Bad Job termination status !!!!! " >>test.out
75 echo " !!!!! Restored files differ !!!!! "
76 echo " !!!!! Restored files differ !!!!! " >>test.out
80 echo " ===== concurrent-jobs-test Bacula source OK ===== "
81 echo " ===== concurrent-jobs-test OK ===== " >>test.out