Received: from eggs.gnu.org ([2001:4830:134:3::10]:35428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkl0X-00025R-K8 for qemu-devel@nongnu.org; Wed, 14 May 2014 22:02:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wkl0R-00062U-EO for qemu-devel@nongnu.org; Wed, 14 May 2014 22:02:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wkl0R-00062N-6O for qemu-devel@nongnu.org; Wed, 14 May 2014 22:02:47 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4F22k0T013477 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 May 2014 22:02:46 -0400 Date: Thu, 15 May 2014 10:02:57 +0800 From: Fam Zheng Message-ID: <20140515020257.GF19672@T430.nay.redhat.com> References: <1399128428-25546-1-git-send-email-mreitz@redhat.com> <87y4y4pmja.fsf@blackfin.pond.sub.org> <5373FF47.7020809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5373FF47.7020809@redhat.com> Subject: Re: [Qemu-devel] [PATCH] iotests: Use configured python List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Markus Armbruster , Stefan Hajnoczi , qemu-devel@nongnu.org On Thu, 05/15 01:41, Max Reitz wrote: > On 14.05.2014 14:33, Markus Armbruster wrote: > >Max Reitz writes: > > > >>Currently, QEMU's iotests rely on /usr/bin/env to start the correct > >>Python (that is, at least Python 2.4, but not 3). On systems where > >>Python 3 is the default, the user has no clean way of making the iotests > >>use the correct binary. > >> > >>This commit makes the iotests use the Python selected by configure. > >> > >>Signed-off-by: Max Reitz > >I'm afraid this broke qemu-iotests in a separate build tree: > > > > ./check: line 38: ./common.env: No such file or directory > > As I already replied to Peter, I see two (or maybe three) ways to fix this: > > The first is, we use the correct path to common.env. This would however > result in modification of the source tree although this is probably not what > the user intends with an out-of-tree build. On the other hand, this would > just work. > > The second is, we do not create common.env for out-of-tree builds and add a > default common.env to the repository ("PYTHON = python" should probably > suffice). This would not introduce any regressions, however, the iotests > would remain problematic on systems with Python 3 being the default when > using out-of-tree builds. As I guess that out-of-tree builds are actually > recommended, this would mean that the better solution might be to revert my > patch and instead change every "python" occurrence in the iotests' Shebangs > to "python2", as kind of a third way to go. However, for this I'm not sure > whether all systems which are supposed to be supported by qemu actually have > a "python2" executable/symlink. I guess so, but then again... > > So, either we fix it but try to write to the source tree without the user > intending to modify it; or we fix it for in-tree builds only; or we drop the > magic and just use "python2" in the iotests' Shebangs. Why can't we just tell ./check the path to common.env with an env var, like how we tell ./check the path to qemu-img with QEMU_IMG_PROG? Fam