def METHOD_NAME(self):
    # Generate an error and get an event
    self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
                        (offset * sector_size, sector_size))
    self.vm.qtest("clock_step 10")
    self.do_check_event('img0', offset)
    # I/O errors in the same child: only one event is emitted
    delay = 10
    for i in range(3):
        self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
                            (offset * sector_size, sector_size))
        self.vm.qtest("clock_step %d" % delay)
        self.do_check_event(None)
    # Wait enough so the event is finally emitted
    self.vm.qtest("clock_step %d" % (2 * event_rate))
    self.do_check_event('img0', offset)
    # I/O errors in the same child: all events are emitted
    delay = 2 * event_rate
    for i in range(3):
        self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
                            (offset * sector_size, sector_size))
        self.vm.qtest("clock_step %d" % delay)
        self.do_check_event('img0', offset)
    # I/O errors in different children: all events are emitted
    delay = 10
    for i in range(len(imgs)):
        self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
                            ((offset + i) * sector_size, sector_size))
        self.vm.qtest("clock_step %d" % delay)
        # In fifo mode only errors in the first child are detected
        if i > 0 and self.read_pattern == 'fifo':
            self.do_check_event(None)
        else:
            self.do_check_event('img%d' % i, offset + i)
    # I/O errors in different children: all events are emitted
    delay = 2 * event_rate
    for i in range(len(imgs)):
        self.vm.hmp_qemu_io("drive0", "aio_read %d %d" %
                            ((offset + i) * sector_size, sector_size))
        self.vm.qtest("clock_step %d" % delay)
        # In fifo mode only errors in the first child are detected
        if i > 0 and self.read_pattern == 'fifo':
            self.do_check_event(None)
        else:
            self.do_check_event('img%d' % i, offset + i)
    # No more pending events
    self.do_check_event(None)