On 13.10.2016 07:20, Hao QingFeng wrote: > > > 在 2016-10-13 3:46, Max Reitz 写道: >> On 12.10.2016 10:55, Hao QingFeng wrote: >>> Max, >>> >>> Just a common question for this case, if sshx block driver wasn't built >>> into qemu-img, this case would fail as below: >> Good point, and thanks for bringing it up, but it's not directly linked >> to this series other than by its subject, of course, so I'd rather add a >> fix on top. > Thanks and sorry for sending to the improper mail series. >>> exec /home/haoqf/KVMonz/qemu/tests/qemu-iotests/../../qemu-img info >>> --image-opts driver=ssh,host=localhost,port=0.42,path=/foo >>> qemu-img: Could not open >>> 'driver=ssh,host=localhost,port=0.42,path=/foo': Unknown driver 'ssh' >>> >>> Adding 162.notrun can bypass this case but it would skip it even if >>> qemu-img has sshx block driver, in which case I think it should be run. >>> >>> So How about adding a script to dynamically check at runtime if the >>> current env qemu-img can meet the requirement to run the test or not? >> Unfortunately, the list of block drivers listed by will not contain ssh >> if ssh is built as a module, which is possible. > Actually I am not sure if I understood it. Do you mean > "CONFIG_LIBSSH2=m" set > rather than "CONFIG_LIBSSH2=y" in config-host.mak? But in the configure > it's > set to be "CONFIG_LIBSSH2=y": > if test "$libssh2" = "yes" ; then > echo "CONFIG_LIBSSH2=y" >> $config_host_mak > echo "LIBSSH2_CFLAGS=$libssh2_cflags" >> $config_host_mak > echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak > fi
I don't know which version of qemu you are looking at, but on master it says "m" instead of "y" there: http://git.qemu.org/?p=qemu.git;a=blob;f=configure;h=dd9e6792bbe04411d81eb5438d58eb1999d4dcd2;hb=HEAD#l5477 > Meanwhile I changed it to be "CONFIG_LIBSSH2=m" and reconfig, make the > qemu, > qemu-img --help can still prompt ssh. Have you tried building master with --enable-modules specified for configure? Max >> This is a bug that should be fixed, but I'd rather do so in a separate >> series from this one. >> >> In any case, once it is fixed I'd rather just take the approach quorum >> tests take already (e.g. test 081), which is something like: >> >> test_ssh=$($QEMU_IMG --help | grep '^Supported formats:.* ssh\( \|$\)') >> [ "$test_ssh" = "" ] && _notrun "ssh support required" > Cool. Agree with this like what was done in 081. thanks >> Max >> >
signature.asc
Description: OpenPGP digital signature