3 # Run four concurrent jobs and then cancel 2 of them
6 TestName="cancel-multiple-jobs-test"
7 JobName=concurrent-jobs
12 echo "${cwd}/tmp/largefile" >${cwd}/tmp/file-list
13 if test -c /dev/urandom ; then
14 # Create 56MB file with random data
15 # echo "Creating a 56MB file with random data ..."
16 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000 2>&1 1>/dev/null
18 # echo "Creating a 56MB file with bacula-dir data ..."
19 dd if=$bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000 2>&1 1>/dev/null
20 cat ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 >${cwd}/tmp/2
22 cat ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 >>${cwd}/tmp/3
24 cat ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 >${cwd}/tmp/largefile
28 #echo "largefile created"
30 # Add some jobs and fileset for this test
31 cat <<EOF >>${cwd}/bin/bacula-dir.conf
40 Write Bootstrap = "/home/kern/bacula/k/regress/working/NightlySave.bsr"
41 Maximum Concurrent Jobs = 10
44 Reschedule On Error = no
45 Reschedule Interval = 10
50 ClientRunBeforeJob="sleep 20"
60 change_jobname CompressedTest $JobName
63 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
66 @$out ${cwd}/tmp/log1.out
67 label storage=File volume=TestVolume001
68 run job=RUN4 level=Full yes
69 run job=RUN4 level=Full yes
70 run job=RUN4 level=Full yes
71 run job=RUN4 level=Full yes
80 @$out ${cwd}/tmp/log2.out
81 restore where=${cwd}/tmp/bacula-restores select storage=File
93 check_for_zombie_jobs storage=File
97 diff ${cwd}/tmp/largefile ${cwd}/tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null