Lines Matching full:self

39     def wait_for_complete(self, need_ready=False):  argument
43 for event in self.vm.get_qmp_events(wait=True):
45 self.assert_qmp_absent(event, 'data/error')
46 self.assert_qmp(event, 'data/type', 'commit')
47 self.assert_qmp(event, 'data/device', 'drive0')
48 self.assert_qmp(event, 'data/offset', event['data']['len'])
50 self.assertTrue(ready, "Expecting BLOCK_JOB_COMPLETED event")
54 self.assert_qmp(event, 'data/type', 'commit')
55 self.assert_qmp(event, 'data/device', 'drive0')
56 self.vm.qmp('block-job-complete', device='drive0')
58 self.assert_no_active_block_jobs()
59 self.vm.shutdown()
61 def run_commit_test(self, top, base, need_ready=False, node_names=False): argument
62 self.assert_no_active_block_jobs()
64 self.vm.cmd('block-commit', device='drive0', top_node=top, base_node=base)
66 self.vm.cmd('block-commit', device='drive0', top=top, base=base)
67 self.wait_for_complete(need_ready)
69 def run_default_commit_test(self): argument
70 self.assert_no_active_block_jobs()
71 self.vm.cmd('block-commit', device='drive0')
72 self.wait_for_complete()
80 def setUp(self): argument
81 iotests.create_image(backing_img, self.image_len)
87 if self.image_len:
91self.vm = iotests.VM().add_drive(test_img, "node-name=top,backing.node-name=mid,backing.backing.no…
92 self.vm.add_device('virtio-scsi')
93 self.vm.add_device("scsi-hd,id=scsi0,drive=drive0")
94 self.vm.launch()
96 def tearDown(self): argument
97 self.vm.shutdown()
102 def test_commit(self): argument
103 self.run_commit_test(mid_img, backing_img)
104 if not self.image_len:
109 def test_commit_node(self): argument
110 self.run_commit_test("mid", "base", node_names=True)
111 if not self.image_len:
117 def test_commit_with_filter_and_quit(self): argument
118 self.vm.cmd('object-add', qom_type='throttle-group', id='tg')
121self.vm.cmd('blockdev-add', driver='throttle', node_name='filter', throttle_group='tg', file='mid')
123 self.vm.cmd('block-commit', device='drive0')
127 self.vm.cmd('quit')
131 def test_commit_plus_filter_and_quit(self): argument
132 self.vm.cmd('object-add', qom_type='throttle-group', id='tg')
134 self.vm.cmd('block-commit', device='drive0')
137self.vm.cmd('blockdev-add', driver='throttle', node_name='filter', throttle_group='tg', file='mid')
141 self.vm.cmd('quit')
143 def test_device_not_found(self): argument
144 result = self.vm.qmp('block-commit', device='nonexistent', top='%s' % mid_img)
145 self.assert_qmp(result, 'error/class', 'DeviceNotFound')
147 def test_top_same_base(self): argument
148 self.assert_no_active_block_jobs()
149 …result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % backing_…
150 self.assert_qmp(result, 'error/class', 'GenericError')
151 self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % backing_img)
153 def test_top_invalid(self): argument
154 self.assert_no_active_block_jobs()
155 … result = self.vm.qmp('block-commit', device='drive0', top='badfile', base='%s' % backing_img)
156 self.assert_qmp(result, 'error/class', 'GenericError')
157 self.assert_qmp(result, 'error/desc', 'Top image file badfile not found')
159 def test_base_invalid(self): argument
160 self.assert_no_active_block_jobs()
161 result = self.vm.qmp('block-commit', device='drive0', top='%s' % mid_img, base='badfile')
162 self.assert_qmp(result, 'error/class', 'GenericError')
163 self.assert_qmp(result, 'error/desc', "Can't find 'badfile' in the backing chain")
165 def test_top_node_invalid(self): argument
166 self.assert_no_active_block_jobs()
167 result = self.vm.qmp('block-commit', device='drive0', top_node='badfile', base_node='base')
168 self.assert_qmp(result, 'error/class', 'GenericError')
169 self.assert_qmp(result, 'error/desc', "Cannot find device='' nor node-name='badfile'")
171 def test_base_node_invalid(self): argument
172 self.assert_no_active_block_jobs()
173 result = self.vm.qmp('block-commit', device='drive0', top_node='mid', base_node='badfile')
174 self.assert_qmp(result, 'error/class', 'GenericError')
175 self.assert_qmp(result, 'error/desc', "Cannot find device='' nor node-name='badfile'")
177 def test_top_path_and_node(self): argument
178 self.assert_no_active_block_jobs()
179 …result = self.vm.qmp('block-commit', device='drive0', top_node='mid', base_node='base', top='%s' %…
180 self.assert_qmp(result, 'error/class', 'GenericError')
181 self.assert_qmp(result, 'error/desc', "'top-node' and 'top' are mutually exclusive")
183 def test_base_path_and_node(self): argument
184 self.assert_no_active_block_jobs()
185 …result = self.vm.qmp('block-commit', device='drive0', top_node='mid', base_node='base', base='%s' …
186 self.assert_qmp(result, 'error/class', 'GenericError')
187 self.assert_qmp(result, 'error/desc', "'base-node' and 'base' are mutually exclusive")
189 def test_top_is_active(self): argument
190 self.run_commit_test(test_img, backing_img, need_ready=True)
191 if not self.image_len:
196 def test_top_is_default_active(self): argument
197 self.run_default_commit_test()
198 if not self.image_len:
203 def test_top_and_base_reversed(self): argument
204 self.assert_no_active_block_jobs()
205 … result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % mid_img)
206 self.assert_qmp(result, 'error/class', 'GenericError')
207 self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % mid_img)
209 def test_top_and_base_node_reversed(self): argument
210 self.assert_no_active_block_jobs()
211 result = self.vm.qmp('block-commit', device='drive0', top_node='base', base_node='top')
212 self.assert_qmp(result, 'error/class', 'GenericError')
213 self.assert_qmp(result, 'error/desc', "'top' is not in this backing file chain")
215 def test_top_node_in_wrong_chain(self): argument
216 self.assert_no_active_block_jobs()
218 self.vm.cmd('blockdev-add', driver='null-co', node_name='null')
220 result = self.vm.qmp('block-commit', device='drive0', top_node='null', base_node='base')
221 self.assert_qmp(result, 'error/class', 'GenericError')
222 self.assert_qmp(result, 'error/desc', "'null' is not in this backing file chain")
226 def test_hot_unplug(self): argument
227 if self.image_len == 0:
230 self.assert_no_active_block_jobs()
231 self.vm.cmd('block-commit', device='drive0', top=mid_img,
232 base=backing_img, speed=(self.image_len // 4))
233 self.vm.cmd('device_del', id='scsi0')
238 for event in self.vm.get_qmp_events(wait=True):
240 self.assert_qmp(event, 'data/device', 'scsi0')
243 self.assert_qmp(event, 'data/device', 'drive0')
246 self.assert_qmp(event, 'data/id', 'drive0')
248 self.fail("Unexpected event %s" % (event['event']))
250 self.assert_no_active_block_jobs()
254 def test_implicit_node(self): argument
255 if self.image_len == 0:
258 self.assert_no_active_block_jobs()
259 self.vm.cmd('block-commit', device='drive0', top=mid_img,
260 base=backing_img, speed=(self.image_len // 4))
262 result = self.vm.qmp('query-block')
263 self.assert_qmp(result, 'return[0]/inserted/file', test_img)
264 self.assert_qmp(result, 'return[0]/inserted/drv', iotests.imgfmt)
265 self.assert_qmp(result, 'return[0]/inserted/backing_file', mid_img)
266 self.assert_qmp(result, 'return[0]/inserted/backing_file_depth', 2)
267 self.assert_qmp(result, 'return[0]/inserted/image/filename', test_img)
268 self.assert_qmp(result, 'return[0]/inserted/image/backing-image/filename', mid_img)
269self.assert_qmp(result, 'return[0]/inserted/image/backing-image/backing-image/filename', backing_i…
271 result = self.vm.qmp('query-blockstats')
272 self.assert_qmp(result, 'return[0]/node-name', 'top')
273 self.assert_qmp(result, 'return[0]/backing/node-name', 'mid')
274 self.assert_qmp(result, 'return[0]/backing/backing/node-name', 'base')
276 self.cancel_and_wait()
277 self.assert_no_active_block_jobs()
294 def setUp(self): argument
296 os.mkdir(os.path.join(iotests.test_dir, self.dir1))
297 os.mkdir(os.path.join(iotests.test_dir, self.dir2))
298 os.mkdir(os.path.join(iotests.test_dir, self.dir3))
302 iotests.create_image(self.backing_img_abs, TestRelativePaths.image_len)
304 '-o', 'backing_file=%s' % self.backing_img_abs,
305 '-F', 'raw', self.mid_img_abs)
307 '-o', 'backing_file=%s' % self.mid_img_abs,
308 '-F', iotests.imgfmt, self.test_img)
309 qemu_img('rebase', '-u', '-b', self.backing_img,
310 '-F', 'raw', self.mid_img_abs)
311 qemu_img('rebase', '-u', '-b', self.mid_img,
312 '-F', iotests.imgfmt, self.test_img)
313 qemu_io('-f', 'raw', '-c', 'write -P 0xab 0 524288', self.backing_img_abs)
314 qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xef 524288 524288', self.mid_img_abs)
315 self.vm = iotests.VM().add_drive(self.test_img)
316 self.vm.launch()
318 def tearDown(self): argument
319 self.vm.shutdown()
320 os.remove(self.test_img)
321 os.remove(self.mid_img_abs)
322 os.remove(self.backing_img_abs)
324 os.rmdir(os.path.join(iotests.test_dir, self.dir1))
325 os.rmdir(os.path.join(iotests.test_dir, self.dir3))
326 os.rmdir(os.path.join(iotests.test_dir, self.dir2))
331 def test_commit(self): argument
332 self.run_commit_test(self.mid_img, self.backing_img)
333 qemu_io('-f', 'raw', '-c', 'read -P 0xab 0 524288', self.backing_img_abs)
334 qemu_io('-f', 'raw', '-c', 'read -P 0xef 524288 524288', self.backing_img_abs)
336 def test_device_not_found(self): argument
337 result = self.vm.qmp('block-commit', device='nonexistent', top='%s' % self.mid_img)
338 self.assert_qmp(result, 'error/class', 'DeviceNotFound')
340 def test_top_same_base(self): argument
341 self.assert_no_active_block_jobs()
342 …result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.mid_img, base='%s' % self.mi…
343 self.assert_qmp(result, 'error/class', 'GenericError')
344 self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % self.mid_img)
346 def test_top_invalid(self): argument
347 self.assert_no_active_block_jobs()
348 … result = self.vm.qmp('block-commit', device='drive0', top='badfile', base='%s' % self.backing_img)
349 self.assert_qmp(result, 'error/class', 'GenericError')
350 self.assert_qmp(result, 'error/desc', 'Top image file badfile not found')
352 def test_base_invalid(self): argument
353 self.assert_no_active_block_jobs()
354 … result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.mid_img, base='badfile')
355 self.assert_qmp(result, 'error/class', 'GenericError')
356 self.assert_qmp(result, 'error/desc', "Can't find 'badfile' in the backing chain")
358 def test_top_is_active(self): argument
359 self.run_commit_test(self.test_img, self.backing_img)
360 qemu_io('-f', 'raw', '-c', 'read -P 0xab 0 524288', self.backing_img_abs)
361 qemu_io('-f', 'raw', '-c', 'read -P 0xef 524288 524288', self.backing_img_abs)
363 def test_top_and_base_reversed(self): argument
364 self.assert_no_active_block_jobs()
365 …result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.backing_img, base='%s' % sel…
366 self.assert_qmp(result, 'error/class', 'GenericError')
367 self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % self.mid_img)
373 def setUp(self): argument
382 self.vm = iotests.VM().add_drive('blkdebug::' + test_img)
383 self.vm.launch()
385 def tearDown(self): argument
386 self.vm.shutdown()
391 def test_set_speed(self): argument
392 self.assert_no_active_block_jobs()
394 self.vm.pause_drive('drive0')
395 self.vm.cmd('block-commit', device='drive0', top=mid_img, speed=1024 * 1024)
398 result = self.vm.qmp('query-block-jobs')
399 self.assert_qmp(result, 'return[0]/device', 'drive0')
400 self.assert_qmp(result, 'return[0]/speed', 1024 * 1024)
402 self.cancel_and_wait(resume=True)
414 def setUp(self): argument
415 iotests.create_image(self.img0, self.image_len)
417 '-o', 'backing_file=%s' % self.img0, '-F', 'raw', self.img1)
419 '-o', 'backing_file=%s' % self.img1,
420 '-F', iotests.imgfmt, self.img2)
422 '-o', 'backing_file=%s' % self.img2,
423 '-F', iotests.imgfmt, self.img3)
424 qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xab 0 128K', self.img1)
425 self.vm = iotests.VM().add_drive(self.img3)
426 self.vm.launch()
428 def tearDown(self): argument
429 self.vm.shutdown()
430 os.remove(self.img0)
431 os.remove(self.img1)
432 os.remove(self.img2)
433 os.remove(self.img3)
438 def test_reopen_overlay(self): argument
439 self.run_commit_test(self.img1, self.img0)
444 def setUp(self): argument
445 iotests.create_image(backing_img, self.image_len)
456 self.vm = iotests.VM()
457 self.vm.launch()
459 self.blkdebug_file = iotests.file_path("blkdebug.conf")
461 def tearDown(self): argument
462 self.vm.shutdown()
467 def blockdev_add(self, **kwargs): argument
468 self.vm.cmd('blockdev-add', **kwargs)
470 def add_block_nodes(self, base_debug=None, mid_debug=None, top_debug=None): argument
471 self.blockdev_add(node_name='base-file', driver='file',
473 self.blockdev_add(node_name='mid-file', driver='file',
475 self.blockdev_add(node_name='top-file', driver='file',
479 self.blockdev_add(node_name='base-dbg', driver='blkdebug',
482 self.blockdev_add(node_name='mid-dbg', driver='blkdebug',
485 self.blockdev_add(node_name='top-dbg', driver='blkdebug',
488 self.blockdev_add(node_name='base-fmt', driver='raw',
490 self.blockdev_add(node_name='mid-fmt', driver=iotests.imgfmt,
493 self.blockdev_add(node_name='top-fmt', driver=iotests.imgfmt,
497 def run_job(self, expected_events, error_pauses_job=False): argument
509 ev = self.vm.events_wait(events, timeout=5.0)
514 self.vm.cmd('block-job-resume', device='job0')
516 self.vm.cmd('block-job-complete', device='job0')
518 self.fail("Unexpected event: %s" % ev)
521 self.maxDiff = None
522 self.assertEqual(expected_events, log)
524 def event_error(self, op, action): argument
531 def event_ready(self): argument
542 def event_completed(self, errmsg=None, active=True): argument
543 max_len = 524288 if active else self.image_len
560 def blkdebug_event(self, event, is_raw=False): argument
569 def prepare_and_start_job(self, on_error, active=True, argument
572 top_debug = self.blkdebug_event(top_event)
573 mid_debug = self.blkdebug_event(mid_event)
574 base_debug = self.blkdebug_event(base_event, True)
576 self.add_block_nodes(top_debug=top_debug, mid_debug=mid_debug,
579 self.vm.cmd('block-commit', job_id='job0', device='top-fmt',
584 def testActiveReadErrorReport(self): argument
585 self.prepare_and_start_job('report', top_event='read_aio')
586 self.run_job([
587 self.event_error('read', 'report'),
588 self.event_completed('Input/output error')
591 self.vm.shutdown()
592 self.assertFalse(iotests.compare_images(test_img, mid_img),
595 def testActiveReadErrorStop(self): argument
596 self.prepare_and_start_job('stop', top_event='read_aio')
597 self.run_job([
598 self.event_error('read', 'stop'),
599 self.event_ready(),
600 self.event_completed()
603 self.vm.shutdown()
604 self.assertTrue(iotests.compare_images(test_img, mid_img),
607 def testActiveReadErrorIgnore(self): argument
608 self.prepare_and_start_job('ignore', top_event='read_aio')
609 self.run_job([
610 self.event_error('read', 'ignore'),
611 self.event_ready(),
612 self.event_completed()
616 self.vm.shutdown()
617 self.assertTrue(iotests.compare_images(test_img, mid_img),
620 def testActiveWriteErrorReport(self): argument
621 self.prepare_and_start_job('report', mid_event='write_aio')
622 self.run_job([
623 self.event_error('write', 'report'),
624 self.event_completed('Input/output error')
627 self.vm.shutdown()
628 self.assertFalse(iotests.compare_images(test_img, mid_img),
631 def testActiveWriteErrorStop(self): argument
632 self.prepare_and_start_job('stop', mid_event='write_aio')
633 self.run_job([
634 self.event_error('write', 'stop'),
635 self.event_ready(),
636 self.event_completed()
639 self.vm.shutdown()
640 self.assertTrue(iotests.compare_images(test_img, mid_img),
643 def testActiveWriteErrorIgnore(self): argument
644 self.prepare_and_start_job('ignore', mid_event='write_aio')
645 self.run_job([
646 self.event_error('write', 'ignore'),
647 self.event_ready(),
648 self.event_completed()
652 self.vm.shutdown()
653 self.assertTrue(iotests.compare_images(test_img, mid_img),
656 def testIntermediateReadErrorReport(self): argument
657 self.prepare_and_start_job('report', active=False, mid_event='read_aio')
658 self.run_job([
659 self.event_error('read', 'report'),
660 self.event_completed('Input/output error', active=False)
663 self.vm.shutdown()
664 self.assertFalse(iotests.compare_images(mid_img, backing_img, fmt2='raw'),
667 def testIntermediateReadErrorStop(self): argument
668 self.prepare_and_start_job('stop', active=False, mid_event='read_aio')
669 self.run_job([
670 self.event_error('read', 'stop'),
671 self.event_completed(active=False)
674 self.vm.shutdown()
675 self.assertTrue(iotests.compare_images(mid_img, backing_img, fmt2='raw'),
678 def testIntermediateReadErrorIgnore(self): argument
679 self.prepare_and_start_job('ignore', active=False, mid_event='read_aio')
680 self.run_job([
681 self.event_error('read', 'ignore'),
682 self.event_completed(active=False)
686 self.vm.shutdown()
687 self.assertTrue(iotests.compare_images(mid_img, backing_img, fmt2='raw'),
690 def testIntermediateWriteErrorReport(self): argument
691 self.prepare_and_start_job('report', active=False, base_event='write_aio')
692 self.run_job([
693 self.event_error('write', 'report'),
694 self.event_completed('Input/output error', active=False)
697 self.vm.shutdown()
698 self.assertFalse(iotests.compare_images(mid_img, backing_img, fmt2='raw'),
701 def testIntermediateWriteErrorStop(self): argument
702 self.prepare_and_start_job('stop', active=False, base_event='write_aio')
703 self.run_job([
704 self.event_error('write', 'stop'),
705 self.event_completed(active=False)
708 self.vm.shutdown()
709 self.assertTrue(iotests.compare_images(mid_img, backing_img, fmt2='raw'),
712 def testIntermediateWriteErrorIgnore(self): argument
713 self.prepare_and_start_job('ignore', active=False, base_event='write_aio')
714 self.run_job([
715 self.event_error('write', 'ignore'),
716 self.event_completed(active=False)
720 self.vm.shutdown()
721 self.assertTrue(iotests.compare_images(mid_img, backing_img, fmt2='raw'),
730 def do_test_io(self, read_or_write): argument
731 for index, pattern_file in enumerate(self.pattern_files):
738 def setUp(self): argument
739 qemu_img('create', '-f', iotests.imgfmt, self.img0, '64M')
740 qemu_img('create', '-f', iotests.imgfmt, self.img1, '64M')
741 qemu_img('create', '-f', iotests.imgfmt, self.img2, '64M')
742 qemu_img('create', '-f', iotests.imgfmt, self.img3, '64M')
747 self.pattern_files = [self.img0, self.img1, self.img2, self.img3]
749 self.do_test_io('write')
751 self.vm = iotests.VM().add_device('virtio-scsi,id=vio-scsi')
752 self.vm.launch()
754 self.vm.cmd('object-add', qom_type='throttle-group', id='tg')
756 self.vm.cmd('blockdev-add', {
765 'filename': self.img3
772 'filename': self.img2
779 'filename': self.img1
790 'filename': self.img0
799 def tearDown(self): argument
800 self.vm.shutdown()
801 self.do_test_io('read')
803 os.remove(self.img3)
804 os.remove(self.img2)
805 os.remove(self.img1)
806 os.remove(self.img0)
809 # self.imgX to get them
810 def get_filename(self, node): argument
811 return self.vm.node_info(node)['image']['filename']
813 def test_filterless_commit(self): argument
814 self.vm.cmd('block-commit',
819 backing_file=self.img1)
820 self.wait_until_completed(drive='commit')
822 self.assertIsNotNone(self.vm.node_info('cow-3'))
823 self.assertIsNone(self.vm.node_info('cow-2'))
824 self.assertIsNotNone(self.vm.node_info('cow-1'))
827 self.pattern_files[2] = self.img1
829 def test_commit_through_filter(self): argument
830 self.vm.cmd('block-commit',
835 backing_file=self.img0)
836 self.wait_until_completed(drive='commit')
838 self.assertIsNotNone(self.vm.node_info('cow-2'))
839 self.assertIsNone(self.vm.node_info('cow-1'))
840 self.assertIsNone(self.vm.node_info('bottom-filter'))
841 self.assertIsNotNone(self.vm.node_info('cow-0'))
844 self.pattern_files[1] = self.img0
846 def test_filtered_active_commit_with_filter(self): argument
850 self.vm.cmd('device_add', id='drv0', driver='scsi-hd',
855 result = self.vm.qmp('blockdev-del', node_name='top-filter')
856 self.assert_qmp(result, 'error/class', 'GenericError')
857 self.assert_qmp(result, 'error/desc', 'Node top-filter is in use')
859 self.vm.cmd('block-commit',
863 self.complete_and_wait(drive='commit')
866 self.vm.cmd('blockdev-del', node_name='top-filter')
868 self.assertIsNone(self.vm.node_info('top-filter'))
869 self.assertIsNone(self.vm.node_info('cow-3'))
870 self.assertIsNotNone(self.vm.node_info('cow-2'))
873 blockdevs = self.vm.qmp('query-block')['return']
875 self.assertEqual(drv0['inserted']['node-name'], 'cow-2')
878 self.pattern_files[3] = self.img2
880 def test_filtered_active_commit_without_filter(self): argument
881 self.vm.cmd('block-commit',
886 self.complete_and_wait(drive='commit')
888 self.assertIsNotNone(self.vm.node_info('top-filter'))
889 self.assertIsNone(self.vm.node_info('cow-3'))
890 self.assertIsNotNone(self.vm.node_info('cow-2'))
893 self.pattern_files[3] = self.img2
900 def setUp(self): argument
901 qemu_img('create', '-f', iotests.imgfmt, self.img_base_a, '1M')
902 qemu_img('create', '-f', iotests.imgfmt, self.img_base_b, '1M')
903 qemu_img('create', '-f', iotests.imgfmt, '-b', self.img_base_a,
904 '-F', iotests.imgfmt, self.img_top)
906 self.vm = iotests.VM()
907 self.vm.launch()
910 self.vm.cmd('blockdev-add', {
915 'filename': self.img_top
922 'filename': self.img_base_b
927 def tearDown(self): argument
928 self.vm.shutdown()
929 os.remove(self.img_top)
930 os.remove(self.img_base_a)
931 os.remove(self.img_base_b)
933 def test_commit_to_a(self): argument
936 result = self.vm.qmp('block-commit',
939 base=self.img_base_a)
940 self.assert_qmp(result, 'error/class', 'GenericError')
942 def test_commit_to_b(self): argument
945 self.vm.cmd('block-commit',
948 base=self.img_base_b)
950 self.vm.event_wait('BLOCK_JOB_READY')
951 self.vm.qmp('block-job-complete', device='commit')
952 self.vm.event_wait('BLOCK_JOB_COMPLETED')