]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/four-concurrent-jobs-tape
Pull regression truncate-test from Branch-9.1
[bacula/bacula] / regress / tests / four-concurrent-jobs-tape
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Run four jobs at the same time
9 #
10 TestName="four-concurrent-jobs-tape"
11 JobName=FourConcurrentJobs
12 . scripts/functions
13
14 require_tape_drive
15
16 scripts/cleanup-tape
17 scripts/copy-tape-confs
18
19 echo "${cwd}/build" >${cwd}/tmp/file-list
20
21 change_jobname $JobName
22 start_test
23
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @$out /dev/null
26 messages
27 @$out ${cwd}/tmp/log1.out
28 label storage=tape volume=TestVolume001 slot=0 pool=Default
29 run job=$JobName level=Full Storage=tape yes
30 run job=$JobName level=Full Storage=tape yes
31 run job=$JobName level=Full Storage=tape yes
32 run job=$JobName level=Full Storage=tape yes
33 @sleep 2
34 status dir
35 @sleep 5
36 status dir
37 status storage=tape
38 messages
39 wait
40 messages
41 @$out ${cwd}/tmp/jobmedia.out
42 list volumes
43 sql
44 select JobId,MediaId,StartFile,StartBlock,EndFile,EndBlock from JobMedia;
45
46 @# 
47 @# now do a restore
48 @#
49 @$out ${cwd}/tmp/log2.out
50 restore where=${cwd}/tmp/bacula-restores select storage=tape
51 unmark *
52 mark *
53 done
54 yes
55 wait
56 messages
57 quit
58 END_OF_DATA
59
60 run_bacula
61 check_for_zombie_jobs storage=tape
62 stop_bacula
63
64 check_two_logs
65 check_restore_diff
66 end_test