Am 11.03.2019 um 23:08 hat Markus Armbruster geschrieben:
> qemu-system-FOO's main() acts on command line arguments in its own
> idiosyncratic order.  There's not much method to its madness.
> Whenever we find a case where one kind of command line argument needs
> to refer to something created for another kind later, we rejigger the
> order.
> 
> Block devices get created long after machine properties get processed.
> Therefore, block device machine properties can be created, but not
> set.  No such properties exist.  But the next commit will create some.
> Time to rejigger again: create block devices earlier.
> 
> Signed-off-by: Markus Armbruster <[email protected]>
> Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
> Message-Id: <[email protected]>
> Reviewed-by: Michael S. Tsirkin <[email protected]>

This commit broke qemu-iotests 055. Looks like migration_object_init()
must come before configure_blockdev().

Kevin


(gdb) bt
#0  0x00007f7eb447853f in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f7eb4462895 in __GI_abort () at abort.c:79
#2  0x00007f7eb4462769 in __assert_fail_base
    (fmt=0x7f7eb45c9e90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
assertion=0x5589747e3e67 "current_migration", file=0x5589747e3d85 
"migration/migration.c", line=187, function=<optimized out>) at assert.c:92
#3  0x00007f7eb44709f6 in __GI___assert_fail
    (assertion=assertion@entry=0x5589747e3e67 "current_migration", 
file=file@entry=0x5589747e3d85 "migration/migration.c", line=line@entry=187, 
function=function@entry=0x5589747e59b0 <__PRETTY_FUNCTION__.32386> 
"migrate_get_current") at assert.c:101
#4  0x0000558974513083 in migrate_get_current () at migration/migration.c:187
#5  0x000055897451634d in migrate_get_current () at migration/migration.c:1719
#6  0x000055897451634d in migrate_add_blocker (reason=<optimized out>, 
errp=errp@entry=0x7ffd901f4d10) at migration/migration.c:1715
#7  0x000055897459d941 in vmdk_open (bs=0x55897697a2c0, options=<optimized 
out>, flags=<optimized out>, errp=0x7ffd901f4d70) at block/vmdk.c:1019
#8  0x000055897458d466 in bdrv_open_driver
    (bs=bs@entry=0x55897697a2c0, drv=drv@entry=0x558974d6cfe0 <bdrv_vmdk>, 
node_name=<optimized out>, options=options@entry=0x55897697e560, 
open_flags=139266, errp=errp@entry=0x7ffd901f4e18) at block.c:1279
#9  0x0000558974590cc1 in bdrv_open_common (errp=0x7ffd901f4e18, 
options=0x55897697e560, file=0x5589769295a0, bs=0x55897697a2c0) at block.c:1537
#10 0x0000558974590cc1 in bdrv_open_inherit (filename=<optimized out>, 
    filename@entry=0x558976905490 
"/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img", 
reference=reference@entry=0x0, options=0x55897697e560, 
    options@entry=0x5589768f4750, flags=<optimized out>, flags@entry=0, 
parent=parent@entry=0x0, child_role=child_role@entry=0x0, errp=0x7ffd901f50e0) 
at block.c:2889
#11 0x0000558974591ac1 in bdrv_open
    (filename=filename@entry=0x558976905490 
"/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img", 
reference=reference@entry=0x0, options=options@entry=0x5589768f4750, 
flags=flags@entry=0, errp=errp@entry=0x7ffd901f50e0) at block.c:2982
#12 0x00005589745d6551 in blk_new_open
    (filename=filename@entry=0x558976905490 
"/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img", 
reference=reference@entry=0x0, options=options@entry=0x5589768f4750, 
flags=flags@entry=0, errp=errp@entry=0x7ffd901f50e0) at 
block/block-backend.c:377
#13 0x000055897439f6b3 in blockdev_init
    (file=file@entry=0x558976905490 
"/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img", 
bs_opts=bs_opts@entry=0x5589768f4750, errp=errp@entry=0x7ffd901f50e0)
    at blockdev.c:602
#14 0x00005589743a0524 in drive_new (all_opts=<optimized out>, 
block_default_type=<optimized out>, errp=0x558974dd6310 <error_fatal>) at 
blockdev.c:994
#15 0x00005589743aaba1 in drive_init_func (opaque=<optimized out>, 
opts=<optimized out>, errp=<optimized out>) at vl.c:1163
#16 0x000055897468db7a in qemu_opts_foreach (list=<optimized out>, 
func=0x5589743aab90 <drive_init_func>, opaque=0x558976869228, 
errp=0x558974dd6310 <error_fatal>)
    at util/qemu-option.c:1171
#17 0x0000558974235950 in configure_blockdev (snapshot=0, 
machine_class=0x558976869180, bdo_queue=0x7ffd901f5270) at vl.c:1230
#18 0x0000558974235950 in main (argc=<optimized out>, argv=0x7ffd901f53d8, 
envp=<optimized out>) at vl.c:4282



055 44s ...        [20:21:24] [20:21:52] [failed, exit status 1] - output 
mismatch (see 055.out.bad)
--- /home/kwolf/source/qemu/tests/qemu-iotests/055.out  2018-06-13 
10:33:18.579269839 +0200
+++ /home/kwolf/source/qemu/tests/qemu-iotests/055.out.bad      2019-03-12 
20:21:52.953410878 +0100
@@ -1,5 +1,83 @@
-..............................
+WARNING:qemu:qemu received signal 6: 
/home/kwolf/source/qemu/tests/qemu-iotests/qemu -chardev 
socket,id=mon,path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/tmp6q0miuno/qemu-4146-monitor.sock
 -mon chardev=mon,mode=control -display none -vga none -qtest 
unix:path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/qemu-4146-qtest.sock
 -machine accel=qtest -nodefaults -machine accel=qtest -drive 
if=virtio,id=drive0,file=blkdebug::/home/kwolf/source/qemu/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback
 -drive 
if=none,id=drive1,file=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+WARNING:qemu:qemu received signal 6: 
/home/kwolf/source/qemu/tests/qemu-iotests/qemu -chardev 
socket,id=mon,path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/tmp6q0miuno/qemu-4146-monitor.sock
 -mon chardev=mon,mode=control -display none -vga none -qtest 
unix:path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/qemu-4146-qtest.sock
 -machine accel=qtest -nodefaults -machine accel=qtest -drive 
if=virtio,id=drive0,file=blkdebug::/home/kwolf/source/qemu/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback
 -drive 
if=none,id=drive1,file=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+WARNING:qemu:qemu received signal 6: 
/home/kwolf/source/qemu/tests/qemu-iotests/qemu -chardev 
socket,id=mon,path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/tmppf_qfi2k/qemu-4146-monitor.sock
 -mon chardev=mon,mode=control -display none -vga none -qtest 
unix:path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/qemu-4146-qtest.sock
 -machine accel=qtest -nodefaults -machine accel=qtest -drive 
if=virtio,id=drive0,file=blkdebug::/home/kwolf/source/qemu/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback
 -drive 
if=none,id=drive1,file=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+WARNING:qemu:qemu received signal 6: 
/home/kwolf/source/qemu/tests/qemu-iotests/qemu -chardev 
socket,id=mon,path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/tmppf_qfi2k/qemu-4146-monitor.sock
 -mon chardev=mon,mode=control -display none -vga none -qtest 
unix:path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/qemu-4146-qtest.sock
 -machine accel=qtest -nodefaults -machine accel=qtest -drive 
if=virtio,id=drive0,file=blkdebug::/home/kwolf/source/qemu/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback
 -drive 
if=none,id=drive1,file=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+WARNING:qemu:qemu received signal 6: 
/home/kwolf/source/qemu/tests/qemu-iotests/qemu -chardev 
socket,id=mon,path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/tmpsoykllpm/qemu-4146-monitor.sock
 -mon chardev=mon,mode=control -display none -vga none -qtest 
unix:path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/qemu-4146-qtest.sock
 -machine accel=qtest -nodefaults -machine accel=qtest -drive 
if=virtio,id=drive0,file=blkdebug::/home/kwolf/source/qemu/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback
 -drive 
if=none,id=drive1,file=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+WARNING:qemu:qemu received signal 6: 
/home/kwolf/source/qemu/tests/qemu-iotests/qemu -chardev 
socket,id=mon,path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/tmpsoykllpm/qemu-4146-monitor.sock
 -mon chardev=mon,mode=control -display none -vga none -qtest 
unix:path=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/qemu-4146-qtest.sock
 -machine accel=qtest -nodefaults -machine accel=qtest -drive 
if=virtio,id=drive0,file=blkdebug::/home/kwolf/source/qemu/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback
 -drive 
if=none,id=drive1,file=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/blockdev-target.img,format=vmdk,cache=writeback
+E.E.E.........................
+======================================================================
+ERROR: test_complete_compress_blockdev_backup (__main__.TestDriveCompression)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "055", line 499, in test_complete_compress_blockdev_backup
+    target='drive1')
+  File "055", line 477, in do_test_compress_complete
+    self.do_prepare_drives(format['type'], format['args'], attach_target)
+  File "055", line 474, in do_prepare_drives
+    self.vm.launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 303, in launch
+    self._launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 330, in _launch
+    self._post_launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qtest.py", line 
107, in _post_launch
+    super(QEMUQtestMachine, self)._post_launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 274, in _post_launch
+    self._qmp.accept()
+  File "/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qmp.py", 
line 157, in accept
+    return self.__negotiate_capabilities()
+  File "/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qmp.py", 
line 73, in __negotiate_capabilities
+    raise QMPConnectError
+qemu.qmp.QMPConnectError
+
+======================================================================
+ERROR: test_compress_cancel_blockdev_backup (__main__.TestDriveCompression)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "055", line 523, in test_compress_cancel_blockdev_backup
+    target='drive1')
+  File "055", line 502, in do_test_compress_cancel
+    self.do_prepare_drives(format['type'], format['args'], attach_target)
+  File "055", line 474, in do_prepare_drives
+    self.vm.launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 303, in launch
+    self._launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 330, in _launch
+    self._post_launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qtest.py", line 
107, in _post_launch
+    super(QEMUQtestMachine, self)._post_launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 274, in _post_launch
+    self._qmp.accept()
+  File "/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qmp.py", 
line 157, in accept
+    return self.__negotiate_capabilities()
+  File "/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qmp.py", 
line 73, in __negotiate_capabilities
+    raise QMPConnectError
+qemu.qmp.QMPConnectError
+
+======================================================================
+ERROR: test_compress_pause_blockdev_backup (__main__.TestDriveCompression)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "055", line 563, in test_compress_pause_blockdev_backup
+    target='drive1')
+  File "055", line 526, in do_test_compress_pause
+    self.do_prepare_drives(format['type'], format['args'], attach_target)
+  File "055", line 474, in do_prepare_drives
+    self.vm.launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 303, in launch
+    self._launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 330, in _launch
+    self._post_launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qtest.py", line 
107, in _post_launch
+    super(QEMUQtestMachine, self)._post_launch()
+  File 
"/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/__init__.py", 
line 274, in _post_launch
+    self._qmp.accept()
+  File "/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qmp.py", 
line 157, in accept
+    return self.__negotiate_capabilities()
+  File "/home/kwolf/source/qemu/tests/qemu-iotests/../../python/qemu/qmp.py", 
line 73, in __negotiate_capabilities
+    raise QMPConnectError
+qemu.qmp.QMPConnectError
+
 ----------------------------------------------------------------------
 Ran 30 tests

-OK
+FAILED (errors=3)
Failures: 055
Failed 1 of 1 tests

Reply via email to