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"
25 bin/bacula stop 2>&1 >/dev/null
27 ./drop_bacula_tables >/dev/null 2>&1
28 ./make_bacula_tables >/dev/null 2>&1
29 ./grant_bacula_privileges 2>&1 >/dev/null
34 echo " === Starting concurrent-jobs-test ==="
35 echo " === Starting concurrent-jobs-test ===" >>working/log
38 bin/bacula start 2>&1 >/dev/null
39 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
43 label storage=File volume=TestVolume001
44 run job=CompressedTest level=Full yes
45 run job=CompressedTest level=Full yes
46 run job=CompressedTest level=Full yes
47 run job=CompressedTest level=Full yes
54 restore where=${cwd}/tmp/bacula-restores select all storage=File
62 bin/bacula stop 2>&1 >/dev/null
63 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
65 grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
67 diff tmp/largefile tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
68 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
71 echo " !!!!! concurrent-jobs-test Bacula source failed!!! !!!!! "
72 echo " !!!!! concurrent-jobs-test failed!!! !!!!! " >>test.out
75 echo " ===== concurrent-jobs-test Bacula source OK ===== "
76 echo " ===== concurrent-jobs-test OK ===== " >>test.out