Received: from eggs.gnu.org ([2001:4830:134:3::10]:55806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byYg3-0003gH-EQ for qemu-devel@nongnu.org; Mon, 24 Oct 2016 02:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byYg0-0002p3-PT for qemu-devel@nongnu.org; Mon, 24 Oct 2016 02:24:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58634 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1byYg0-0002oq-Jn for qemu-devel@nongnu.org; Mon, 24 Oct 2016 02:24:04 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9O6NdPe128136 for ; Mon, 24 Oct 2016 02:24:03 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0a-001b2d01.pphosted.com with ESMTP id 2692aa4hae-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 24 Oct 2016 02:24:03 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 24 Oct 2016 00:24:02 -0600 References: <20160928204644.11523-1-mreitz@redhat.com> <1b3f7281-eaa6-586b-0f3c-f30cebf88322@linux.vnet.ibm.com> <59343543-96c7-ebc1-5889-7259df3a2c90@redhat.com> <8bf56524-e566-85a2-3cde-b503e178b8e9@linux.vnet.ibm.com> <2510482c-9d74-1366-9839-8995394ac657@redhat.com> From: Hao QingFeng Date: Mon, 24 Oct 2016 14:23:54 +0800 MIME-Version: 1.0 In-Reply-To: <2510482c-9d74-1366-9839-8995394ac657@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Message-Id: <20e90139-32cc-26c0-2baa-a8eaaa20fd7e@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v4 0/3] iotests: Fix test 162 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , Sascha Silbe , qemu-devel@nongnu.org, Stefan Hajnoczi , Liu Jing , Christian Borntraeger , Cornelia Huck =E5=9C=A8 2016-10-16 1:27, Max Reitz =E5=86=99=E9=81=93: > On 13.10.2016 07:20, Hao QingFeng wrote: >> >> =E5=9C=A8 2016-10-13 3:46, Max Reitz =E5=86=99=E9=81=93: >>> On 12.10.2016 10:55, Hao QingFeng wrote: >>>> Max, >>>> >>>> Just a common question for this case, if sshx block driver wasn't bu= ilt >>>> into qemu-img, this case would fail as below: >>> Good point, and thanks for bringing it up, but it's not directly link= ed >>> to this series other than by its subject, of course, so I'd rather ad= d 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=3Dssh,host=3Dlocalhost,port=3D0.42,path=3D/foo >>>> qemu-img: Could not open >>>> 'driver=3Dssh,host=3Dlocalhost,port=3D0.42,path=3D/foo': Unknown dri= ver '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 r= un. >>>> >>>> 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 s= sh >>> if ssh is built as a module, which is possible. >> Actually I am not sure if I understood it. Do you mean >> "CONFIG_LIBSSH2=3Dm" set >> rather than "CONFIG_LIBSSH2=3Dy" in config-host.mak? But in the config= ure >> it's >> set to be "CONFIG_LIBSSH2=3Dy": >> if test "$libssh2" =3D "yes" ; then >> echo "CONFIG_LIBSSH2=3Dy" >> $config_host_mak >> echo "LIBSSH2_CFLAGS=3D$libssh2_cflags" >> $config_host_mak >> echo "LIBSSH2_LIBS=3D$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=3Dqemu.git;a=3Dblob;f=3Dconfigure;h=3Ddd9e6792bb= e04411d81eb5438d58eb1999d4dcd2;hb=3DHEAD#l5477 > >> Meanwhile I changed it to be "CONFIG_LIBSSH2=3Dm" and reconfig, make t= he >> qemu, >> qemu-img --help can still prompt ssh. > Have you tried building master with --enable-modules specified for > configure? You are right, I tried the latest master code(commit=20 b49e452fe994f8fbcd2) with "./configure --target-list=3Ds390x-softmmu --enable-debug --enable-module= s=20 --enable-libssh2 --prefix=3D/usr" and qemu-img --help didn't include the ssh and CONFIG_LIBSSH2=3Dm in=20 config-host.mak. Maybe it was changed in recent code. So how to deal with this case for=20 162 or just ignore it now? thanks! > Max > >>> This is a bug that should be fixed, but I'd rather do so in a separat= e >>> series from this one. >>> >>> In any case, once it is fixed I'd rather just take the approach quoru= m >>> tests take already (e.g. test 081), which is something like: >>> >>> test_ssh=3D$($QEMU_IMG --help | grep '^Supported formats:.* ssh\( \|$= \)') >>> [ "$test_ssh" =3D "" ] && _notrun "ssh support required" >> Cool. Agree with this like what was done in 081. thanks >>> Max >>> > --=20 QingFeng Hao(Robin)