3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Run two jobs at the same time
9 TestName="concurrent-jobs-test"
10 JobName=concurrent-jobs
15 echo "${cwd}/tmp/largefile" >${cwd}/tmp/file-list
16 if test -c /dev/urandom ; then
17 # Create 56MB file with random data
18 # echo "Creating a 56MB file with random data ..."
19 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000 2>&1 1>/dev/null
21 # echo "Creating a 56MB file with bacula-dir data ..."
22 dd if=$bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000 2>&1 1>/dev/null
23 cat ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 >${cwd}/tmp/2
25 cat ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 >>${cwd}/tmp/3
27 cat ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 ${cwd}/tmp/3 >${cwd}/tmp/largefile
31 #echo "largefile created"
33 change_jobname CompressedTest $JobName
36 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
39 @$out ${cwd}/tmp/log1.out
40 label storage=File volume=TestVolume001
41 run job=$JobName level=Full yes
42 run job=$JobName level=Full yes
43 run job=$JobName level=Full yes
44 run job=$JobName level=Full yes
50 @$out ${cwd}/tmp/log2.out
51 restore where=${cwd}/tmp/bacula-restores select storage=File
63 check_for_zombie_jobs storage=File
67 diff ${cwd}/tmp/largefile ${cwd}/tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null